move a few global variables into the appropriate class.

Comment out a few non-thread-safe functions from embedded vout
handling. Fixes a crash when playlist item changes. refs #955
parent 97c76f70
...@@ -75,10 +75,6 @@ static int DoControl( intf_thread_t *p_intf, void *p_win, int i_q, va_list a ) ...@@ -75,10 +75,6 @@ static int DoControl( intf_thread_t *p_intf, void *p_win, int i_q, va_list a )
return p_intf->p_sys->p_mi->controlVideo( p_win, i_q, a ); return p_intf->p_sys->p_mi->controlVideo( p_win, i_q, a );
} }
bool embeddedPlaylistWasActive;
bool videoIsActive;
QSize savedVideoSize;
MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
{ {
/* Configuration */ /* Configuration */
...@@ -292,13 +288,13 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x, ...@@ -292,13 +288,13 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
if( VISIBLE( playlistWidget ) ) if( VISIBLE( playlistWidget ) )
{ {
embeddedPlaylistWasActive = true; embeddedPlaylistWasActive = true;
playlistWidget->hide(); // playlistWidget->hide();
} }
bool bgWasVisible = false; bool bgWasVisible = false;
if( VISIBLE( bgWidget) ) if( VISIBLE( bgWidget) )
{ {
bgWasVisible = true; bgWasVisible = true;
bgWidget->hide(); // bgWidget->hide();
} }
if( THEMIM->getIM()->hasVideo() || !bgWasVisible ) if( THEMIM->getIM()->hasVideo() || !bgWasVisible )
{ {
...@@ -311,7 +307,7 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x, ...@@ -311,7 +307,7 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
// videoWidget->widgetSize = bgWidget->widgeTSize; // videoWidget->widgetSize = bgWidget->widgeTSize;
videoWidget->widgetSize = QSize( *pi_width, *pi_height ); videoWidget->widgetSize = QSize( *pi_width, *pi_height );
} }
videoWidget->updateGeometry(); /// FIXME: Needed ? // videoWidget->updateGeometry(); /// FIXME: Needed ?
need_components_update = true; need_components_update = true;
} }
return ret; return ret;
...@@ -324,9 +320,9 @@ void MainInterface::releaseVideo( void *p_win ) ...@@ -324,9 +320,9 @@ void MainInterface::releaseVideo( void *p_win )
videoWidget->resize( videoWidget->widgetSize ); videoWidget->resize( videoWidget->widgetSize );
if( embeddedPlaylistWasActive ) if( embeddedPlaylistWasActive )
playlistWidget->show(); ;//playlistWidget->show();
else if( bgWidget ) else if( bgWidget )
bgWidget->show(); ;//bgWidget->show();
videoIsActive = false; videoIsActive = false;
need_components_update = true; need_components_update = true;
...@@ -351,7 +347,7 @@ int MainInterface::controlVideo( void *p_window, int i_query, va_list args ) ...@@ -351,7 +347,7 @@ int MainInterface::controlVideo( void *p_window, int i_query, va_list args )
unsigned int i_width = va_arg( args, unsigned int ); unsigned int i_width = va_arg( args, unsigned int );
unsigned int i_height = va_arg( args, unsigned int ); unsigned int i_height = va_arg( args, unsigned int );
videoWidget->widgetSize = QSize( i_width, i_height ); videoWidget->widgetSize = QSize( i_width, i_height );
videoWidget->updateGeometry(); // videoWidget->updateGeometry();
need_components_update = true; need_components_update = true;
i_ret = VLC_SUCCESS; i_ret = VLC_SUCCESS;
break; break;
......
...@@ -77,6 +77,11 @@ private: ...@@ -77,6 +77,11 @@ private:
VideoWidget *videoWidget; VideoWidget *videoWidget;
virtual void keyPressEvent( QKeyEvent *); virtual void keyPressEvent( QKeyEvent *);
bool embeddedPlaylistWasActive;
bool videoIsActive;
QSize savedVideoSize;
BackgroundWidget *bgWidget; BackgroundWidget *bgWidget;
VisualSelector *visualSelector; VisualSelector *visualSelector;
ControlsWidget *advControls; ControlsWidget *advControls;
......
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