Add a sout-keep option in the GUI as sout-keep is removed by default.
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 5 Sep 2008 06:54:38 +0000 (23:54 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 5 Sep 2008 06:59:03 +0000 (23:59 -0700)
modules/gui/qt4/dialogs/sout.cpp
modules/gui/qt4/ui/sout.ui

index 83619ad..5afc60f 100644 (file)
@@ -85,6 +85,7 @@ struct sout_gui_descr_t
     /* Misc */
     bool b_sap;   /*< send SAP announcement */
     bool b_all_es;/*< send all elementary streams from source stream */
+    bool b_sout_keep;
     char *psz_group;    /*< SAP Group name */
     char *psz_name;     /*< SAP name */
     int32_t i_ttl;      /*< Time To Live (TTL) for network traversal */
@@ -255,7 +256,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
     CB( PSMux ); CB( TSMux ); CB( MPEG1Mux ); CB( OggMux ); CB( ASFMux );
     CB( MP4Mux ); CB( MOVMux ); CB( WAVMux ); CB( RAWMux ); CB( FLVMux );
     /* Misc */
-    CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup );
+    CB( soutAll ); CB( soutKeep );  CS( ttl ); CT( sapName ); CT( sapGroup );
 
     CONNECT( ui.profileBox, activated( const QString & ), this, setOptions() );
     CONNECT( ui.fileSelectButton, clicked() , this, fileBrowse()  );
@@ -389,6 +390,7 @@ void SoutDialog::toggleSout()
     HIDEORSHOW( ui.sap ); HIDEORSHOW( ui.sapName );
     HIDEORSHOW( ui.sapGroup ); HIDEORSHOW( ui.sapGroupLabel );
     HIDEORSHOW( ui.ttlLabel ); HIDEORSHOW( ui.ttl );
+    HIDEORSHOW( ui.soutKeep );
 
     HIDEORSHOW( ui.IcecastOutput ); HIDEORSHOW( ui.IcecastEdit );
     HIDEORSHOW( ui.IcecastNamePassEdit ); HIDEORSHOW( ui.IcecastMountpointEdit );
@@ -436,6 +438,7 @@ void SoutDialog::RTPtoggled( bool b_en )
     ui.RTPLabel->setEnabled( b_en );
     ui.RTPEdit->setEnabled( b_en );
     ui.UDPOutput->setEnabled( b_en );
+    ui.UDPRTPLabel->setEnabled( b_en );
     ui.UDPEdit->setEnabled( b_en );
     ui.UDPPort->setEnabled( b_en );
     ui.UDPPortLabel->setEnabled( b_en );
@@ -471,6 +474,7 @@ void SoutDialog::updateMRL()
     sout.b_dump = ui.rawInput->isChecked();
     sout.b_sap = ui.sap->isChecked();
     sout.b_all_es = ui.soutAll->isChecked();
+    sout.b_sout_keep = ui.soutKeep->isChecked();
     sout.psz_vcodec = strdup( qtu( ui.vCodecBox->itemData( ui.vCodecBox->currentIndex() ).toString() ) );
     sout.psz_acodec = strdup( qtu( ui.aCodecBox->itemData( ui.aCodecBox->currentIndex() ).toString() ) );
     sout.psz_scodec = strdup( qtu( ui.subsCodecBox->itemData( ui.subsCodecBox->currentIndex() ).toString() ) );
@@ -693,6 +697,9 @@ void SoutDialog::updateMRL()
     if ( sout.b_all_es )
         mrl.append( " :sout-all" );
 
+    if ( sout.b_sout_keep )
+        mrl.append( " :sout-keep" );
+
     ui.mrlEdit->setText( mrl );
     free( sout.psz_acodec ); free( sout.psz_vcodec ); free( sout.psz_scodec );
     free( sout.psz_file );free( sout.psz_http ); free( sout.psz_mms );
index e171087..2400244 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>644</width>
-    <height>799</height>
+    <height>843</height>
    </rect>
   </property>
   <property name="windowTitle" >
      <layout class="QHBoxLayout" >
       <item>
        <layout class="QGridLayout" >
-        <item row="0" column="0" colspan="3" >
+        <item row="0" column="1" colspan="2" >
          <widget class="QCheckBox" name="localOutput" >
           <property name="text" >
            <string>_("Play locally")</string>
           </property>
          </widget>
         </item>
-        <item row="1" column="0" colspan="3" >
+        <item row="1" column="1" colspan="2" >
          <widget class="QCheckBox" name="fileOutput" >
           <property name="contextMenuPolicy" >
            <enum>Qt::NoContextMenu</enum>
@@ -82,7 +82,7 @@
           </property>
          </widget>
         </item>
-        <item row="2" column="0" colspan="3" >
+        <item row="2" column="1" colspan="2" >
          <widget class="QCheckBox" name="HTTPOutput" >
           <property name="text" >
            <string>HTTP</string>
           </property>
          </widget>
         </item>
-        <item row="3" column="0" colspan="3" >
+        <item row="3" column="1" colspan="2" >
          <widget class="QCheckBox" name="MMSHOutput" >
           <property name="text" >
            <string>MMSH</string>
           </property>
          </widget>
         </item>
-        <item row="4" column="0" colspan="3" >
+        <item row="4" column="1" colspan="2" >
          <widget class="QCheckBox" name="RTPOutput" >
           <property name="text" >
            <string>RTP</string>
           </property>
          </widget>
         </item>
-        <item row="7" column="0" colspan="3" >
+        <item row="7" column="1" colspan="2" >
          <widget class="QCheckBox" name="IcecastOutput" >
           <property name="text" >
            <string>IceCast</string>
         </item>
         <item rowspan="2" row="5" column="2" >
          <widget class="QLabel" name="UDPRTPLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
           <property name="sizePolicy" >
            <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
             <horstretch>0</horstretch>
           </property>
           <property name="maximumSize" >
            <size>
-            <width>83</width>
+            <width>100</width>
             <height>16777215</height>
            </size>
           </property>
           <property name="enabled" >
            <bool>false</bool>
           </property>
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
           <property name="toolTip" >
            <string>_("Using this option is not recommended in most of the cases.")</string>
           </property>
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>628</width>
-        <height>135</height>
+        <width>622</width>
+        <height>151</height>
        </rect>
       </property>
       <attribute name="title" >
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>624</width>
-        <height>129</height>
+        <width>622</width>
+        <height>151</height>
        </rect>
       </property>
       <attribute name="title" >
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>624</width>
-        <height>129</height>
+        <width>622</width>
+        <height>151</height>
        </rect>
       </property>
       <attribute name="title" >
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>624</width>
-        <height>129</height>
+        <width>622</width>
+        <height>151</height>
        </rect>
       </property>
       <attribute name="title" >
           </property>
          </widget>
         </item>
+        <item row="2" column="0" colspan="2" >
+         <widget class="QCheckBox" name="soutKeep" >
+          <property name="text" >
+           <string>_("Keep stream output open")</string>
+          </property>
+         </widget>
+        </item>
        </layout>
       </item>
      </layout>