Commit 1ed06e12 authored by Jean-Baptiste Kempf's avatar 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.
parent fce3f85b
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment