Commit 038dc1ca authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Names changement and some bug fixes.

parent fbb3c561
...@@ -37,14 +37,15 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -37,14 +37,15 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
/* UI stuff */ /* UI stuff */
ui.setupUi( this ); ui.setupUi( this );
#define ADD_PROFILE( name ) ui.comboBox->addItem( name ); #define ADD_PROFILE( name ) ui.profileBox->addItem( name );
ADD_PROFILE( "" ) ADD_PROFILE( "Custom" )
ADD_PROFILE( "Ipod" ) ADD_PROFILE( "IPod" )
ADD_PROFILE( "XBox" )
ADD_PROFILE( "Windows" )
ADD_PROFILE( "PSP" ) ADD_PROFILE( "PSP" )
ADD_PROFILE( "GSM" ) ADD_PROFILE( "GSM" )
ADD_PROFILE( "Custom" )
#define ADD_VCODEC( name, fourcc ) ui.vCodec_2->addItem( name, QVariant( fourcc ) ); #define ADD_VCODEC( name, fourcc ) ui.vCodecBox->addItem( name, QVariant( fourcc ) );
ADD_VCODEC( "MPEG-1", "mp1v" ) ADD_VCODEC( "MPEG-1", "mp1v" )
ADD_VCODEC( "MPEG-2", "mp2v" ) ADD_VCODEC( "MPEG-2", "mp2v" )
ADD_VCODEC( "MPEG-4", "mp4v" ) ADD_VCODEC( "MPEG-4", "mp4v" )
...@@ -58,7 +59,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -58,7 +59,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
ADD_VCODEC( "M-JPEG", "MJPG" ) ADD_VCODEC( "M-JPEG", "MJPG" )
ADD_VCODEC( "Theora", "theo" ) ADD_VCODEC( "Theora", "theo" )
#define ADD_ACODEC( name, fourcc ) ui.aCodec_2->addItem( name, QVariant( fourcc ) ); #define ADD_ACODEC( name, fourcc ) ui.aCodecBox->addItem( name, QVariant( fourcc ) );
ADD_ACODEC( "MPEG Audio", "mpga" ) ADD_ACODEC( "MPEG Audio", "mpga" )
ADD_ACODEC( "MP3", "mp3" ) ADD_ACODEC( "MP3", "mp3" )
ADD_ACODEC( "MPEG 4 Audio ( AAC )", "mp4a" ) ADD_ACODEC( "MPEG 4 Audio ( AAC )", "mp4a" )
...@@ -69,7 +70,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -69,7 +70,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
ADD_ACODEC( "WAV", "s16l" ) ADD_ACODEC( "WAV", "s16l" )
ADD_ACODEC( "WMA", "wma" ) ADD_ACODEC( "WMA", "wma" )
#define ADD_SCALING( factor ) ui.vScale_2->addItem( factor ); #define ADD_SCALING( factor ) ui.vScaleBox->addItem( factor );
ADD_SCALING( "0.25" ) ADD_SCALING( "0.25" )
ADD_SCALING( "0.5" ) ADD_SCALING( "0.5" )
ADD_SCALING( "0.75" ) ADD_SCALING( "0.75" )
...@@ -92,22 +93,22 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, ...@@ -92,22 +93,22 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
CT( fileEdit ); CT( HTTPEdit ); CT( UDPEdit ); CT( MMSHEdit ); CT( fileEdit ); CT( HTTPEdit ); CT( UDPEdit ); CT( MMSHEdit );
CS( HTTPPort ); CS( UDPPort ); CS( MMSHPort ); CS( HTTPPort ); CS( UDPPort ); CS( MMSHPort );
// /* Transcode */ // /* Transcode */
CC( vCodec_2 ); CC( sCodec_2 ); CC( aCodec_2 ) ; CC( vCodecBox ); CC( subsCodecBox ); CC( aCodecBox ) ;
CB( transcodeVideo_2 ); CB( transcodeAudio_2 ); CB( transcodeSubs_2 ); CB( transcodeVideo ); CB( transcodeAudio ); CB( transcodeSubs );
// CB( sOverlay ); // CB( sOverlay );
CS( vBitrate_2 ); CS( aBitrate_2 ); CS( aChannels_2 ); CC( vScale_2 ); CS( vBitrateSpin ); CS( aBitrateSpin ); CS( aChannelsSpin ); CC( vScaleBox );
// /* Mux */ // /* Mux */
CB( PSMux ); CB( TSMux ); CB( MPEG1Mux ); CB( OggMux ); CB( ASFMux ); CB( PSMux ); CB( TSMux ); CB( MPEG1Mux ); CB( OggMux ); CB( ASFMux );
CB( MP4Mux ); CB( MOVMux ); CB( WAVMux ); CB( RAWMux ); CB( FLVMux ); CB( MP4Mux ); CB( MOVMux ); CB( WAVMux ); CB( RAWMux ); CB( FLVMux );
// /* Misc */ // /* Misc */
CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup ); CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup );
// //
connect( ui.comboBox, SIGNAL( activated( const QString & ) ), this, SLOT( setOptions() ) ); CONNECT( ui.profileBox, activated( const QString & ), this, setOptions() );
connect( ui.fileSelectButton, SIGNAL( clicked() ), this, SLOT( fileBrowse() ) ); CONNECT( ui.fileSelectButton, clicked() , this, fileBrowse() );
connect( ui.transcodeVideo_2,SIGNAL( toggled( bool ) ),this,SLOT( setVTranscodeOptions( bool ) ) ); CONNECT( ui.transcodeVideo, toggled( bool ), this, setVTranscodeOptions( bool ) );
connect( ui.transcodeAudio_2,SIGNAL( toggled( bool ) ),this,SLOT( setATranscodeOptions( bool ) ) ); CONNECT( ui.transcodeAudio, toggled( bool ), this, setATranscodeOptions( bool ) );
connect( ui.transcodeSubs_2,SIGNAL( toggled( bool ) ),this,SLOT( setSTranscodeOptions( bool ) ) ); CONNECT( ui.transcodeSubs, toggled( bool ), this, setSTranscodeOptions( bool ) );
connect( ui.rawInput,SIGNAL( toggled( bool ) ),this,SLOT( setRawOptions( bool ) ) ); CONNECT( ui.rawInput, toggled( bool ), this, setRawOptions( bool ) );
QPushButton *okButton = new QPushButton( qtr( "&Stream" ) ); QPushButton *okButton = new QPushButton( qtr( "&Stream" ) );
QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) ); QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ) );
...@@ -131,29 +132,28 @@ void SoutDialog::fileBrowse() ...@@ -131,29 +132,28 @@ void SoutDialog::fileBrowse()
void SoutDialog::setVTranscodeOptions( bool b_trans ) void SoutDialog::setVTranscodeOptions( bool b_trans )
{ {
ui.label_2->setEnabled( b_trans ); ui.vCodecLabel->setEnabled( b_trans );
ui.vCodec_2->setEnabled( b_trans ); ui.vCodecBox->setEnabled( b_trans );
ui.vBitrateLabel_2->setEnabled( b_trans ); ui.vBitrateLabel->setEnabled( b_trans );
ui.vScaleLabel_2->setEnabled( b_trans ); ui.vBitrateSpin->setEnabled( b_trans );
ui.vBitrate_2->setEnabled( b_trans ); ui.vScaleLabel->setEnabled( b_trans );
ui.vScaleLabel_2->setEnabled( b_trans ); ui.vScaleBox->setEnabled( b_trans );
ui.vScale_2->setEnabled( b_trans );
} }
void SoutDialog::setATranscodeOptions( bool b_trans ) void SoutDialog::setATranscodeOptions( bool b_trans )
{ {
ui.label->setEnabled( b_trans ); ui.aCodecLabel->setEnabled( b_trans );
ui.aCodec_2->setEnabled( b_trans ); ui.aCodecBox->setEnabled( b_trans );
ui.aBitrateLabel_2->setEnabled( b_trans ); ui.aBitrateLabel->setEnabled( b_trans );
ui.aBitrate_2->setEnabled( b_trans ); ui.aBitrateSpin->setEnabled( b_trans );
ui.s_3->setEnabled( b_trans ); ui.aChannelsLabel->setEnabled( b_trans );
ui.aChannels_2->setEnabled( b_trans ); ui.aChannelsSpin->setEnabled( b_trans );
} }
void SoutDialog::setSTranscodeOptions( bool b_trans ) void SoutDialog::setSTranscodeOptions( bool b_trans )
{ {
ui.sCodec_2->setEnabled( b_trans ); ui.subsCodecBox->setEnabled( b_trans );
ui.sOverlay_2->setEnabled( b_trans ); ui.subsOverlay->setEnabled( b_trans );
} }
void SoutDialog::setRawOptions( bool b_raw ) void SoutDialog::setRawOptions( bool b_raw )
...@@ -171,7 +171,7 @@ void SoutDialog::setRawOptions( bool b_raw ) ...@@ -171,7 +171,7 @@ void SoutDialog::setRawOptions( bool b_raw )
void SoutDialog::setOptions() void SoutDialog::setOptions()
{ {
/* The test is currently done with a QString, it could be done with the index, it'd depend how translation works */ /* The test is currently done with a QString, it could be done with the index, it'd depend how translation works */
if ( ui.comboBox->currentText() == "Custom" ) if ( ui.profileBox->currentText() == "Custom" )
{ {
ui.tabWidget->setEnabled( true ); ui.tabWidget->setEnabled( true );
} }
...@@ -219,9 +219,9 @@ void SoutDialog::updateMRL() ...@@ -219,9 +219,9 @@ void SoutDialog::updateMRL()
sout.b_udp = ui.UDPOutput->isChecked(); sout.b_udp = ui.UDPOutput->isChecked();
sout.b_sap = ui.sap->isChecked(); sout.b_sap = ui.sap->isChecked();
sout.b_all_es = ui.soutAll->isChecked(); sout.b_all_es = ui.soutAll->isChecked();
sout.psz_vcodec = strdup( qtu( ui.vCodec_2->itemData( ui.vCodec_2->currentIndex() ).toString() ) ); sout.psz_vcodec = strdup( qtu( ui.vCodecBox->itemData( ui.vCodecBox->currentIndex() ).toString() ) );
sout.psz_acodec = strdup( qtu( ui.aCodec_2->itemData( ui.vCodec_2->currentIndex() ).toString() ) ); sout.psz_acodec = strdup( qtu( ui.aCodecBox->itemData( ui.aCodecBox->currentIndex() ).toString() ) );
sout.psz_scodec = strdup( qtu( ui.sCodec_2->itemData( ui.vCodec_2->currentIndex() ).toString() ) ); sout.psz_scodec = strdup( qtu( ui.subsCodecBox->itemData( ui.subsCodecBox->currentIndex() ).toString() ) );
sout.psz_file = strdup( qtu( ui.fileEdit->text() ) ); sout.psz_file = strdup( qtu( ui.fileEdit->text() ) );
sout.psz_http = strdup( qtu( ui.HTTPEdit->text() ) ); sout.psz_http = strdup( qtu( ui.HTTPEdit->text() ) );
sout.psz_mms = strdup( qtu( ui.MMSHEdit->text() ) ); sout.psz_mms = strdup( qtu( ui.MMSHEdit->text() ) );
...@@ -229,10 +229,10 @@ void SoutDialog::updateMRL() ...@@ -229,10 +229,10 @@ void SoutDialog::updateMRL()
sout.i_http = ui.HTTPPort->value(); sout.i_http = ui.HTTPPort->value();
sout.i_mms = ui.MMSHPort->value(); sout.i_mms = ui.MMSHPort->value();
sout.i_udp = ui.UDPPort->value(); sout.i_udp = ui.UDPPort->value();
sout.i_ab = ui.aBitrate_2->value(); sout.i_ab = ui.aBitrateSpin->value();
sout.i_vb = ui.vBitrate_2->value(); sout.i_vb = ui.vBitrateSpin->value();
sout.i_channels = ui.aChannels_2->value(); sout.i_channels = ui.aChannelsSpin->value();
sout.f_scale = atof( qta( ui.vScale_2->currentText() ) ); sout.f_scale = atof( qta( ui.vScaleBox->currentText() ) );
sout.psz_group = strdup( qtu( ui.sapGroup->text() ) ); sout.psz_group = strdup( qtu( ui.sapGroup->text() ) );
sout.psz_name = strdup( qtu( ui.sapName->text() ) ); sout.psz_name = strdup( qtu( ui.sapName->text() ) );
...@@ -251,9 +251,9 @@ void SoutDialog::updateMRL() ...@@ -251,9 +251,9 @@ void SoutDialog::updateMRL()
bool trans = false; bool trans = false;
bool more = false; bool more = false;
if ( ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked() ) if ( ui.transcodeVideo->isChecked() || ui.transcodeAudio->isChecked() )
{ {
if ( ui.transcodeVideo_2->isChecked() ) if ( ui.transcodeVideo->isChecked() )
{ {
mrl = ":sout=#transcode{"; mrl = ":sout=#transcode{";
mrl.append( "vcodec=" ); mrl.append( "vcodec=" );
...@@ -267,7 +267,7 @@ if ( ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked() ) ...@@ -267,7 +267,7 @@ if ( ui.transcodeVideo_2->isChecked() || ui.transcodeAudio_2->isChecked() )
trans = true; trans = true;
} }
if ( ui.transcodeAudio_2->isChecked() ) if ( ui.transcodeAudio->isChecked() )
{ {
if ( trans ) if ( trans )
{ {
......
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" >
<number>3</number>
</property>
<item row="1" column="1" > <item row="1" column="1" >
<widget class="QLabel" name="fileLabel" > <widget class="QLabel" name="fileLabel" >
<property name="enabled" > <property name="enabled" >
...@@ -299,13 +296,10 @@ ...@@ -299,13 +296,10 @@
</widget> </widget>
</item> </item>
<item row="2" column="1" > <item row="2" column="1" >
<widget class="QComboBox" name="comboBox" /> <widget class="QComboBox" name="profileBox" />
</item> </item>
<item row="4" column="0" colspan="2" > <item row="4" column="0" colspan="2" >
<widget class="QTabWidget" name="tabWidget" > <widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>3</number>
</property>
<widget class="QWidget" name="tab" > <widget class="QWidget" name="tab" >
<attribute name="title" > <attribute name="title" >
<string>_("Encapsulation")</string> <string>_("Encapsulation")</string>
...@@ -384,19 +378,22 @@ ...@@ -384,19 +378,22 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2" > <widget class="QWidget" name="tab_2" >
<property name="enabled" >
<bool>true</bool>
</property>
<attribute name="title" > <attribute name="title" >
<string>_("Video Codec")</string> <string>_("Video Codec")</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QCheckBox" name="transcodeVideo_2" > <widget class="QCheckBox" name="transcodeVideo" >
<property name="text" > <property name="text" >
<string>_("Video")</string> <string>_("Video")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item rowspan="2" row="0" column="1" > <item rowspan="2" row="0" column="1" >
<widget class="QComboBox" name="vCodec_2" > <widget class="QComboBox" name="vCodecBox" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -406,14 +403,17 @@ ...@@ -406,14 +403,17 @@
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >
<widget class="QLabel" name="label_2" > <widget class="QLabel" name="vCodecLabel" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" > <property name="text" >
<string>_("Codec")</string> <string>_("Codec")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" > <item row="2" column="0" >
<widget class="QLabel" name="vBitrateLabel_2" > <widget class="QLabel" name="vBitrateLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -423,7 +423,7 @@ ...@@ -423,7 +423,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="1" > <item row="2" column="1" >
<widget class="QSpinBox" name="vBitrate_2" > <widget class="QSpinBox" name="vBitrateSpin" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -448,7 +448,7 @@ ...@@ -448,7 +448,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="0" > <item row="3" column="0" >
<widget class="QLabel" name="vScaleLabel_2" > <widget class="QLabel" name="vScaleLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -458,7 +458,7 @@ ...@@ -458,7 +458,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="1" > <item row="3" column="1" >
<widget class="QComboBox" name="vScale_2" > <widget class="QComboBox" name="vScaleBox" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -475,28 +475,31 @@ ...@@ -475,28 +475,31 @@
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QCheckBox" name="transcodeAudio_2" > <widget class="QCheckBox" name="transcodeAudio" >
<property name="text" > <property name="text" >
<string>_("Audio")</string> <string>_("Audio")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >
<widget class="QLabel" name="label" > <widget class="QLabel" name="aCodecLabel" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" > <property name="text" >
<string>_("Codec")</string> <string>_("Codec")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" > <item row="1" column="1" >
<widget class="QComboBox" name="aCodec_2" > <widget class="QComboBox" name="aCodecBox" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" > <item row="2" column="0" >
<widget class="QLabel" name="aBitrateLabel_2" > <widget class="QLabel" name="aBitrateLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -506,7 +509,7 @@ ...@@ -506,7 +509,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="1" > <item row="2" column="1" >
<widget class="QSpinBox" name="aBitrate_2" > <widget class="QSpinBox" name="aBitrateSpin" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -528,7 +531,7 @@ ...@@ -528,7 +531,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="0" > <item row="3" column="0" >
<widget class="QLabel" name="s_3" > <widget class="QLabel" name="aChannelsLabel" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -538,7 +541,7 @@ ...@@ -538,7 +541,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="1" > <item row="3" column="1" >
<widget class="QSpinBox" name="aChannels_2" > <widget class="QSpinBox" name="aChannelsSpin" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -564,23 +567,23 @@ ...@@ -564,23 +567,23 @@
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QCheckBox" name="transcodeSubs_2" > <widget class="QCheckBox" name="transcodeSubs" >
<property name="text" > <property name="text" >
<string>_("Subtitles")</string> <string>_("Subtitles")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <item row="0" column="1" >
<widget class="QComboBox" name="sCodec_2" > <widget class="QComboBox" name="subsCodecBox" >
<property name="enabled" > <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" > <item row="1" column="1" >
<widget class="QCheckBox" name="sOverlay_2" > <widget class="QCheckBox" name="subsOverlay" >
<property name="enabled" > <property name="enabled" >
<bool>true</bool> <bool>false</bool>
</property> </property>
<property name="text" > <property name="text" >
<string>_("Overlay subtitles on the video")</string> <string>_("Overlay subtitles on the video")</string>
...@@ -599,9 +602,6 @@ ...@@ -599,9 +602,6 @@
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" >
<number>3</number>
</property>
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QCheckBox" name="sap" > <widget class="QCheckBox" name="sap" >
<property name="enabled" > <property name="enabled" >
...@@ -688,9 +688,6 @@ ...@@ -688,9 +688,6 @@
</item> </item>
<item row="7" column="0" colspan="2" > <item row="7" column="0" colspan="2" >
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment