[vlc-devel] commit: Ensure cone is hidden before video is shown in qt4 interface ( Joseph Tulou )

git version control git at videolan.org
Fri Feb 20 09:39:44 CET 2009


vlc | branch: master | Joseph Tulou <brezhoneg1 at yahoo.fr> | Sun Feb 15 11:36:52 2009 +0100| [7353924f5580954f23e4808dee34b73813c6a926] | committer: Jean-Baptiste Kempf 

Ensure cone is hidden before video is shown in qt4 interface

Signed-off-by: Jean-Baptiste Kempf <jb at sasmira.jbkempf.com>

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

 modules/gui/qt4/components/interface_widgets.cpp |    6 ------
 modules/gui/qt4/components/interface_widgets.hpp |    3 ---
 modules/gui/qt4/main_interface.cpp               |    9 +++++++++
 modules/gui/qt4/main_interface.hpp               |    1 +
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 3f40b2f..e9a26db 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -76,11 +76,6 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
        Widgets with this attribute set do not participate in composition
        management */
     setAttribute( Qt::WA_PaintOnScreen, true );
-
-    /* The core can ask through a callback to show the video. */
-    connect( this, SIGNAL(askVideoWidgetToShow( unsigned int, unsigned int)),
-             this, SLOT(SetSizing(unsigned int, unsigned int )),
-             Qt::BlockingQueuedConnection );
 }
 
 void VideoWidget::paintEvent(QPaintEvent *ev)
@@ -112,7 +107,6 @@ WId VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
         *pi_height = size().height();
     }
 
-    emit askVideoWidgetToShow( *pi_width, *pi_height );
     if( p_vout )
     {
         msg_Dbg( p_intf, "embedded video already in use" );
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index 3b7d01b..77f2326 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -80,9 +80,6 @@ private:
 
     QSize videoSize;
 
-signals:
-    void askVideoWidgetToShow( unsigned int, unsigned int );
-
 public slots:
     void SetSizing( unsigned int, unsigned int );
 
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index ada35f2..06aaab0 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -214,9 +214,15 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
              this, SLOT(releaseVideoSlot( void )), Qt::BlockingQueuedConnection );
 
     if( videoWidget )
+    {
         CONNECT( this, askVideoToResize( unsigned int, unsigned int ),
                  videoWidget, SetSizing( unsigned int, unsigned int ) );
 
+        connect( this, SIGNAL(askVideoToShow( unsigned int, unsigned int)),
+             videoWidget, SLOT(SetSizing(unsigned int, unsigned int )),
+             Qt::BlockingQueuedConnection );
+    }
+
     CONNECT( this, askUpdate(), this, doComponentsUpdate() );
 
     /* Size and placement of interface */
@@ -662,6 +668,9 @@ WId MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
         else
             bgWasVisible = false;
 
+        /* ask videoWidget to show */
+        emit askVideoToShow( *pi_width, *pi_height );
+
         /* Consider the video active now */
         videoIsActive = true;
 
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 95e0a78..c84df94 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -174,6 +174,7 @@ private slots:
 signals:
     void askReleaseVideo( );
     void askVideoToResize( unsigned int, unsigned int );
+    void askVideoToShow( unsigned int, unsigned int );
     void askVideoToToggle();
     void askBgWidgetToToggle();
     void askUpdate();




More information about the vlc-devel mailing list