X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_output%2Fqte%2Fqte.cpp;h=d55fe342106a2a34cf23fb434f5b36749831bc85;hb=7ca4e3eb624251feb1f97cfc25104cce473e04a0;hp=1f4e9dbc410919748381f32ba1fbc5e0cf1f033c;hpb=9025fab9931ecc35fe247b0a63d0cea166dee88d;p=vlc diff --git a/modules/video_output/qte/qte.cpp b/modules/video_output/qte/qte.cpp index 1f4e9dbc41..d55fe34210 100644 --- a/modules/video_output/qte/qte.cpp +++ b/modules/video_output/qte/qte.cpp @@ -37,10 +37,13 @@ extern "C" { #include /* ENOMEM */ -#include /* free() */ -#include /* strerror() */ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include #include #include @@ -114,7 +117,7 @@ vlc_module_begin(); set_subcategory( SUBCAT_VIDEO_VOUT ); // add_category_hint( N_("QT Embedded"), NULL ); // add_string( "qte-display", "landscape", NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT); - set_description( _("QT Embedded video output") ); + set_description( N_("QT Embedded video output") ); set_capability( "video output", 70 ); add_shortcut( "qte" ); set_callbacks( Open, Close); @@ -140,10 +143,7 @@ static int Open( vlc_object_t *p_this ) p_vout->p_sys = (struct vout_sys_t*) malloc( sizeof( struct vout_sys_t ) ); if( p_vout->p_sys == NULL ) - { - msg_Err( p_vout, "out of memory" ); return( 1 ); - } p_vout->pf_init = Init; p_vout->pf_end = End; @@ -153,7 +153,7 @@ static int Open( vlc_object_t *p_this ) #ifdef NEED_QTE_MAIN p_vout->p_sys->p_qte_main = - module_Need( p_this, "gui-helper", "qte", VLC_TRUE ); + module_Need( p_this, "gui-helper", "qte", true ); if( p_vout->p_sys->p_qte_main == NULL ) { free( p_vout->p_sys ); @@ -189,7 +189,7 @@ static void Close ( vlc_object_t *p_this ) CloseDisplay(p_vout); vlc_thread_join( p_vout->p_sys->p_event ); - vlc_object_destroy( p_vout->p_sys->p_event ); + vlc_object_release( p_vout->p_sys->p_event ); } #ifdef NEED_QTE_MAIN @@ -388,14 +388,15 @@ static int Manage( vout_thread_t *p_vout ) /* Pointer change */ // if( ! p_vout->p_sys->b_cursor_autohidden && -// ( mdate() - p_vout->p_sys->i_lastmoved > 2000000 ) ) +// ( mdate() - p_vout->p_sys->i_lastmoved > +// p_vout->p_sys->i_mouse_hide_timeout ) ) // { // /* Hide the mouse automatically */ // p_vout->p_sys->b_cursor_autohidden = 1; // SDL_ShowCursor( 0 ); // } // -// if( p_vout->p_libvlc->b_die ) +// if( !vlc_object_alive (p_vout->p_libvlc) ) // p_vout->p_sys->bRunning = FALSE; return 0; @@ -514,7 +515,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) /* Initializations */ #if 1 /* FIXME: I need an event queue to handle video output size changes. */ - p_vout->b_fullscreen = VLC_TRUE; + p_vout->b_fullscreen = true; #endif /* Set main window's size */ @@ -536,10 +537,10 @@ static int OpenDisplay( vout_thread_t *p_vout ) /* create thread to exec the qpe application */ if ( vlc_thread_create( p_vout->p_sys->p_event, "QT Embedded Thread", RunQtThread, - VLC_THREAD_PRIORITY_OUTPUT, VLC_TRUE) ) + VLC_THREAD_PRIORITY_OUTPUT, true) ) { msg_Err( p_vout, "cannot create QT Embedded Thread" ); - vlc_object_destroy( p_vout->p_sys->p_event ); + vlc_object_release( p_vout->p_sys->p_event ); p_vout->p_sys->p_event = NULL; return -1; } @@ -640,10 +641,10 @@ static void RunQtThread(event_thread_t *p_event) p_event->p_vout->p_sys->bRunning = TRUE; #ifdef NEED_QTE_MAIN - while(!p_event->b_die && p_event->p_vout->p_sys->bRunning) + while(vlc_object_alive (p_event) && p_event->p_vout->p_sys->bRunning) { /* Check if we are asked to exit */ - if( p_event->b_die ) + if( !vlc_object_alive (p_event) ) break; msleep(100);