[vlc-devel] commit: Try to allocate the DShow device list and the buttons ONLY when switching to it and not all the time you open a file . (Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Aug 7 21:34:13 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug  7 12:36:19 2008 -0700| [ad1639f5f0fd99ab6add7aa3b15d9fa47b1bcc33] | committer: Jean-Baptiste Kempf 

Try to allocate the DShow device list and the buttons ONLY when switching to it and not all the time you open a file.

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

 modules/gui/qt4/components/open_panels.cpp |   28 +++++++++++++++-------------
 modules/gui/qt4/components/open_panels.hpp |    1 +
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 2f88085..0771760 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -584,19 +584,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     if( module_Exists( p_intf, "dshow" ) ){
     addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" );
 
-    /* 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, 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++;
-
+    devLayout = dshowDevLayout;
     /* dshow Properties */
     QLabel *dshowVSizeLabel = new QLabel( qtr( "Video size" ) );
     dshowPropLayout->addWidget( dshowVSizeLabel, 0, 0 );
@@ -1074,6 +1062,20 @@ void CaptureOpenPanel::updateButtons()
             bdaBandLabel->show();
         }
         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
     case DVB_DEVICE:
         if( dvbs->isChecked() ) dvbFreq->setSuffix(" kHz");
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index e2de731..f63a42a 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -187,6 +187,7 @@ private:
     QComboBox *bdaBandBox;
     StringListConfigControl *vdevDshowW, *adevDshowW;
     QLineEdit *dshowVSizeLine;
+    QGridLayout * devLayout;
 #else
     QRadioButton *dvbs, *dvbt, *dvbc;
     QSpinBox  *v4lFreq, *pvrFreq, *pvrBitr;




More information about the vlc-devel mailing list