]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/convert.cpp
Add build date/time in the version infos
[vlc] / modules / gui / qt4 / dialogs / convert.cpp
index 5a989ffddb3490b11c1d1f7d2c03db5aa6bffbb5..cd2c8a8ab59466955bcc29668c1e838ba451fe42 100644 (file)
 #include <QCheckBox>
 
 ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
-                              QString inputMRL )
+                              const QString& inputMRL )
               : QVLCDialog( parent, _p_intf )
 {
     setWindowTitle( qtr( "Convert" ) );
+    setWindowRole( "vlc-convert" );
 
     QGridLayout *mainLayout = new QGridLayout( this );
     SoutInputBox *inputBox = new SoutInputBox( this );
@@ -54,7 +55,7 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
     QGroupBox *destBox = new QGroupBox( qtr( "Destination" ) );
     QGridLayout *destLayout = new QGridLayout( destBox );
 
-    QLabel *destLabel = new QLabel( qtr( "Target file:" ) );
+    QLabel *destLabel = new QLabel( qtr( "Destination file:" ) );
     destLayout->addWidget( destLabel, 0, 0);
 
     fileLine = new QLineEdit;
@@ -80,11 +81,14 @@ ConvertDialog::ConvertDialog( QWidget *parent, intf_thread_t *_p_intf,
     QGridLayout *settingLayout = new QGridLayout( settingBox );
 
     profile = new VLCProfileSelector( this );
-    settingLayout->addWidget( profile, 0, 0 );
+    settingLayout->addWidget( profile, 0, 0, 1, -1 );
 
     deinterBox = new QCheckBox( qtr( "Deinterlace" ) );
     settingLayout->addWidget( deinterBox, 1, 0 );
 
+    dumpBox = new QCheckBox( qtr( "Dump raw input" ) );
+    settingLayout->addWidget( dumpBox, 1, 1 );
+
     mainLayout->addWidget( settingBox, 3, 0, 1, -1  );
 
     /* Buttons */
@@ -119,17 +123,25 @@ void ConvertDialog::close()
 {
     hide();
 
-    mrl = "sout=#" + profile->getTranscode();
-    if( deinterBox->isChecked() )
+    if( dumpBox->isChecked() )
     {
-        mrl.remove( '}' );
-        mrl += ",deinterlace}";
+        mrl = "demux=dump :demuxdump-file=" + fileLine->text();
     }
-    mrl += ":duplicate{";
-    if( displayBox->isChecked() ) mrl += "dst=display,";
-    mrl += "dst=std{access=file,mux=" + profile->getMux() +
+    else
+    {
+        mrl = "sout=#" + profile->getTranscode();
+        if( deinterBox->isChecked() )
+        {
+            mrl.remove( '}' );
+            mrl += ",deinterlace}";
+        }
+        mrl += ":duplicate{";
+        if( displayBox->isChecked() ) mrl += "dst=display,";
+        mrl += "dst=std{access=file,mux=" + profile->getMux() +
             ",dst='" + fileLine->text() + "'}";
+    }
 
-    msg_Dbg( p_intf, "Transcode MRL: %s", qtu( mrl ) );
+    msg_Warn( p_intf, "Transcode MRL: %s", qtu( mrl ) );
     accept();
 }
+