* Qt4 stream output dialog
authorClément Stenac <zorglub@videolan.org>
Sun, 12 Nov 2006 17:06:24 +0000 (17:06 +0000)
committerClément Stenac <zorglub@videolan.org>
Sun, 12 Nov 2006 17:06:24 +0000 (17:06 +0000)
* Fixes to the streaming chain generator
* network: don't print an error message for EINTR

include/vlc_streaming.h
include/vlc_symbols.h
modules/gui/qt4/Modules.am
modules/gui/qt4/dialogs/sout.cpp [new file with mode: 0644]
modules/gui/qt4/dialogs/sout.hpp [new file with mode: 0644]
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/ui/sout.ui [new file with mode: 0644]
src/network/io.c
src/stream_output/profiles.c

index 7a97b8d..d148955 100644 (file)
@@ -120,7 +120,8 @@ struct sout_transcode_t
     int i_vb, i_ab, i_channels;
     float f_scale;
     vlc_bool_t b_soverlay;
-    char *psz_vcodec, *psz_acodec, *psz_scodec, *psz_venc, *psz_aenc;
+    char *psz_vcodec;
+    char *psz_acodec, *psz_scodec, *psz_venc, *psz_aenc;
     char *psz_additional;
 
     int i_params; sout_param_t **pp_params;
@@ -219,6 +220,9 @@ struct sout_gui_descr_t
     int i_ttl;
 };
 
+VLC_EXPORT(void, streaming_GuiDescToChain,(vlc_object_t*, sout_chain_t*, sout_gui_descr_t*));
+VLC_EXPORT(char*, streaming_ChainToPsz,(sout_chain_t*));
+
 /***************** Profile parsing ***********************/
 
 struct profile_parser_t
index 08d3509..cdedfdc 100644 (file)
@@ -519,7 +519,7 @@ struct module_symbols_t
     void (*__stats_TimersClean_inner) (vlc_object_t *);
     void *__intf_IntfProgressUpdate_deprecated;
     void *__intf_IntfProgress_deprecated;
-    void *streaming_ChainToPsz_deprecated;
+    char* (*streaming_ChainToPsz_inner) (sout_chain_t*);
     int (*__intf_UserWarn_inner) (vlc_object_t*, const char*, const char*, ...);
     vlc_bool_t (*__intf_UserProgressIsCancelled_inner) (vlc_object_t*, int);
     int (*__intf_Progress_inner) (vlc_object_t*, const char*, const char*, float, int);
@@ -558,6 +558,7 @@ struct module_symbols_t
     char * (*str_format_time_inner) (char *);
     char * (*__str_format_meta_inner) (vlc_object_t *, char *);
     int (*vout_Snapshot_inner) (vout_thread_t *p_vout, picture_t *p_pic);
+    void (*streaming_GuiDescToChain_inner) (vlc_object_t*, sout_chain_t*, sout_gui_descr_t*);
 };
 # if defined (__PLUGIN__)
 #  define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
@@ -1001,6 +1002,7 @@ struct module_symbols_t
 #  define input_AddSubtitles (p_symbols)->input_AddSubtitles_inner
 #  define __stats_CounterCreate (p_symbols)->__stats_CounterCreate_inner
 #  define __stats_TimersClean (p_symbols)->__stats_TimersClean_inner
+#  define streaming_ChainToPsz (p_symbols)->streaming_ChainToPsz_inner
 #  define __intf_UserWarn (p_symbols)->__intf_UserWarn_inner
 #  define __intf_UserProgressIsCancelled (p_symbols)->__intf_UserProgressIsCancelled_inner
 #  define __intf_Progress (p_symbols)->__intf_Progress_inner
@@ -1033,6 +1035,7 @@ struct module_symbols_t
 #  define str_format_time (p_symbols)->str_format_time_inner
 #  define __str_format_meta (p_symbols)->__str_format_meta_inner
 #  define vout_Snapshot (p_symbols)->vout_Snapshot_inner
