[vlc-commits] Qt: update DVD title/chapter syntax, add it for BD

Rémi Denis-Courmont git at videolan.org
Wed Nov 23 18:33:07 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 23 19:32:08 2011 +0200| [4f75c7f0a8fbdb6dcff308b34174af8be713b384] | committer: Rémi Denis-Courmont

Qt: update DVD title/chapter syntax, add it for BD

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f75c7f0a8fbdb6dcff308b34174af8be713b384
---

 modules/gui/qt4/components/open_panels.cpp |   38 ++++++++++++++-------------
 1 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index cd75fb6..daef241 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -505,38 +505,40 @@ void DiscOpenPanel::updateMRL()
     else
         discPath = ui.deviceCombo->currentText();
 
-    /* CDDAX and VCDX not implemented. TODO ? No. */
+    /* MRL scheme */
     /* DVD */
     if( ui.dvdRadioButton->isChecked() ) {
         if( !ui.dvdsimple->isChecked() )
-            mrl = "dvd://" LOCALHOST + discPath;
+            mrl = "dvd://" LOCALHOST;
         else
             mrl = "dvdsimple://" LOCALHOST + discPath;
+    } else if ( ui.bdRadioButton->isChecked() )
+        mrl = "bluray://" LOCALHOST;
+    /* VCD */
+    else if ( ui.vcdRadioButton->isChecked() )
+        mrl = "vcd://" LOCALHOST;
+    /* CDDA */
+    else
+        mrl = "cdda://" LOCALHOST;
 
-        if ( ui.titleSpin->value() > 0 ) {
-            mrl += QString("@%1").arg( ui.titleSpin->value() );
-            if ( ui.chapterSpin->value() > 0 ) {
+    mrl += discPath;
+
+    /* Title/chapter encoded in MRL */
+    if( ui.titleSpin->value() > 0 ) {
+        if( ui.dvdRadioButton->isChecked() || ui.bdRadioButton->isChecked() ) {
+            mrl += QString("#%1").arg( ui.titleSpin->value() );
+            if ( ui.chapterSpin->value() > 0 )
                 mrl+= QString(":%1").arg( ui.chapterSpin->value() );
-            }
         }
-    } else if ( ui.bdRadioButton->isChecked() ) {
-        mrl = "bluray://" LOCALHOST + discPath;
-
-    /* VCD */
-    } else if ( ui.vcdRadioButton->isChecked() ) {
-        mrl = "vcd://" LOCALHOST + discPath;
-
-        if( ui.titleSpin->value() > 0 )
+        else if ( ui.vcdRadioButton->isChecked() )
             mrl += QString("@%1").arg( ui.titleSpin->value() );
-
-    /* CDDA */
-    } else {
-        mrl = "cdda://" LOCALHOST + discPath;
     }
+
     emit methodChanged( "disc-caching" );
 
     fileList << mrl; mrl = "";
 
+    /* Input item options */
     if ( ui.dvdRadioButton->isChecked() || ui.vcdRadioButton->isChecked() )
     {
         if ( ui.audioSpin->value() >= 0 ) {



More information about the vlc-commits mailing list