]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/sout.cpp
Missing header (was included by ncurses.h in previous releases)
[vlc] / modules / gui / qt4 / dialogs / sout.cpp
index f9cd7fc12da795f4723ee5cd1ede46a495f6efeb..c87ac2b8ac0ae358931dd6255875004552d8c9a4 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * sout.cpp : Stream output dialog ( old-style )
  ****************************************************************************
- * Copyright ( C ) 2006 the VideoLAN team
+ * Copyright (C) 2006 the VideoLAN team
  * Copyright (C) 2007 Société des arts technologiques
  * Copyright (C) 2007 Savoir-faire Linux
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include "dialogs/sout.hpp"
 #include <vlc_streaming.h>
 
-#include <iostream>
 #include <QString>
 #include <QFileDialog>
 
+SoutDialog* SoutDialog::instance = NULL;
+
 SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
                      bool _transcode_only ) : QVLCDialog( parent,  _p_intf )
 {
@@ -135,11 +139,6 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf,
     if( b_transcode_only ) toggleSout();
 }
 
-QString SoutDialog::getMrl()
-{
-    return mrl;
-}
-
 void SoutDialog::fileBrowse()
 {
     ui.tabWidget->setTabEnabled( 0,false );
@@ -177,7 +176,7 @@ void SoutDialog::setSTranscodeOptions( bool b_trans )
 
 void SoutDialog::setRawOptions( bool b_raw )
 {
-    if ( b_raw )
+    if( b_raw )
     {
         ui.tabWidget->setDisabled( true );
     }
@@ -207,6 +206,7 @@ void SoutDialog::setOptions()
     }
 
     /* ADD HERE the profiles you want and need */
+    /* FIXME */
     if( profileString == "IPod" ) setProfile( MP4, true, "mp4a", true, "mp4v" )
     else if( profileString == "XBox" ) setProfile( ASF, true, "wma", true, "WMV2" )
 
@@ -258,7 +258,7 @@ void SoutDialog::updateMRL()
 {
     sout_gui_descr_t sout;
     memset( &sout, 0, sizeof( sout_gui_descr_t ) );
-    int counter = 0;
+    unsigned int counter = 0;
 
     sout.b_local = ui.localOutput->isChecked();
     sout.b_file = ui.fileOutput->isChecked();
@@ -299,7 +299,7 @@ void SoutDialog::updateMRL()
     if ( sout.b_mms ) counter++ ;
     if ( sout.b_rtp ) counter++ ;
     if ( sout.b_udp ) counter ++;
-    if ( sout.b_icecast ) counter ++; 
+    if ( sout.b_icecast ) counter ++;
 
 #define SMUX( x, txt ) if( ui.x->isChecked() ) sout.psz_mux = strdup( txt );
     SMUX( PSMux, "ps" );
@@ -312,6 +312,7 @@ void SoutDialog::updateMRL()
     SMUX( WAVMux, "wav" );
     SMUX( RAWMux, "raw" );
     SMUX( FLVMux, "flv" );
+    SMUX( MKVMux, "mkv" );
 
     bool trans = false;
     bool more = false;
@@ -359,12 +360,7 @@ void SoutDialog::updateMRL()
     {
 
 #define ISMORE() if ( more ) mrl.append( "," );
-
-#define ATLEASTONE() \
-        if ( counter > 1 ) \
-        { \
-            mrl.append( "dst=" ); \
-        }
+#define ATLEASTONE() if ( counter ) mrl.append( "dst=" );
 
 #define CHECKMUX() \
        if( sout.psz_mux ) \
@@ -373,7 +369,6 @@ void SoutDialog::updateMRL()
          mrl.append( sout.psz_mux ); \
        }
 
-
         if ( trans )
         {
             mrl.append( ":" );
@@ -383,7 +378,7 @@ void SoutDialog::updateMRL()
             mrl = ":sout=#";
         }
 
-        if ( counter > 1 )
+        if ( counter )
         {
             mrl.append( "duplicate{" );
         }
@@ -474,7 +469,12 @@ void SoutDialog::updateMRL()
             more = true;
         }
 
-        if ( counter > 1 )
+        if( sout.b_icecast )
+        {
+            // TODO
+        }
+
+        if ( counter )
         {
             mrl.append( "}" );
         }