+#  define streaming_GuiDescToChain (p_symbols)->streaming_GuiDescToChain_inner
 # elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
 /******************************************************************
  * STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
@@ -1479,6 +1482,7 @@ struct module_symbols_t
     ((p_symbols)->input_AddSubtitles_inner) = input_AddSubtitles; \
     ((p_symbols)->__stats_CounterCreate_inner) = __stats_CounterCreate; \
     ((p_symbols)->__stats_TimersClean_inner) = __stats_TimersClean; \
+    ((p_symbols)->streaming_ChainToPsz_inner) = streaming_ChainToPsz; \
     ((p_symbols)->__intf_UserWarn_inner) = __intf_UserWarn; \
     ((p_symbols)->__intf_UserProgressIsCancelled_inner) = __intf_UserProgressIsCancelled; \
     ((p_symbols)->__intf_Progress_inner) = __intf_Progress; \
@@ -1511,6 +1515,7 @@ struct module_symbols_t
     ((p_symbols)->str_format_time_inner) = str_format_time; \
     ((p_symbols)->__str_format_meta_inner) = __str_format_meta; \
     ((p_symbols)->vout_Snapshot_inner) = vout_Snapshot; \
+    ((p_symbols)->streaming_GuiDescToChain_inner) = streaming_GuiDescToChain; \
     (p_symbols)->vlc_current_charset_deprecated = NULL; \
     (p_symbols)->net_ConvertIPv4_deprecated = NULL; \
     (p_symbols)->__sout_CfgParse_deprecated = NULL; \
@@ -1570,7 +1575,6 @@ struct module_symbols_t
     (p_symbols)->stats_TimersClean_deprecated = NULL; \
     (p_symbols)->__intf_IntfProgressUpdate_deprecated = NULL; \
     (p_symbols)->__intf_IntfProgress_deprecated = NULL; \
-    (p_symbols)->streaming_ChainToPsz_deprecated = NULL; \
     (p_symbols)->__input_SecondaryPreparse_deprecated = NULL; \
     (p_symbols)->__input_MetaFetch_deprecated = NULL; \
     (p_symbols)->input_DownloadAndCacheArt_deprecated = NULL; \
index e750419..77eccd6 100644 (file)
@@ -21,7 +21,8 @@ TOUI =        \
        ui/sprefs_playlist \
        ui/sprefs_subtitles \
        ui/sprefs_video \
-       ui/streampanel
+       ui/streampanel \
+       ui/sout
 
 
 UIH = $(TOUI:%=%.h)
@@ -38,6 +39,7 @@ TOMOC = main_interface \
        dialogs/streaminfo \
        dialogs/extended \
        dialogs/interaction \
+       dialogs/sout \
        components/extended_panels \
        components/infopanels \
        components/preferences_widgets \
@@ -64,6 +66,7 @@ nodist_SOURCES_qt4 = \
                dialogs/errors.moc.cpp \
                dialogs/prefs_dialog.moc.cpp \
                dialogs/interaction.moc.cpp \
+               dialogs/sout.moc.cpp \
                components/extended_panels.moc.cpp \
                components/infopanels.moc.cpp \
                components/preferences_widgets.moc.cpp \
@@ -110,6 +113,7 @@ SOURCES_qt4 =       qt4.cpp \
                dialogs/messages.cpp \
                dialogs/errors.cpp \
                dialogs/interaction.cpp \
+               dialogs/sout.cpp \
                components/extended_panels.cpp \
                components/infopanels.cpp \
                components/preferences_widgets.cpp \
@@ -138,6 +142,7 @@ EXTRA_DIST += \
        dialogs/errors.hpp \
        dialogs/prefs_dialog.hpp \
        dialogs/interaction.hpp \
+       dialogs/sout.hpp \
        components/extended_panels.hpp \
        components/infopanels.hpp \
        components/preferences_widgets.hpp \
@@ -161,6 +166,7 @@ EXTRA_DIST += \
        ui/sprefs_subtitles.ui \
        ui/sprefs_video.ui \
        ui/streampanel.ui \
+       ui/sout.ui \
        pixmaps/advanced.xpm \
        pixmaps/audio.xpm \
        pixmaps/codec.xpm \
diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp
new file mode 100644 (file)
index 0000000..d9c3f8a
--- /dev/null
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ * sout.cpp : Stream output dialog (old-style)
+ ****************************************************************************
+ * Copyright (C) 2006 the VideoLAN team
+ * $Id: Errors.cpp 16024 2006-07-13 13:51:05Z xtophe $
+ *
+ * Authors: Clément Stenac <zorglub@videolan.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#include "dialogs/sout.hpp"
+#include "qt4.hpp"
+#include <vlc_streaming.h>
+
+#include <QFileDialog>
+
+SoutDialog::SoutDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
+{
+    setWindowTitle( _("Stream output") );
+    main = new QWidget( this );
+
+    /* UI stuff */
+    ui.setupUi( main );
+#define ADD_VCODEC( name, fcc) ui.vCodec->addItem( name, QVariant( fcc ) );
+    ADD_VCODEC( "MPEG-1", "mp1v" );
+    ADD_VCODEC( "MPEG-2", "mp2v" );
+    ADD_VCODEC( "MPEG-4", "mp4v" );
+    ADD_VCODEC( "DIVX 1" , "DIV1" );
+    ADD_VCODEC( "DIVX 2" , "DIV1" );
+    ADD_VCODEC( "DIVX 3" , "DIV1" );
+    ADD_VCODEC( "H-263", "H263" );
+    ADD_VCODEC( "H-264", "h264" );
+    ADD_VCODEC( "WMV1", "WMV1" );
+    ADD_VCODEC( "WMV2" , "WMV2" );
+    ADD_VCODEC( "M-JPEG", "MJPG" );
+    ADD_VCODEC( "Theora", "theo" );
+
+#define ADD_ACODEC( name, fcc) ui.aCodec->addItem( name, QVariant( fcc ) );
+    ADD_ACODEC( "MPEG Audio", "mpga" );
+    ADD_ACODEC( "MP3", "mp3" );
+    ADD_ACODEC( "MPEG 4 Audio (AAC)", "mp4a");
+    ADD_ACODEC( "A52/AC3", "a52");
+    ADD_ACODEC( "Vorbis", "vorb" );
+    ADD_ACODEC( "Flac", "flac" );
+    ADD_ACODEC( "Speex", "spx" );
+    ADD_ACODEC( "WAV", "s16l" );
+
+    ui.vScale->addItem( "0.25" );
+    ui.vScale->addItem( "0.5" );
+    ui.vScale->addItem( "0.75" );
+    ui.vScale->addItem( "1" );
+    ui.vScale->addItem( "1.25" );
+    ui.vScale->addItem( "1.5" );
+    ui.vScale->addItem( "1.75" );
+    ui.vScale->addItem( "2" );
+
+    /* Connect everything to the updateMRL function */
+#define CB(x) CONNECT( ui.x, clicked(bool), this, updateMRL() );
+#define CT(x) CONNECT( ui.x, textChanged(const QString), this, updateMRL() );
+#define CS(x) CONNECT( ui.x, valueChanged(int), this, updateMRL() );
+#define CC(x) CONNECT( ui.x, currentIndexChanged(int), this, updateMRL() );
+    /* Output */
+    CB( fileOutput ); CB( HTTPOutput ); CB( localOutput );
+    CB( UDPOutput ); CB( MMSHOutput ); CB( rawInput );
+    CT( fileEdit ); CT( HTTPEdit ); CT( UDPEdit ); CT( MMSHEdit );
+    CS( HTTPPort ); CS( UDPPort ); CS( MMSHPort );
+    /* Transcode */
+    CC( vCodec ); CC( sCodec ); CC( aCodec ) ;
+    CB( transcodeVideo ); CB( transcodeAudio ); CB( transcodeSubs );
+    CB( sOverlay );
+    CS( vBitrate ); CS( aBitrate ); CS( aChannels ); CC( vScale );
+    /* Mux */
+    CB( PSMux ); CB( TSMux ); CB( MPEG1Mux ); CB( OggMux ); CB( ASFMux );
+    CB( MP4Mux ); CB( MOVMux ); CB( WAVMux ); CB( RAWMux );
+    /* Misc */
+    CB( soutAll ); CS( ttl ); CT( sapName ); CT( sapGroup );
+
+    CONNECT( ui.fileSelectButton, clicked(), this, fileBrowse() );
+}
+
+void SoutDialog::fileBrowse()
+{
+    QString f = QFileDialog::getOpenFileName( this, qtr("Save file"), "", "" );
+    ui.fileEdit->setText( f );
+    updateMRL();
+}
+
+void SoutDialog::ok()
+{
+}
+void SoutDialog::cancel()
+{
+}
+
+void SoutDialog::updateMRL()
+{
+    sout_gui_descr_t pd;
+    memset( &pd, 0, sizeof( sout_gui_descr_t ) );
+
+    /* Output */
+    pd.b_dump = ui.rawInput->isChecked();
+    if( pd.b_dump ) goto end;
+
+    pd.b_local = ui.localOutput->isChecked();
+    pd.b_file = ui.fileOutput->isChecked();
+    pd.b_http = ui.HTTPOutput->isChecked();
+    pd.b_mms = ui.MMSHOutput->isChecked();
+    pd.b_udp = ui.UDPOutput->isChecked();
+
+    pd.psz_file = ui.fileOutput->isChecked() ?
+                            strdup(qtu( ui.fileEdit->text() ) ): NULL;
+    pd.psz_http = ui.HTTPOutput->isChecked() ?
+                            strdup(qtu( ui.HTTPEdit->text() ) ) : NULL;
+    pd.psz_mms = ui.MMSHOutput->isChecked() ?
+                            strdup(qtu( ui.MMSHEdit->text() ) ): NULL;
+    pd.psz_udp = ui.UDPOutput->isChecked() ?
+                            strdup( qtu( ui.UDPEdit->text() ) ): NULL;
+
+    pd.i_http = ui.HTTPPort->value();
+    pd.i_mms = ui.MMSHPort->value();
+    pd.i_udp = ui.UDPPort->value();
+
+    /* Mux */
+#define SMUX(x, txt) if( ui.x##Mux->isChecked() ) pd.psz_mux = strdup(txt);
+    SMUX( PS, "ps" );
+    SMUX( TS, "ts" );
+    SMUX( MPEG1, "mpeg" );
+    SMUX( Ogg, "ogg" );
+    SMUX( ASF, "asf" );
+    SMUX( MP4, "mp4" );
+    SMUX( MOV, "mov" );
+    SMUX( WAV, "wav" );
+    SMUX( RAW, "raw" );
+
+    /* Transcode */
+    pd.b_soverlay = ui.sOverlay->isChecked();
+    pd.i_vb = ui.vBitrate->value();
+    pd.i_ab = ui.aBitrate->value();
+    pd.i_channels = ui.aChannels->value();
+    pd.f_scale = atof( qta( ui.vScale->currentText() ) );
+
+    pd.psz_vcodec = ui.transcodeVideo->isChecked() ?
+                     strdup( qtu( ui.vCodec->itemData(
+                            ui.vCodec->currentIndex() ). toString() ) ) : NULL;
+    pd.psz_acodec = ui.transcodeAudio->isChecked() ?
+                     strdup( qtu( ui.aCodec->itemData(
+                            ui.aCodec->currentIndex() ).toString() ) ) : NULL;
+    pd.psz_scodec = ui.transcodeSubs->isChecked() ?
+                     strdup( qtu( ui.sCodec->itemData(
+                            ui.sCodec->currentIndex() ).toString() ) ) : NULL;
+    pd.b_sap = ui.sap->isChecked();
+    pd.b_all_es = ui.soutAll->isChecked();
+    pd.psz_name = qtu( ui.sapName->text() );
+    pd.psz_group = qtu( ui.sapGroup->text() );
+    pd.i_ttl = ui.ttl->value() ;
+end:
+    sout_chain_t* p_chain = streaming_ChainNew();
+    streaming_GuiDescToChain( VLC_OBJECT(p_intf), p_chain, &pd );
+    char *psz_mrl = streaming_ChainToPsz( p_chain );
+    ui.mrlEdit->setText( qfu( strdup(psz_mrl) ) );
+    free( pd.psz_acodec ); free( pd.psz_vcodec ); free( pd.psz_scodec );
+    free( pd.psz_file );free( pd.psz_http ); free( pd.psz_mms );
+    free( pd.psz_udp ); free( pd.psz_mux );
+}
diff --git a/modules/gui/qt4/dialogs/sout.hpp b/modules/gui/qt4/dialogs/sout.hpp
new file mode 100644 (file)
index 0000000..55088ef
--- /dev/null
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * sout.hpp : Stream output dialog (old-style, ala WX)
+ ****************************************************************************
+ * Copyright (C) 2006 the VideoLAN team
+ * $Id: Errors.hpp 16024 2006-07-13 13:51:05Z xtophe $
+ *
+ * Authors: Clément Stenac <zorglub@videolan.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/
+
+#ifndef _SOUT_DIALOG_H_
+#define _SOUT_DIALOG_H_
+#include <vlc/vlc.h>
+#include "ui/sout.h"
+#include "util/qvlcframe.hpp"
+
+class QPushButton;
+class QCheckBox;
+class QGridLayout;
+class QTextEdit;
+
+class SoutDialog : public QVLCFrame
+{
+    Q_OBJECT;
+public:
+    SoutDialog( intf_thread_t * );
+    QWidget *main;
+private:
+    Ui::Sout ui;
+public slots:
+    void ok();
+    void cancel();
+    void updateMRL();
+    void fileBrowse();
+};
+
+#endif
index adca9a3..8c8c725 100644 (file)
@@ -36,6 +36,7 @@
 #include "dialogs/streaminfo.hpp"
 #include "dialogs/messages.hpp"
 #include "dialogs/extended.hpp"
