[vlc-commits] Qt4: add modulations for DVB-S2

Rémi Denis-Courmont git at videolan.org
Sun Mar 27 13:10:15 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 27 14:09:40 2011 +0300| [695b9cd7cf86614385c5a9e3f7e628900b28d82f] | committer: Rémi Denis-Courmont

Qt4: add modulations for DVB-S2

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

 modules/gui/qt4/components/open_panels.cpp |   37 ++++++++++++++++++----------
 modules/gui/qt4/components/open_panels.hpp |    2 +-
 2 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index f3fec1e..56910e7 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -992,16 +992,25 @@ void CaptureOpenPanel::initialize()
     dvbPropLayout->addWidget( dvbModLabel, 2, 0 );
 
     dvbQamBox = new QComboBox;
-    dvbQamBox->addItem( qtr( "Automatic" ), 0 );
-    dvbQamBox->addItem( "256-QAM", 256 );
-    dvbQamBox->addItem( "128-QAM", 128 );
-    dvbQamBox->addItem( "64-QAM", 64 );
-    dvbQamBox->addItem( "32-QAM", 32 );
-    dvbQamBox->addItem( "16-QAM", 16 );
+    dvbQamBox->addItem( qtr( "Automatic" ), qfu("QAM") );
+    dvbQamBox->addItem( "256-QAM", qfu("256QAM") );
+    dvbQamBox->addItem( "128-QAM", qfu("128QAM") );
+    dvbQamBox->addItem( "64-QAM", qfu("64QAM") );
+    dvbQamBox->addItem( "32-QAM", qfu("32QAM") );
+    dvbQamBox->addItem( "16-QAM", qfu("16QAM") );
     dvbPropLayout->addWidget( dvbQamBox, 2, 1 );
 
+    dvbPskBox = new QComboBox;
+    dvbPskBox->addItem( "QPSK", qfu("QPSK") );
+    dvbPskBox->addItem( "DQPSK", qfu("DQPSK") );
+    dvbPskBox->addItem( "8-PSK", qfu("8PSK") );
+    dvbPskBox->addItem( "16-APSK", qfu("16APSK") );
+    dvbPskBox->addItem( "32-APSK", qfu("32APSK") );
+    dvbPropLayout->addWidget( dvbPskBox, 2, 1 );
+
     dvbModLabel->hide();
     dvbQamBox->hide();
+    dvbPskBox->hide();
 
     dvbBandLabel = new QLabel( qtr( "Bandwidth" ) );
     dvbPropLayout->addWidget( dvbBandLabel, 2, 0 );
@@ -1024,6 +1033,7 @@ void CaptureOpenPanel::initialize()
     CuMRL( dvbFreq, valueChanged ( int ) );
     CuMRL( dvbSrate, valueChanged ( int ) );
     CuMRL( dvbQamBox, currentIndexChanged ( int ) );
+    CuMRL( dvbPskBox, currentIndexChanged ( int ) );
     CuMRL( dvbBandBox, currentIndexChanged ( int ) );
 
     BUTTONACT( dvbc, updateButtons() );
@@ -1153,13 +1163,11 @@ void CaptureOpenPanel::updateMRL()
         mrl += "frequency=" + QString::number( dvbFreq->value() );
 
         if( dvbc->isChecked() || cqam->isChecked() )
-        {
-            unsigned qam =
-                dvbQamBox->itemData( dvbQamBox->currentIndex() ).toInt();
-            if( qam != 0 )
-                mrl += ":modulation=" + QString::number( qam ) + "QAM";
-            mrl += ":srate=" + QString::number( dvbSrate->value() );
-        }
+            mrl += ":modulation="
+                + dvbQamBox->itemData( dvbQamBox->currentIndex() ).toString();
+        if( dvbs2->isChecked() )
+            mrl += ":modulation="
+                + dvbPskBox->itemData( dvbPskBox->currentIndex() ).toString();
         if( dvbc->isChecked() || dvbs->isChecked() || dvbs2->isChecked() )
             mrl += ":srate=" + QString::number( dvbSrate->value() );
         if( dvbt->isChecked() )
@@ -1205,6 +1213,7 @@ void CaptureOpenPanel::updateButtons()
         dvbSrate->hide();
         dvbSrateLabel->hide();
         dvbQamBox->hide();
+        dvbPskBox->hide();
         dvbModLabel->hide();
         dvbBandBox->hide();
         dvbBandLabel->hide();
@@ -1225,6 +1234,8 @@ void CaptureOpenPanel::updateButtons()
         {
             dvbSrate->show();
             dvbSrateLabel->show();
+            dvbPskBox->show();
+            dvbModLabel->show();
         }
         else if( dvbt->isChecked() )
         {
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index 063d163..197d94d 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -215,7 +215,7 @@ private:
 #endif
     QRadioButton *dvbc, *dvbs, *dvbs2, *dvbt, *atsc, *cqam;
     QLabel *dvbBandLabel, *dvbSrateLabel, *dvbModLabel;
-    QComboBox *dvbQamBox, *dvbBandBox;
+    QComboBox *dvbQamBox, *dvbPskBox, *dvbBandBox;
     QSpinBox *dvbCard, *dvbFE, *dvbFreq, *dvbSrate;
     QDoubleSpinBox *screenFPS;
 



More information about the vlc-commits mailing list