Commit 079e7a29 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Added option to run vlc as a Qt Embedded Gui Server. Use --qte-guiserver to...

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.
parent a5ecfac4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* qte.cpp : QT Embedded plugin for vlc * qte.cpp : QT Embedded plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2003 VideoLAN * 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> * Authors: Gerald Hansink <gerald.hansink@ordain.nl>
* Jean-Paul Saman <jpsaman@wxs.nl> * Jean-Paul Saman <jpsaman@wxs.nl>
...@@ -352,7 +352,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -352,7 +352,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
*****************************************************************************/ *****************************************************************************/
static int Manage( vout_thread_t *p_vout ) static int Manage( vout_thread_t *p_vout )
{ {
msg_Dbg( p_vout, "Manage" ); // msg_Dbg( p_vout, "Manage" );
/* Fullscreen change */ /* Fullscreen change */
if( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE ) if( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
...@@ -391,6 +391,9 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -391,6 +391,9 @@ static int Manage( vout_thread_t *p_vout )
// p_vout->p_sys->b_cursor_autohidden = 1; // p_vout->p_sys->b_cursor_autohidden = 1;
// SDL_ShowCursor( 0 ); // SDL_ShowCursor( 0 );
// } // }
//
// if( p_vout->p_vlc->b_die )
// p_vout->p_sys->bRunning = FALSE;
return 0; return 0;
} }
...@@ -485,7 +488,7 @@ static void ToggleFullScreen ( vout_thread_t *p_vout ) ...@@ -485,7 +488,7 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
if ( p_vout->b_fullscreen ) if ( p_vout->b_fullscreen )
p_vout->p_sys->p_VideoWidget->showFullScreen(); p_vout->p_sys->p_VideoWidget->showFullScreen();
else else
p_vout->p_sys->p_VideoWidget->showNormal(); p_vout->p_sys->p_VideoWidget->showNormal();
p_vout->b_fullscreen = !p_vout->b_fullscreen; p_vout->b_fullscreen = !p_vout->b_fullscreen;
} }
...@@ -604,7 +607,7 @@ static void RunQtThread(event_thread_t *p_event) ...@@ -604,7 +607,7 @@ static void RunQtThread(event_thread_t *p_event)
} }
QWidget* pWidget = new QWidget(); QWidget* pWidget = new QWidget();
if (pWidget) if (pWidget)
{ {
p_event->p_vout->p_sys->p_VideoWidget = pWidget; p_event->p_vout->p_sys->p_VideoWidget = pWidget;
} }
} }
...@@ -617,30 +620,30 @@ static void RunQtThread(event_thread_t *p_event) ...@@ -617,30 +620,30 @@ static void RunQtThread(event_thread_t *p_event)
{ {
/* Set default window width and heigh to exactly preferred size. */ /* Set default window width and heigh to exactly preferred size. */
QWidget *desktop = p_event->p_vout->p_sys->p_QApplication->desktop(); 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->setMinimumWidth( 10 );
p_event->p_vout->p_sys->p_VideoWidget->setMinimumHeight( 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->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->i_height );
p_event->p_vout->p_sys->p_VideoWidget->setMaximumWidth( desktop->width() ); p_event->p_vout->p_sys->p_VideoWidget->setMaximumWidth( desktop->width() );
p_event->p_vout->p_sys->p_VideoWidget->setMaximumHeight( desktop->height() ); p_event->p_vout->p_sys->p_VideoWidget->setMaximumHeight( desktop->height() );
/* Check on fullscreen */ /* Check on fullscreen */
if (p_event->p_vout->b_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 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->p_VideoWidget->show();
p_event->p_vout->p_sys->bRunning = TRUE; p_event->p_vout->p_sys->bRunning = TRUE;
#ifdef NEED_QTE_MAIN #ifdef NEED_QTE_MAIN
while(!p_event->b_die && p_event->p_vout->p_sys->bRunning) while(!p_event->b_die && p_event->p_vout->p_sys->bRunning)
{ {
/* Check if we are asked to exit */ /* Check if we are asked to exit */
if( p_event->b_die ) if( p_event->b_die )
break; break;
msleep(100); msleep(100);
} }
#else #else
// run the main loop of qtapplication until someone says: 'quit' // run the main loop of qtapplication until someone says: 'quit'
p_event->p_vout->p_sys->pcQApplication->exec(); p_event->p_vout->p_sys->pcQApplication->exec();
......
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