Commit 1323cb0b authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

qt: Don't try to modify constant values

parent ddfeae13
......@@ -100,8 +100,7 @@ void VideoWidget::sync( void )
/**
* Request the video to avoid the conflicts
**/
WId VideoWidget::request( struct vout_window_t *p_wnd, unsigned int *pi_width,
unsigned int *pi_height, bool b_keep_size )
WId VideoWidget::request( struct vout_window_t *p_wnd )
{
if( stable )
{
......@@ -110,12 +109,6 @@ WId VideoWidget::request( struct vout_window_t *p_wnd, unsigned int *pi_width,
}
assert( !p_window );
if( b_keep_size )
{
*pi_width = size().width();
*pi_height = size().height();
}
/* The owner of the video window needs a stable handle (WinId). Reparenting
* in Qt4-X11 changes the WinId of the widget, so we need to create another
* dummy widget that stays within the reparentable widget. */
......
......@@ -59,7 +59,7 @@ public:
VideoWidget( intf_thread_t * );
virtual ~VideoWidget();
WId request( struct vout_window_t *, unsigned int *, unsigned int *, bool );
WId request( struct vout_window_t * );
void release( void );
void sync( void );
......
......@@ -187,8 +187,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* VideoWidget connects for asynchronous calls */
b_videoFullScreen = false;
connect( this, SIGNAL(askGetVideo(WId*,struct vout_window_t*,unsigned*,unsigned *, bool)),
this, SLOT(getVideoSlot(WId*,struct vout_window_t*,unsigned*,unsigned*, bool)),
connect( this, SIGNAL(askGetVideo(WId*, struct vout_window_t*, unsigned, unsigned, bool)),
this, SLOT(getVideoSlot(WId*, struct vout_window_t*, unsigned, unsigned, bool)),
Qt::BlockingQueuedConnection );
connect( this, SIGNAL(askReleaseVideo( void )),
this, SLOT(releaseVideoSlot( void )),
......@@ -683,7 +683,7 @@ void MainInterface::toggleFSC()
* That's why we have all those emit statements...
*/
WId MainInterface::getVideo( struct vout_window_t *p_wnd,
unsigned int *pi_width, unsigned int *pi_height,
unsigned int i_width, unsigned int i_height,
bool fullscreen )
{
if( !videoWidget )
......@@ -692,12 +692,12 @@ WId MainInterface::getVideo( struct vout_window_t *p_wnd,
/* This is a blocking call signal. Results are returned through pointers.
* Beware of deadlocks! */
WId id;
emit askGetVideo( &id, p_wnd, pi_width, pi_height, fullscreen );
emit askGetVideo( &id, p_wnd, i_width, i_height, fullscreen );
return id;
}
void MainInterface::getVideoSlot( WId *p_id, struct vout_window_t *p_wnd,
unsigned *pi_width, unsigned *pi_height,
unsigned i_width, unsigned i_height,
bool fullscreen )
{
/* Hidden or minimized, activate */
......@@ -705,7 +705,7 @@ void MainInterface::getVideoSlot( WId *p_id, struct vout_window_t *p_wnd,
toggleUpdateSystrayMenu();
/* Request the videoWidget */
WId ret = videoWidget->request( p_wnd, pi_width, pi_height, !b_autoresize );
WId ret = videoWidget->request( p_wnd );
*p_id = ret;
if( ret ) /* The videoWidget is available */
{
......@@ -716,7 +716,7 @@ void MainInterface::getVideoSlot( WId *p_id, struct vout_window_t *p_wnd,
/* Ask videoWidget to resize correctly, if we are in normal mode */
if( b_autoresize )
videoWidget->setSize( *pi_width, *pi_height );
videoWidget->setSize( i_width, i_height );
}
}
......
......@@ -70,7 +70,7 @@ public:
/* Video requests from core */
WId getVideo( struct vout_window_t *,
unsigned int *pi_width, unsigned int *pi_height, bool );
unsigned int i_width, unsigned int i_height, bool );
void releaseVideo( void );
int controlVideo( int i_query, va_list args );
......@@ -200,7 +200,7 @@ public slots:
/* Manage the Video Functions from the vout threads */
void getVideoSlot( WId *p_id, struct vout_window_t *,
unsigned *pi_width, unsigned *pi_height, bool );
unsigned pi_width, unsigned pi_height, bool );
void releaseVideoSlot( void );
void emitBoss();
......@@ -253,8 +253,7 @@ protected slots:
void resumePlayback();
signals:
void askGetVideo( WId *, struct vout_window_t *, unsigned *, unsigned *,
bool );
void askGetVideo( WId *, struct vout_window_t *, unsigned, unsigned, bool );
void askReleaseVideo( );
void askVideoToResize( unsigned int, unsigned int );
void askVideoSetFullScreen( bool );
......
......@@ -735,10 +735,7 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
MainInterface *p_mi = p_intf->p_sys->p_mi;
msg_Dbg( p_wnd, "requesting video window..." );
unsigned i_width = cfg->width;
unsigned i_height = cfg->height;
WId wid = p_mi->getVideo( p_wnd, &i_width, &i_height, cfg->is_fullscreen );
WId wid = p_mi->getVideo( p_wnd, cfg->width, cfg->height, cfg->is_fullscreen );
if( !wid )
return VLC_EGENERIC;
......
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