Commit 57eb2fb1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Go and check the configurations values only when needed.

parent ad1639f5
...@@ -644,7 +644,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -644,7 +644,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
bdaPropLayout->addWidget( bdaBandLabel, 2, 0 ); bdaPropLayout->addWidget( bdaBandLabel, 2, 0 );
bdaBandBox = new QComboBox; bdaBandBox = new QComboBox;
setfillVLCConfigCombo( "dvb-bandwidth", p_intf, bdaBandBox );
bdaPropLayout->addWidget( bdaBandBox, 2, 1 ); bdaPropLayout->addWidget( bdaBandBox, 2, 1 );
bdaBandLabel->hide(); bdaBandLabel->hide();
...@@ -689,7 +688,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -689,7 +688,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
v4l2PropLayout->addWidget( v4l2StdLabel, 0 , 0 ); v4l2PropLayout->addWidget( v4l2StdLabel, 0 , 0 );
v4l2StdBox = new QComboBox; v4l2StdBox = new QComboBox;
setfillVLCConfigCombo( "v4l2-standard", p_intf, v4l2StdBox );
v4l2PropLayout->addWidget( v4l2StdBox, 0 , 1 ); v4l2PropLayout->addWidget( v4l2StdBox, 0 , 1 );
v4l2PropLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding ), v4l2PropLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding ),
1, 0, 3, 1 ); 1, 0, 3, 1 );
...@@ -724,7 +722,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -724,7 +722,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
v4lPropLayout->addWidget( v4lNormLabel, 0 , 0 ); v4lPropLayout->addWidget( v4lNormLabel, 0 , 0 );
v4lNormBox = new QComboBox; v4lNormBox = new QComboBox;
setfillVLCConfigCombo( "v4l-norm", p_intf, v4lNormBox );
v4lPropLayout->addWidget( v4lNormBox, 0 , 1 ); v4lPropLayout->addWidget( v4lNormBox, 0 , 1 );
QLabel *v4lFreqLabel = new QLabel( qtr( "Frequency" ) ); QLabel *v4lFreqLabel = new QLabel( qtr( "Frequency" ) );
...@@ -823,7 +820,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -823,7 +820,6 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
pvrPropLayout->addWidget( pvrNormLabel, 0, 0 ); pvrPropLayout->addWidget( pvrNormLabel, 0, 0 );
pvrNormBox = new QComboBox; pvrNormBox = new QComboBox;
setfillVLCConfigCombo( "pvr-norm", p_intf, pvrNormBox );
pvrPropLayout->addWidget( pvrNormBox, 0, 1 ); pvrPropLayout->addWidget( pvrNormBox, 0, 1 );
QLabel *pvrFreqLabel = new QLabel( qtr( "Frequency" ) ); QLabel *pvrFreqLabel = new QLabel( qtr( "Frequency" ) );
...@@ -1063,23 +1059,35 @@ void CaptureOpenPanel::updateButtons() ...@@ -1063,23 +1059,35 @@ void CaptureOpenPanel::updateButtons()
} }
break; break;
case DSHOW_DEVICE: case DSHOW_DEVICE:
/* dshow Main */ {
int line = 0; /* dshow Main */
module_config_t *p_config = int line = 0;
config_FindConfig( VLC_OBJECT(p_intf), "dshow-vdev" ); module_config_t *p_config =
vdevDshowW = new StringListConfigControl( config_FindConfig( VLC_OBJECT(p_intf), "dshow-vdev" );
VLC_OBJECT(p_intf), p_config, this, false, devLayout, line ); vdevDshowW = new StringListConfigControl(
line++; VLC_OBJECT(p_intf), p_config, this, false, devLayout, line );
line++;
p_config = config_FindConfig( VLC_OBJECT(p_intf), "dshow-adev" );
adevDshowW = new StringListConfigControl( p_config = config_FindConfig( VLC_OBJECT(p_intf), "dshow-adev" );
VLC_OBJECT(p_intf), p_config, this, false, devLayout, line ); adevDshowW = new StringListConfigControl(
line++; VLC_OBJECT(p_intf), p_config, this, false, devLayout, line );
break; line++;
}
bvreak;
#else #else
case DVB_DEVICE: case DVB_DEVICE:
if( dvbs->isChecked() ) dvbFreq->setSuffix(" kHz"); if( dvbs->isChecked() ) dvbFreq->setSuffix(" kHz");
if( dvbc->isChecked() || dvbt->isChecked() ) dvbFreq->setSuffix(" Hz"); if( dvbc->isChecked() || dvbt->isChecked() ) dvbFreq->setSuffix(" Hz");
setfillVLCConfigCombo( "dvb-bandwidth", p_intf, bdaBandBox );
break;
case PVR_DEVICE:
setfillVLCConfigCombo( "pvr-norm", p_intf, pvrNormBox );
break;
case V4L_DEVICE:
setfillVLCConfigCombo( "v4l-norm", p_intf, v4lNormBox );
break;
case V4L2_DEVICE:
setfillVLCConfigCombo( "v4l2-standard", p_intf, v4l2StdBox );
break; break;
#endif #endif
case SCREEN_DEVICE: case SCREEN_DEVICE:
......
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