mirror of https://code.videolan.org/videolan/vlc
Added option to run vlc as a Qt Embedded Gui Server. Use --qte-guiserver to enable this feature. The default is to run as a normal GuiClient.
This commit is contained in:
parent
a5ecfac4dd
commit
079e7a29d0
|
@ -2,7 +2,7 @@
|
|||
* qte.cpp : QT Embedded plugin for vlc
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1998-2003 VideoLAN
|
||||
* $Id: qte.cpp,v 1.18 2003/05/05 16:09:38 gbazin Exp $
|
||||
* $Id: qte.cpp,v 1.19 2003/05/24 12:55:38 jpsaman Exp $
|
||||
*
|
||||
* Authors: Gerald Hansink <gerald.hansink@ordain.nl>
|
||||
* Jean-Paul Saman <jpsaman@wxs.nl>
|
||||
|
@ -352,7 +352,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
|
|||
*****************************************************************************/
|
||||
static int Manage( vout_thread_t *p_vout )
|
||||
{
|
||||
msg_Dbg( p_vout, "Manage" );
|
||||
// msg_Dbg( p_vout, "Manage" );
|
||||
|
||||
/* Fullscreen change */
|
||||
if( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
|
||||
|
@ -391,6 +391,9 @@ static int Manage( vout_thread_t *p_vout )
|
|||
// p_vout->p_sys->b_cursor_autohidden = 1;
|
||||
// SDL_ShowCursor( 0 );
|
||||
// }
|
||||
//
|
||||
// if( p_vout->p_vlc->b_die )
|
||||
// p_vout->p_sys->bRunning = FALSE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -485,7 +488,7 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
|
|||
if ( p_vout->b_fullscreen )
|
||||
p_vout->p_sys->p_VideoWidget->showFullScreen();
|
||||
else
|
||||
p_vout->p_sys->p_VideoWidget->showNormal();
|
||||
p_vout->p_sys->p_VideoWidget->showNormal();
|
||||
|
||||
p_vout->b_fullscreen = !p_vout->b_fullscreen;
|
||||
}
|
||||
|
@ -604,7 +607,7 @@ static void RunQtThread(event_thread_t *p_event)
|
|||
}
|
||||
QWidget* pWidget = new QWidget();
|
||||
if (pWidget)
|
||||
{
|
||||
{
|
||||
p_event->p_vout->p_sys->p_VideoWidget = pWidget;
|
||||
}
|
||||
}
|
||||
|
@ -617,30 +620,30 @@ static void RunQtThread(event_thread_t *p_event)
|
|||
{
|
||||
/* Set default window width and heigh to exactly preferred size. */
|
||||
QWidget *desktop = p_event->p_vout->p_sys->p_QApplication->desktop();
|
||||
p_event->p_vout->p_sys->p_VideoWidget->setMinimumWidth( 10 );
|
||||
p_event->p_vout->p_sys->p_VideoWidget->setMinimumHeight( 10 );
|
||||
p_event->p_vout->p_sys->p_VideoWidget->setBaseSize( p_event->p_vout->p_sys->i_width,
|
||||
p_event->p_vout->p_sys->i_height );
|
||||
p_event->p_vout->p_sys->p_VideoWidget->setMinimumWidth( 10 );
|
||||
p_event->p_vout->p_sys->p_VideoWidget->setMinimumHeight( 10 );
|
||||
p_event->p_vout->p_sys->p_VideoWidget->setBaseSize( p_event->p_vout->p_sys->i_width,
|
||||
p_event->p_vout->p_sys->i_height );
|
||||
p_event->p_vout->p_sys->p_VideoWidget->setMaximumWidth( desktop->width() );
|
||||
p_event->p_vout->p_sys->p_VideoWidget->setMaximumHeight( desktop->height() );
|
||||
/* Check on fullscreen */
|
||||
if (p_event->p_vout->b_fullscreen)
|
||||
p_event->p_vout->p_sys->p_VideoWidget->showFullScreen();
|
||||
p_event->p_vout->p_sys->p_VideoWidget->showFullScreen();
|
||||
else
|
||||
p_event->p_vout->p_sys->p_VideoWidget->showNormal();
|
||||
p_event->p_vout->p_sys->p_VideoWidget->showNormal();
|
||||
|
||||
p_event->p_vout->p_sys->p_VideoWidget->show();
|
||||
p_event->p_vout->p_sys->bRunning = TRUE;
|
||||
|
||||
#ifdef NEED_QTE_MAIN
|
||||
while(!p_event->b_die && p_event->p_vout->p_sys->bRunning)
|
||||
{
|
||||
{
|
||||
/* Check if we are asked to exit */
|
||||
if( p_event->b_die )
|
||||
break;
|
||||
|
||||
msleep(100);
|
||||
}
|
||||
msleep(100);
|
||||
}
|
||||
#else
|
||||
// run the main loop of qtapplication until someone says: 'quit'
|
||||
p_event->p_vout->p_sys->pcQApplication->exec();
|
||||
|
|
Loading…
Reference in New Issue