Commit 43b80318 authored by Jean-Paul Saman's avatar Jean-Paul Saman

More sizing stuff.

parent a0066f40
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* qte_main.c : QT Embedded wrapper for gte_main * qte_main.c : QT Embedded wrapper for gte_main
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: qte_main.cpp,v 1.3 2003/02/14 13:48:41 jpsaman Exp $ * $Id: qte_main.cpp,v 1.4 2003/03/06 10:11:33 jpsaman Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -167,6 +167,7 @@ static void QteMain( qte_thread_t *p_this ) ...@@ -167,6 +167,7 @@ static void QteMain( qte_thread_t *p_this )
/* signal the creation of the window */ /* signal the creation of the window */
p_this->p_qte_application->setMainWidget(p_this->p_qte_widget); p_this->p_qte_application->setMainWidget(p_this->p_qte_widget);
p_this->p_qte_widget->show();
vlc_thread_ready( p_this ); vlc_thread_ready( p_this );
p_this->p_qte_application->exec(); p_this->p_qte_application->exec();
......
...@@ -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.14 2003/02/16 16:21:37 jpsaman Exp $ * $Id: qte.cpp,v 1.15 2003/03/06 10:11:33 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>
...@@ -146,7 +146,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -146,7 +146,7 @@ static int Open( vlc_object_t *p_this )
p_vout->pf_init = Init; p_vout->pf_init = Init;
p_vout->pf_end = End; p_vout->pf_end = End;
p_vout->pf_manage = NULL; //Manage; p_vout->pf_manage = Manage;
p_vout->pf_render = NULL; //Render; p_vout->pf_render = NULL; //Render;
p_vout->pf_display = Display; p_vout->pf_display = Display;
...@@ -337,6 +337,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -337,6 +337,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
p.drawImage( x, y, rotatedFrame, 0, 0, rw, rh ); p.drawImage( x, y, rotatedFrame, 0, 0, rw, rh );
#else #else
QDirectPainter p(p_vout->p_sys->p_VideoWidget); QDirectPainter p(p_vout->p_sys->p_VideoWidget);
p.transformOrientation();
// just copy the image to the frame buffer... // just copy the image to the frame buffer...
memcpy(p.frameBuffer(), (p_pic->p_sys->pQImage->jumpTable())[0], h * p.lineStep()); memcpy(p.frameBuffer(), (p_pic->p_sys->pQImage->jumpTable())[0], h * p.lineStep());
#endif #endif
...@@ -352,6 +353,46 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -352,6 +353,46 @@ 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" );
/* Fullscreen change */
if( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE )
{
p_vout->b_fullscreen = ! p_vout->b_fullscreen;
// p_vout->p_sys->b_cursor_autohidden = 0;
// SDL_ShowCursor( p_vout->p_sys->b_cursor &&
// ! p_vout->p_sys->b_cursor_autohidden );
p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
p_vout->i_changes |= VOUT_SIZE_CHANGE;
}
/*
* Size change
*/
if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{
msg_Dbg( p_vout, "video display resized (%dx%d)",
p_vout->p_sys->i_width, p_vout->p_sys->i_height );
CloseDisplay( p_vout );
OpenDisplay( p_vout );
/* We don't need to signal the vout thread about the size change if
* we can handle rescaling ourselves */
p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
}
/* Pointer change */
// if( ! p_vout->p_sys->b_cursor_autohidden &&
// ( mdate() - p_vout->p_sys->i_lastmoved > 2000000 ) )
// {
// /* Hide the mouse automatically */
// p_vout->p_sys->b_cursor_autohidden = 1;
// SDL_ShowCursor( 0 );
// }
return 0; return 0;
} }
...@@ -476,6 +517,14 @@ static int OpenDisplay( vout_thread_t *p_vout ) ...@@ -476,6 +517,14 @@ static int OpenDisplay( vout_thread_t *p_vout )
p_vout->i_window_width; p_vout->i_window_width;
p_vout->p_sys->i_height = p_vout->b_fullscreen ? desktop->width() : p_vout->p_sys->i_height = p_vout->b_fullscreen ? desktop->width() :
p_vout->i_window_height; p_vout->i_window_height;
#if 0 /* FIXME: I need an event queue to handle video output size changes. */
/* Update dimensions */
p_vout->i_changes |= VOUT_SIZE_CHANGE;
p_vout->i_window_width = p_vout->p_sys->i_width;
p_vout->i_window_height = p_vout->p_sys->i_height;
#endif
msg_Dbg( p_vout, "OpenDisplay (h=%d,w=%d)",p_vout->p_sys->i_height,p_vout->p_sys->i_width); msg_Dbg( p_vout, "OpenDisplay (h=%d,w=%d)",p_vout->p_sys->i_height,p_vout->p_sys->i_width);
/* create thread to exec the qpe application */ /* create thread to exec the qpe application */
...@@ -575,7 +624,7 @@ static void RunQtThread(event_thread_t *p_event) ...@@ -575,7 +624,7 @@ static void RunQtThread(event_thread_t *p_event)
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 */
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
......
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