Commit e428120b authored by Jean-Paul Saman's avatar Jean-Paul Saman

Video output for QT embedded compiles. There are still some linking issues to...

Video output for QT embedded compiles. There are still some linking issues to fix, before it is usable.
parent a33705a6
...@@ -1401,7 +1401,7 @@ then ...@@ -1401,7 +1401,7 @@ then
CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}" CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
AC_CHECK_HEADERS(qt.h, [ AC_CHECK_HEADERS(qt.h, [
qte_CFLAGS="${qte_CFLAGS} ${test_CFLAGS} -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti" qte_CFLAGS="${qte_CFLAGS} ${test_CFLAGS} -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti"
qte_LDFLAGS="${qte_LDFLAGS} ${test_LDFLAGS} -lqpe -lqte" qte_LDFLAGS="${qte_LDFLAGS} ${test_LDFLAGS} -lqte"
if test "x${with_qte}" = "x" if test "x${with_qte}" = "x"
then then
PLUGINS="${PLUGINS} video_output/qte/qte" PLUGINS="${PLUGINS} video_output/qte/qte"
......
...@@ -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-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: qte.cpp,v 1.2 2002/09/15 20:54:12 jpsaman Exp $ * $Id: qte.cpp,v 1.3 2002/09/23 21:44:23 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>
...@@ -109,7 +109,7 @@ static void FreePicture ( vout_thread_t *, picture_t * ); ...@@ -109,7 +109,7 @@ static void FreePicture ( vout_thread_t *, picture_t * );
static void ToggleFullScreen ( vout_thread_t * ); static void ToggleFullScreen ( vout_thread_t * );
static void *RunQtThread( void *pVoid ); static void RunQtThread( event_thread_t *p_event );
/***************************************************************************** /*****************************************************************************
* Exported prototypes * Exported prototypes
...@@ -465,17 +465,17 @@ static int CreateQtWindow( vout_thread_t *p_vout ) ...@@ -465,17 +465,17 @@ static int CreateQtWindow( vout_thread_t *p_vout )
//msg_Err(p_vout, "vout_qt: +init qt window"); //msg_Err(p_vout, "vout_qt: +init qt window");
/* for displaying the vout in a qt window we need the QtApplication */ /* for displaying the vout in a qt window we need the QtApplication */
vlc_thread_t thread_id; // vlc_thread_t thread_id;
//msg_Err( "vout_qt: +init qt window, creating qpe application"); //msg_Err( "vout_qt: +init qt window, creating qpe application");
p_vout->p_sys->pcVoutWidget = NULL; p_vout->p_sys->pcVoutWidget = NULL;
/* create thread to exec the qpe application */ /* create thread to exec the qpe application */
// if ( vlc_thread_create( &thread_id, "video output", RunQtThread, if ( vlc_thread_create( p_vout->p_sys->p_event, "QT Embedded video output", RunQtThread,
// VLC_THREAD_PRIORITY_OUTPUT, VLC_FALSE) ) VLC_THREAD_PRIORITY_OUTPUT, VLC_TRUE) )
if ( vlc_thread_create( &thread_id, "vout qte", // if ( vlc_thread_create( &thread_id, "vout qte",
(vlc_thread_func_t)RunQtThread, // (vlc_thread_func_t)RunQtThread,
(void *)p_vout) ) // (void *)p_vout) )
{ {
msg_Err( p_vout, "input error: can't spawn video output thread"); msg_Err( p_vout, "input error: can't spawn video output thread");
return( -1 ); return( -1 );
...@@ -523,52 +523,57 @@ static void DestroyQtWindow( vout_thread_t *p_vout ) ...@@ -523,52 +523,57 @@ static void DestroyQtWindow( vout_thread_t *p_vout )
/***************************************************************************** /*****************************************************************************
* main loop of qtapplication * main loop of qtapplication
*****************************************************************************/ *****************************************************************************/
static void *RunQtThread( void *pVoid) static void RunQtThread(event_thread_t *p_event)
{ {
int argc = 0; int argc = 0;
vout_thread_t* p_vout = (vout_thread_t*) pVoid;
if(qApp == NULL) if(qApp == NULL)
{ {
QApplication* pApp = new QApplication(argc, NULL); QApplication* pApp = new QApplication(argc, NULL);
if(pApp) if(pApp)
{ {
p_vout->p_sys->pcQApplication = pApp; p_event->p_vout->p_sys->pcQApplication = pApp;
p_vout->p_sys->bOwnsQApp = TRUE; p_event->p_vout->p_sys->bOwnsQApp = TRUE;
} }
} }
else else
{ {
p_vout->p_sys->pcQApplication = qApp; p_event->p_vout->p_sys->pcQApplication = qApp;
} }
if (p_vout->p_sys->pcQApplication) if (p_event->p_vout->p_sys->pcQApplication)
{ {
QWidget vo(0, "qte"); QWidget vo(0, "qte");
vo.showFullScreen(); vo.showFullScreen();
vo.show(); vo.show();
p_vout->p_sys->pcVoutWidget = &vo; p_event->p_vout->p_sys->pcVoutWidget = &vo;
p_vout->p_sys->bRunning = TRUE; p_event->p_vout->p_sys->bRunning = TRUE;
if(p_vout->p_sys->bOwnsQApp) if(p_event->p_vout->p_sys->bOwnsQApp)
{ {
// run the main loop of qtapplication until someone says: 'quit' // run the main loop of qtapplication until someone says: 'quit'
p_vout->p_sys->pcQApplication->exec(); p_event->p_vout->p_sys->pcQApplication->exec();
} }
else else
{ {
while(p_vout->p_sys->bRunning) msleep(100); 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);
}
} }
} }
p_vout->p_sys->pcVoutWidget = NULL; p_event->p_vout->p_sys->pcVoutWidget = NULL;
if(p_vout->p_sys->bOwnsQApp) if(p_event->p_vout->p_sys->bOwnsQApp)
{ {
delete p_vout->p_sys->pcQApplication; delete p_event->p_vout->p_sys->pcQApplication;
p_vout->p_sys->pcQApplication = NULL; p_event->p_vout->p_sys->pcQApplication = NULL;
} }
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* qte.h : QT Embedded plugin for vlc * qte.h : QT Embedded plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: qte.h,v 1.2 2002/09/15 20:54:12 jpsaman Exp $ * $Id: qte.h,v 1.3 2002/09/23 21:44:23 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>
...@@ -26,6 +26,17 @@ ...@@ -26,6 +26,17 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
/*****************************************************************************
* event_thread_t: QT Embedded event thread
*****************************************************************************/
typedef struct event_thread_t
{
VLC_COMMON_MEMBERS
vout_thread_t * p_vout;
} event_thread_t;
/***************************************************************************** /*****************************************************************************
* vout_sys_t: video output method descriptor * vout_sys_t: video output method descriptor
...@@ -44,6 +55,8 @@ struct vout_sys_t ...@@ -44,6 +55,8 @@ struct vout_sys_t
QApplication* pcQApplication; QApplication* pcQApplication;
QWidget* pcVoutWidget; QWidget* pcVoutWidget;
event_thread_t * p_event;
}; };
......
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