+#include "dialogs/sout.hpp"
 
 DialogsProvider* DialogsProvider::instance = NULL;
 
@@ -158,6 +159,7 @@ void DialogsProvider::quit()
 
 void DialogsProvider::streaminfoDialog()
 {
+    (new SoutDialog( p_intf ))->show();
     StreamInfoDialog::getInstance( p_intf )->toggleVisible();
 }
 
diff --git a/modules/gui/qt4/ui/sout.ui b/modules/gui/qt4/ui/sout.ui
new file mode 100644 (file)
index 0000000..d414068
--- /dev/null
@@ -0,0 +1,1321 @@
+<ui version="4.0" >
+ <class>Sout</class>
+ <widget class="QWidget" name="Sout" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>630</width>
+    <height>660</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="title" >
+      <string>Outputs</string>
+     </property>
+     <layout class="QHBoxLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item>
+       <layout class="QGridLayout" >
+        <property name="margin" >
+         <number>3</number>
+        </property>
+        <property name="spacing" >
+         <number>6</number>
+        </property>
+        <item row="1" column="1" >
+         <widget class="QLabel" name="fileLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Filename</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QCheckBox" name="fileOutput" >
+          <property name="contextMenuPolicy" >
+           <enum>Qt::NoContextMenu</enum>
+          </property>
+          <property name="text" >
+           <string>File</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="4" >
+         <widget class="QSpinBox" name="HTTPPort" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>90</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="maximum" >
+           <number>65535</number>
+          </property>
+          <property name="minimum" >
+           <number>1</number>
+          </property>
+          <property name="singleStep" >
+           <number>1</number>
+          </property>
+          <property name="value" >
+           <number>8080</number>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="4" >
+         <widget class="QCheckBox" name="rawInput" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Dump raw input</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2" >
+         <widget class="QLineEdit" name="fileEdit" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="3" >
+         <widget class="QLabel" name="MMSHPortLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Port</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="1" >
+         <widget class="QLabel" name="MMSHLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Address</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="0" >
+         <widget class="QCheckBox" name="localOutput" >
+          <property name="text" >
+           <string>Play locally</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="0" >
+         <widget class="QCheckBox" name="MMSHOutput" >
+          <property name="text" >
+           <string>MMSH</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3" >
+         <widget class="QPushButton" name="fileSelectButton" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Browse</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="2" >
+         <widget class="QLineEdit" name="HTTPEdit" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QLabel" name="HTTPLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Address</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="3" >
+         <widget class="QLabel" name="HTTPPortLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Port</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="2" >
+         <widget class="QLineEdit" name="MMSHEdit" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QCheckBox" name="HTTPOutput" >
+          <property name="text" >
+           <string>HTTP</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="0" >
+         <widget class="QCheckBox" name="UDPOutput" >
+          <property name="text" >
+           <string>UDP</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="1" >
+         <widget class="QLabel" name="UDPLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Address</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="3" >
+         <widget class="QLabel" name="UDPPortLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Port</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="2" >
+         <widget class="QLineEdit" name="UDPEdit" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="4" >
+         <widget class="QSpinBox" name="MMSHPort" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>90</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="maximum" >
+           <number>65535</number>
+          </property>
+          <property name="minimum" >
+           <number>1</number>
+          </property>
+          <property name="value" >
+           <number>1234</number>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="4" >
+         <widget class="QSpinBox" name="UDPPort" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>90</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="maximum" >
+           <number>65535</number>
+          </property>
+          <property name="minimum" >
+           <number>1</number>
+          </property>
+          <property name="value" >
+           <number>1234</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="Encapsulation" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>5</hsizetype>
+       <vsizetype>0</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string>Encapsulation</string>
+     </property>
+     <layout class="QHBoxLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item>
+       <widget class="QRadioButton" name="TSMux" >
+        <property name="text" >
+         <string>MPEG-TS</string>
+        </property>
+        <property name="checked" >
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="PSMux" >
+        <property name="text" >
+         <string>MPEG-PS</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="MPEG1Mux" >
+        <property name="text" >
+         <string>MPEG 1</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="OggMux" >
+        <property name="text" >
+         <string>Ogg</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="ASFMux" >
+        <property name="text" >
+         <string>ASF</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="MP4Mux" >
+        <property name="text" >
+         <string>MP4</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="MOVMux" >
+        <property name="text" >
+         <string>MOV</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="WAVMux" >
+        <property name="text" >
+         <string>WAV</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RAWMux" >
+        <property name="text" >
+         <string>RAW</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2" >
+     <property name="title" >
+      <string>Transcoding</string>
+     </property>
+     <layout class="QHBoxLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item>
+       <layout class="QGridLayout" >
+        <property name="margin" >
+         <number>3</number>
+        </property>
+        <property name="spacing" >
+         <number>6</number>
+        </property>
+        <item row="1" column="5" >
+         <widget class="QSpinBox" name="aChannels" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="maximum" >
+           <number>10</number>
+          </property>
+          <property name="minimum" >
+           <number>1</number>
+          </property>
+          <property name="value" >
+           <number>2</number>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2" >
+         <widget class="QLabel" name="aBitrateLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Bitrate (kb/s)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="0" >
+         <widget class="QCheckBox" name="transcodeVideo" >
+          <property name="text" >
+           <string>Video</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QCheckBox" name="transcodeAudio" >
+          <property name="text" >
+           <string>Audio</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2" >
+         <widget class="QLabel" name="vBitrateLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Bitrate (kb/s)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QComboBox" name="aCodec" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QComboBox" name="vCodec" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="editable" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="5" >
+         <widget class="QComboBox" name="vScale" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="editable" >
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="4" >
+         <widget class="QLabel" name="s_2" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Channels</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="4" >
+         <widget class="QLabel" name="vScaleLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Scale</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QCheckBox" name="transcodeSubs" >
+          <property name="text" >
+           <string>Subtitles</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QComboBox" name="sCodec" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="2" colspan="4" >
+         <widget class="QCheckBox" name="sOverlay" >
+          <property name="enabled" >
+           <bool>true</bool>
+          </property>
+          <property name="text" >
+           <string>Overlay subtitles on the video</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="3" >
+         <widget class="QSpinBox" name="vBitrate" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="maximum" >
+           <number>8192</number>
+          </property>
+          <property name="minimum" >
+           <number>8</number>
+          </property>
+          <property name="value" >
+           <number>800</number>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3" >
+         <widget class="QSpinBox" name="aBitrate" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="maximum" >
+           <number>512</number>
+          </property>
+          <property name="minimum" >
+           <number>8</number>
+          </property>
+          <property name="value" >
+           <number>128</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_3" >
+     <property name="title" >
+      <string>Miscellaneous</string>
+     </property>
+     <layout class="QHBoxLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item>
+       <layout class="QGridLayout" >
+        <property name="margin" >
+         <number>3</number>
+        </property>
+        <property name="spacing" >
+         <number>6</number>
+        </property>
+        <item row="0" column="0" >
+         <widget class="QCheckBox" name="sap" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>SAP announce</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="3" >
+         <widget class="QLabel" name="sapGroupLabel" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+          <property name="text" >
+           <string>Group name</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="4" >
+         <widget class="QLineEdit" name="sapGroup" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="4" >
+         <widget class="QSpinBox" name="ttl" >
+          <property name="maximum" >
+           <number>255</number>
+          </property>
+          <property name="minimum" >
+           <number>1</number>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" colspan="2" >
+         <widget class="QLineEdit" name="sapName" >
+          <property name="enabled" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" colspan="2" >
+         <widget class="QCheckBox" name="soutAll" >
+          <property name="text" >
+           <string>Stream all elementary streams</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3" >
+         <widget class="QLabel" name="label_10" >
+          <property name="text" >
+           <string>Time-To-Live (TTL)</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_4" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>5</hsizetype>
+       <vsizetype>0</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string>Generated stream output string</string>
+     </property>
+     <layout class="QHBoxLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item>
+       <widget class="QLineEdit" name="mrlEdit" >
+        <property name="toolTip" >
+         <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Stream output string. This is automatically generated when you change the above settings, but you can update it manually.&lt;/p>&lt;/body>&lt;/html></string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cancelButton" >
+       <property name="text" >
+        <string>Cancel</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="okButton" >
+       <property name="text" >
+        <string>OK</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>sap</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>68</x>
+     <y>175</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>80</x>
+     <y>467</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>UDPLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>58</x>
+     <y>174</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>147</x>
+     <y>184</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>UDPEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>63</x>
+     <y>186</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>244</x>
+     <y>186</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>MMSHOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>MMSHLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>41</x>
+     <y>155</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>145</x>
+     <y>155</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>MMSHOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>MMSHEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>65</x>
+     <y>155</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>270</x>
+     <y>155</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>MMSHOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>MMSHPortLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>54</x>
+     <y>155</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>416</x>
+     <y>155</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>UDPPortLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>54</x>
+     <y>186</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>426</x>
+     <y>186</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>UDPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>UDPPort</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>38</x>
+     <y>186</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>549</x>
+     <y>186</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>MMSHOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>MMSHPort</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>51</x>
+     <y>155</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>549</x>
+     <y>155</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>sap</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>sapName</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>98</x>
+     <y>474</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>198</x>
+     <y>466</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>sap</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>sapGroupLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>41</x>
+     <y>465</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>335</x>
+     <y>472</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>sap</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>sapGroup</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>33</x>
+     <y>470</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>459</x>
+     <y>464</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>HTTPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>HTTPLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>49</x>
+     <y>105</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>155</x>
+     <y>117</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>HTTPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>HTTPEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>34</x>
+     <y>104</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>264</x>
+     <y>115</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>HTTPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>HTTPPortLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>26</x>
+     <y>108</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>425</x>
+     <y>114</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>HTTPOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>HTTPPort</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>67</x>
+     <y>104</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>543</x>
+     <y>114</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>fileOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>fileLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>108</x>
+     <y>92</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>120</x>
+     <y>95</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeVideo</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>vCodec</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>60</x>
+     <y>323</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>180</x>
+     <y>322</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeVideo</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>vBitrateLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>96</x>
+     <y>311</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>249</x>
+     <y>324</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeVideo</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>vScaleLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>27</x>
+     <y>319</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>463</x>
+     <y>322</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeVideo</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>vScale</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>26</x>
+     <y>322</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>567</x>
+     <y>327</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeSubs</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>sOverlay</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>44</x>
+     <y>378</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>336</x>
+     <y>376</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>sOverlay</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>transcodeSubs</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>404</x>
+     <y>374</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>92</x>
+     <y>386</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeSubs</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>sCodec</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>27</x>
+     <y>375</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>177</x>
+     <y>381</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeAudio</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>aCodec</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>40</x>
+     <y>353</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>133</x>
+     <y>346</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeAudio</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>aBitrateLabel</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>31</x>
+     <y>357</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>264</x>
+     <y>355</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeAudio</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>s_2</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>36</x>
+     <y>342</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>448</x>
+     <y>342</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeAudio</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>aChannels</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>26</x>
+     <y>343</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>574</x>
+     <y>347</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>fileOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>fileEdit</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>61</x>
+     <y>81</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>288</x>
+     <y>82</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>fileOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>fileSelectButton</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>25</x>
+     <y>88</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>443</x>
+     <y>86</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>fileOutput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>rawInput</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>25</x>
+     <y>79</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>552</x>
+     <y>90</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rawInput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>Encapsulation</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>579</x>
+     <y>79</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>271</x>
+     <y>225</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rawInput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>HTTPOutput</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>605</x>
+     <y>71</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>24</x>
+     <y>115</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rawInput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>groupBox_2</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>585</x>
+     <y>77</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>57</x>
+     <y>296</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rawInput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>groupBox_3</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>583</x>
+     <y>76</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>518</x>
+     <y>427</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rawInput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>UDPOutput</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>595</x>
+     <y>75</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>66</x>
+     <y>172</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>rawInput</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>MMSHOutput</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>485</x>
+     <y>92</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>46</x>
+     <y>141</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeVideo</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>vBitrate</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>28</x>
+     <y>322</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>365</x>
+     <y>316</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>transcodeAudio</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>aBitrate</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>28</x>
+     <y>349</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>370</x>
+     <y>352</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index d45adbd..632960b 100644 (file)
@@ -418,7 +418,8 @@ net_ReadInner( vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
     return i_total;
 
 error:
-    msg_Err( p_this, "Read error: %s", net_strerror (net_errno) );
+    if( errno != EINTR )
+        msg_Err( p_this, "Read error: %s", net_strerror (net_errno) );
     return i_total ? (ssize_t)i_total : -1;
 }
 
