[vlc-devel] commit: Qt4: Open dialog, various changes on DVB opening on Linux. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Tue Apr 28 00:08:33 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Apr 28 00:07:45 2009 +0200| [1ed06e12f380cd79cf13f9b4509cddfc086a1a90] | committer: Jean-Baptiste Kempf 

Qt4: Open dialog, various changes on DVB opening on Linux.

As per request by Laurent.
DVB on linux and windows should be a bit more similar.

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

 modules/gui/qt4/components/open_panels.cpp |   45 ++++++++++++++++++++++++++--
 modules/gui/qt4/components/open_panels.hpp |    3 +-
 2 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index b452ad7..bf14e7f 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -999,10 +999,11 @@ void CaptureOpenPanel::initialize()
     dvbFreq = new QSpinBox;
     dvbFreq->setAlignment( Qt::AlignRight );
     dvbFreq->setSuffix(" kHz");
+    dvbFreq->setSingleStep( 1000 );
     setSpinBoxFreq( dvbFreq  );
     dvbPropLayout->addWidget( dvbFreq, 0, 1 );
 
-    QLabel *dvbSrateLabel = new QLabel( qtr( "Transponder symbol rate" ) );
+    dvbSrateLabel = new QLabel( qtr( "Transponder symbol rate" ) );
     dvbPropLayout->addWidget( dvbSrateLabel, 1, 0 );
 
     dvbSrate = new QSpinBox;
@@ -1010,6 +1011,24 @@ void CaptureOpenPanel::initialize()
     dvbSrate->setSuffix(" kHz");
     setSpinBoxFreq( dvbSrate );
     dvbPropLayout->addWidget( dvbSrate, 1, 1 );
+
+    dvbBandLabel = new QLabel( qtr( "Bandwidth" ) );
+    dvbPropLayout->addWidget( dvbBandLabel, 2, 0 );
+
+    dvbBandBox = new QComboBox;
+    /* This doesn't work since dvb-bandwidth doesn't seem to be a
+       list of Integers
+       setfillVLCConfigCombo( "dvb-bandwidth", p_intf, bdaBandBox );
+     */
+    dvbBandBox->addItem( qtr( "Auto" ), 0 );
+    dvbBandBox->addItem( qtr( "6 MHz" ), 6 );
+    dvbBandBox->addItem( qtr( "7 MHz" ), 7 );
+    dvbBandBox->addItem( qtr( "8 MHz" ), 8 );
+    dvbPropLayout->addWidget( dvbBandBox, 2, 1 );
+
+    dvbBandLabel->hide();
+    dvbBandBox->hide();
+
     dvbPropLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding ),
             2, 0, 2, 1 );
 
@@ -1084,7 +1103,7 @@ void CaptureOpenPanel::updateMRL()
         mrl += " :dvb-frequency=" + QString::number( bdaFreq->value() );
         if( bdas->isChecked() || bdac->isChecked() )
             mrl += " :dvb-srate=" + QString::number( bdaSrate->value() );
-        else if( bdat->isChecked() )
+        else if( bdat->isChecked() || bdaa->isChecked() )
             mrl += " :dvb-bandwidth=" +
                 QString::number( bdaBandBox->itemData(
                     bdaBandBox->currentIndex() ).toInt() );
@@ -1142,7 +1161,13 @@ void CaptureOpenPanel::updateMRL()
         fileList << "dvb://";
         mrl += " :dvb-adapter=" + QString::number( dvbCard->value() );
         mrl += " :dvb-frequency=" + QString::number( dvbFreq->value() );
-        mrl += " :dvb-srate=" + QString::number( dvbSrate->value() );
+        if( dvbs->isChecked() || dvbc->isChecked() )
+            mrl += " :dvb-srate=" + QString::number( dvbSrate->value() );
+        else if( dvbt->isChecked() )
+            mrl += " :dvb-bandwidth=" +
+                QString::number( dvbBandBox->itemData(
+                    dvbBandBox->currentIndex() ).toInt() );
+
         break;
 #endif
     case SCREEN_DEVICE:
@@ -1201,6 +1226,20 @@ void CaptureOpenPanel::updateButtons()
         break;
 #else
     case DVB_DEVICE:
+        if( dvbs->isChecked() || dvbc->isChecked() )
+        {
+            dvbSrate->show();
+            dvbSrateLabel->show();
+            dvbBandBox->hide();
+            dvbBandLabel->hide();
+        }
+        else if( dvbt->isChecked() )
+        {
+            dvbSrate->hide();
+            dvbSrateLabel->hide();
+            dvbBandBox->show();
+            dvbBandLabel->show();
+        }
         if( dvbs->isChecked() ) dvbFreq->setSuffix(" kHz");
         if( dvbc->isChecked() || dvbt->isChecked() ) dvbFreq->setSuffix(" Hz");
         break;
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index d4f9bf7..6a28af9 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -201,11 +201,12 @@ private:
     QLineEdit *dshowVSizeLine;
 #else
     QRadioButton *dvbs, *dvbt, *dvbc;
+    QLabel *dvbBandLabel, *dvbSrateLabel;
     QSpinBox  *v4lFreq, *pvrFreq, *pvrBitr;
     QLineEdit *v4lVideoDevice, *v4lAudioDevice;
     QLineEdit *v4l2VideoDevice, *v4l2AudioDevice;
     QLineEdit *pvrDevice, *pvrRadioDevice;
-    QComboBox *v4lNormBox, *v4l2StdBox, *pvrNormBox;
+    QComboBox *v4lNormBox, *v4l2StdBox, *pvrNormBox, *dvbBandBox;
     QSpinBox *dvbCard, *dvbFreq, *dvbSrate;
     QSpinBox *jackChannels, *jackCaching;
     QCheckBox *jackPace, *jackConnect;




More information about the vlc-devel mailing list