]> git.sesse.net Git - vlc/commitdiff
Fix demuxdump MRL generation in Sout (Qt part of #1853 )
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 22 Aug 2008 23:58:43 +0000 (16:58 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 23 Aug 2008 00:01:27 +0000 (17:01 -0700)
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/ui/sout.ui

index 3b73b01c49a833667f08e154c54309f6c3851d85..35433f1dc18fa21358f7aeedd475bbd1159bd090 100644 (file)
@@ -241,10 +241,18 @@ void SoutDialog::setSTranscodeOptions( bool b_trans )
 
 void SoutDialog::setRawOptions( bool b_raw )
 {
+    ui.localOutput->setEnabled( !b_raw );
+    ui.HTTPOutput->setEnabled( !b_raw );
+    ui.MMSHOutput->setEnabled( !b_raw );
+    ui.UDPOutput->setEnabled( !b_raw );
+    ui.RTPOutput->setEnabled( !b_raw );
+    ui.IcecastOutput->setEnabled( !b_raw );
+    ui.UDPRTPLabel->setEnabled( !b_raw );
+
     if( b_raw )
         ui.tabWidget->setDisabled( true );
     else
-        SoutDialog::setOptions();
+        setOptions();
 }
 
 void SoutDialog::setOptions()
@@ -373,6 +381,7 @@ void SoutDialog::updateMRL()
     sout.b_icecast = ui.IcecastOutput->isChecked();
     sout.b_rtp = ui.RTPOutput->isChecked();
     sout.b_udp = ui.UDPOutput->isChecked();
+    sout.b_dump = ui.rawInput->isChecked();
     sout.b_sap = ui.sap->isChecked();
     sout.b_all_es = ui.soutAll->isChecked();
     sout.psz_vcodec = strdup( qtu( ui.vCodecBox->itemData( ui.vCodecBox->currentIndex() ).toString() ) );
@@ -424,7 +433,8 @@ void SoutDialog::updateMRL()
     bool trans = false;
     bool more = false;
 
-    if ( ui.transcodeVideo->isChecked() || ui.transcodeAudio->isChecked() )
+    if ( ui.transcodeVideo->isChecked() || ui.transcodeAudio->isChecked()
+         && !ui.rawInput->isChecked() /*demuxdump speciality*/ )
     {
         if ( ui.transcodeVideo->isChecked() )
         {
@@ -463,6 +473,15 @@ void SoutDialog::updateMRL()
         mrl.append( "}" );
     }
 
+    /* Special case for demuxdump */
+    if ( sout.b_file && sout.b_dump )
+    {
+        mrl = ":demux=dump :demuxdump-file=";
+        mrl.append( sout.psz_file );
+    }
+    else
+
+
     /* Protocol output */
     if ( sout.b_local || sout.b_file || sout.b_http ||
          sout.b_mms || sout.b_rtp || sout.b_udp || sout.b_icecast )
index 90e2405fcb26acd56e01f266144fa94ea1bc5454..2f99cd3de05cbf16b88a9716cdb2d0528bd0c5f9 100644 (file)
         <item row="5" column="4" >
          <widget class="QLineEdit" name="UDPEdit" >
           <property name="enabled" >
-           <bool>true</bool>
+           <bool>false</bool>
           </property>
          </widget>
         </item>
          </widget>
         </item>
         <item row="7" column="4" >
-         <widget class="QLineEdit" name="IcecastEdit" />
+         <widget class="QLineEdit" name="IcecastEdit" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
         </item>
         <item row="7" column="5" >
          <widget class="QLabel" name="IcecastPortLabel" >
          </widget>
         </item>
         <item row="8" column="4" >
-         <widget class="QLineEdit" name="IcecastMountpointEdit" />
+         <widget class="QLineEdit" name="IcecastMountpointEdit" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
         </item>
         <item row="8" column="5" >
          <widget class="QLabel" name="IcecastNameLabel" >