index 8bab246..7dc344e 100644 (file)
@@ -89,14 +89,14 @@ sout_transcode_t *streaming_ChainAddTranscode( sout_chain_t *p_chain,
     DECMALLOC_NULL( p_module, sout_module_t );
     MALLOC_NULL( TRAM, sout_transcode_t );
     p_module->i_type = SOUT_MOD_TRANSCODE;
-
+    memset( TRAM, 0, sizeof( sout_transcode_t ) );
     assert( !( b_soverlay && psz_scodec ) );
     if( psz_vcodec ) TRAM->psz_vcodec = strdup( psz_vcodec );
     if( psz_acodec ) TRAM->psz_acodec = strdup( psz_acodec );
     if( psz_scodec ) TRAM->psz_scodec = strdup( psz_scodec );
     TRAM->i_vb = i_vb; TRAM->i_ab = i_ab; TRAM->f_scale = f_scale;
     TRAM->i_channels = i_channels; TRAM->b_soverlay = b_soverlay;
-    if( TRAM->psz_additional ) TRAM->psz_additional = strdup( psz_additional );
+    if( psz_additional ) TRAM->psz_additional = strdup( psz_additional );
     TAB_APPEND( p_chain->i_modules, p_chain->pp_modules, p_module );
     return TRAM;
 }
