Commit ad1639f5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Try to allocate the DShow device list and the buttons ONLY when switching to...

Try to allocate the DShow device list and the buttons ONLY when switching to it and not all the time you open a file.
parent 5c66f395
...@@ -584,19 +584,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -584,19 +584,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
if( module_Exists( p_intf, "dshow" ) ){ if( module_Exists( p_intf, "dshow" ) ){
addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" ); addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" );
/* dshow Main */ devLayout = dshowDevLayout;
int line = 0;
module_config_t *p_config =
config_FindConfig( VLC_OBJECT(p_intf), "dshow-vdev" );
vdevDshowW = new StringListConfigControl(
VLC_OBJECT(p_intf), p_config, this, false, dshowDevLayout, line );
line++;
p_config = config_FindConfig( VLC_OBJECT(p_intf), "dshow-adev" );
adevDshowW = new StringListConfigControl(
VLC_OBJECT(p_intf), p_config, this, false, dshowDevLayout, line );
line++;
/* dshow Properties */ /* dshow Properties */
QLabel *dshowVSizeLabel = new QLabel( qtr( "Video size" ) ); QLabel *dshowVSizeLabel = new QLabel( qtr( "Video size" ) );
dshowPropLayout->addWidget( dshowVSizeLabel, 0, 0 ); dshowPropLayout->addWidget( dshowVSizeLabel, 0, 0 );
...@@ -1074,6 +1062,20 @@ void CaptureOpenPanel::updateButtons() ...@@ -1074,6 +1062,20 @@ void CaptureOpenPanel::updateButtons()
bdaBandLabel->show(); bdaBandLabel->show();
} }
break; break;
case DSHOW_DEVICE:
/* dshow Main */
int line = 0;
module_config_t *p_config =
config_FindConfig( VLC_OBJECT(p_intf), "dshow-vdev" );
vdevDshowW = new StringListConfigControl(
VLC_OBJECT(p_intf), p_config, this, false, devLayout, line );
line++;
p_config = config_FindConfig( VLC_OBJECT(p_intf), "dshow-adev" );
adevDshowW = new StringListConfigControl(
VLC_OBJECT(p_intf), p_config, this, false, devLayout, line );
line++;
break;
#else #else
case DVB_DEVICE: case DVB_DEVICE:
if( dvbs->isChecked() ) dvbFreq->setSuffix(" kHz"); if( dvbs->isChecked() ) dvbFreq->setSuffix(" kHz");
......
...@@ -187,6 +187,7 @@ private: ...@@ -187,6 +187,7 @@ private:
QComboBox *bdaBandBox; QComboBox *bdaBandBox;
StringListConfigControl *vdevDshowW, *adevDshowW; StringListConfigControl *vdevDshowW, *adevDshowW;
QLineEdit *dshowVSizeLine; QLineEdit *dshowVSizeLine;
QGridLayout * devLayout;
#else #else
QRadioButton *dvbs, *dvbt, *dvbc; QRadioButton *dvbs, *dvbt, *dvbc;
QSpinBox *v4lFreq, *pvrFreq, *pvrBitr; QSpinBox *v4lFreq, *pvrFreq, *pvrBitr;
......
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