X-Git-Url: https://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fcomponents%2Fvideo_widget.cpp;h=e05d1c0c7fde75fca76293179885dd50513ac3bf;hp=9b1ae8ccebba7f2085db686148866a0b6654c7fb;hb=197dcf8234603c3e21c37d056b2a225fc48ff8f1;hpb=c9f5dbcf676286c75add27c56c60aed802c0e916 diff --git a/modules/gui/qt4/components/video_widget.cpp b/modules/gui/qt4/components/video_widget.cpp index 9b1ae8cceb..e05d1c0c7f 100644 --- a/modules/gui/qt4/components/video_widget.cpp +++ b/modules/gui/qt4/components/video_widget.cpp @@ -26,6 +26,7 @@ #include "qt4.hpp" #include "components/video_widget.hpp" #include "main_interface.hpp" +#include "input_manager.hpp" #include #define ICON_SIZE 128 @@ -57,6 +58,10 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i, bool _always ) : QFrame( NULL ), if( always ) { DrawBackground(); + connect( THEMIM->getIM(), SIGNAL( audioStarted() ), + this, SLOT( hasAudio() ) ); + connect( THEMIM->getIM(), SIGNAL( audioStarted() ), + this, SLOT( hasVideo() ) ); } need_update = false; } @@ -117,7 +122,20 @@ void *VideoWidget::Request( vout_thread_t *p_nvout, int *pi_x, int *pi_y, } p_vout = p_nvout; - setMinimumSize( 1,1 ); + // if( THEMIM->getIM()->b_has_video ) + // { + // We are really running a video + // Close the existing vout + // Set visual to disabled + // } + // else + // { + // We are getting a request for visual + // Just go on. + // } + // Check THEMIM->b_has_audio. If true, hide audio. + + setMinimumSize( 1,1 ); p_intf->p_sys->p_mi->videoSize = QSize( *pi_width, *pi_height ); updateGeometry(); need_update = true; @@ -149,6 +167,25 @@ void VideoWidget::Release( void *p_win ) } } +void VideoWidget::hasAudio() +{ + /* We have video already, do nothing */ + if( THEMIM->getIM()->b_has_video ) + { + + } + else + { + /* Show the panel to the user */ + fprintf( stderr, "Showing panel\n" ); + } +} + +void VideoWidget::hasVideo() +{ + // if panel is shown, hide it +} + static int DoControl( intf_thread_t *p_intf, void *p_win, int i_q, va_list a ) { return p_intf->p_sys->p_video->Control( p_win, i_q, a );