@@ -353,7 +353,7 @@ vlc_bool_t streaming_ChainToGuiDesc( vlc_object_t *p_this,
 }
 
 #define HANDLE_GUI_URL( type, access ) if( pd->b_##type ) { \
-        streaming_DupAddChild( p_dup ); \
+        if( p_dup ) streaming_DupAddChild( p_dup ); \
         if( pd->i_##type > 0 ) \
         { \
             char *psz_url; \
@@ -379,6 +379,7 @@ void streaming_GuiDescToChain( vlc_object_t *p_obj, sout_chain_t *p_chain,
     /* Transcode */
     if( pd->psz_vcodec || pd->psz_acodec || pd->psz_scodec || pd->b_soverlay )
     {
+        fprintf( stderr, "382 vcodec %s\n", pd->psz_vcodec );
         streaming_ChainAddTranscode( p_chain, pd->psz_vcodec, pd->psz_acodec,
                                      pd->psz_scodec, pd->i_vb, pd->f_scale,
                                      pd->i_ab, pd->i_channels,
@@ -392,19 +393,19 @@ void streaming_GuiDescToChain( vlc_object_t *p_obj, sout_chain_t *p_chain,
     }
     if( pd->b_local )
     {
-        streaming_DupAddChild( p_dup );
-        streaming_ChainAddDisplay(  DUP_OR_CHAIN );
+        if( p_dup ) streaming_DupAddChild( p_dup );
+        streaming_ChainAddDisplay( DUP_OR_CHAIN );
     }
     if( pd->b_file )
     {
-        streaming_DupAddChild( p_dup );
+        if( p_dup ) streaming_DupAddChild( p_dup );
         streaming_ChainAddStd( DUP_OR_CHAIN, "file", pd->psz_mux,
                                pd->psz_file );
     }
     if( pd->b_udp )
     {
         sout_std_t *p_std;
-        streaming_DupAddChild( p_dup );
+        if( p_dup ) streaming_DupAddChild( p_dup );
         if( pd->i_udp > 0 )
         {
             char *psz_url;
@@ -434,17 +435,30 @@ void streaming_GuiDescToChain( vlc_object_t *p_obj, sout_chain_t *p_chain,
 /**********************************************************************
  * Create a sout string from a chain
  **********************************************************************/
-char * streaming_ChainToPsz( sout_chain_t *p_chain )
+static char * ChainToPsz( sout_chain_t *p_chain, vlc_bool_t b_root )
 {
-    int i;
+    int i, j;
     char psz_output[MAX_CHAIN];
     char psz_temp[MAX_CHAIN];
-    sprintf( psz_output, "#" );
+    if( b_root ) sprintf( psz_output, "#" );
+    else sprintf( psz_output, "" );
     for( i = 0 ; i< p_chain->i_modules; i++ )
     {
         sout_module_t *p_module = p_chain->pp_modules[i];
         switch( p_module->i_type )
         {
+        case SOUT_MOD_DUPLICATE:
+            CHAIN_APPEND( "duplicate{" );
+            for( j = 0 ; j < DUPM->i_children ; j ++ )
+            {
+                char *psz_child = ChainToPsz( DUPM->pp_children[j], VLC_FALSE);
+                fprintf(stderr, "child %s\n", psz_child);
+                CHAIN_APPEND( "dst=%s", psz_child );
+                free( psz_child );
+                if( j != DUPM->i_children - 1 ) CHAIN_APPEND( "," );
+            }
+            CHAIN_APPEND( "}" );
+            break;
         case SOUT_MOD_TRANSCODE:
             CHAIN_APPEND( "transcode{" );
             if( TRAM->psz_vcodec )
@@ -476,10 +490,16 @@ char * streaming_ChainToPsz( sout_chain_t *p_chain )
             CHAIN_APPEND( "std{access=%s,url=%s,mux=%s}", STDM->psz_access,
                           STDM->psz_url, STDM->psz_mux );
         }
+        if( i != p_chain->i_modules - 1 ) CHAIN_APPEND( ":" );
     }
     return strdup( psz_output );
 }
 
+char * streaming_ChainToPsz( sout_chain_t *p_chain )
+{
+    return ChainToPsz( p_chain, VLC_TRUE );
+}
+
 /**********************************************************************
  * Handle streaming profiles
  **********************************************************************/