~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to modules/video_output/qte/qte.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * qte.cpp : QT Embedded plugin for vlc
3
3
 *****************************************************************************
4
4
 * Copyright (C) 1998-2003 the VideoLAN team
5
 
 * $Id: e5149efeb92600ff7a058c2e3906ba9f8a161992 $
 
5
 * $Id: 2968e073d9ccc7330e6c369e93c87397de8aa87f $
6
6
 *
7
7
 * Authors: Gerald Hansink <gerald.hansink@ordina.nl>
8
8
 *          Jean-Paul Saman <jpsaman _at_ videolan _dot_ org>
37
37
extern "C"
38
38
{
39
39
#include <errno.h>                                                 /* ENOMEM */
40
 
#include <stdlib.h>                                                /* free() */
41
 
#include <string.h>                                                /* strerror() */
42
 
 
43
 
#include <vlc/vlc.h>
44
 
#include <vlc/intf.h>
45
 
#include <vlc/vout.h>
 
40
 
 
41
#ifdef HAVE_CONFIG_H
 
42
# include "config.h"
 
43
#endif
 
44
 
 
45
#include <vlc_common.h>
 
46
#include <vlc_plugin.h>
 
47
#include <vlc_interface.h>
 
48
#include <vlc_vout.h>
46
49
 
47
50
#ifdef HAVE_MACHINE_PARAM_H
48
51
    /* BSD */
100
103
 
101
104
static void ToggleFullScreen      ( vout_thread_t * );
102
105
 
103
 
static void RunQtThread( event_thread_t *p_event );
 
106
static void* RunQtThread( vlc_object_t *p_this );
104
107
} /* extern "C" */
105
108
 
106
109
/*****************************************************************************
114
117
    set_subcategory( SUBCAT_VIDEO_VOUT );
115
118
//    add_category_hint( N_("QT Embedded"), NULL );
116
119
//    add_string( "qte-display", "landscape", NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT);
117
 
    set_description( _("QT Embedded video output") );
 
120
    set_description( N_("QT Embedded video output") );
118
121
    set_capability( "video output", 70 );
119
122
    add_shortcut( "qte" );
120
123
    set_callbacks( Open, Close);
140
143
    p_vout->p_sys = (struct vout_sys_t*) malloc( sizeof( struct vout_sys_t ) );
141
144
 
142
145
    if( p_vout->p_sys == NULL )
143
 
    {
144
 
        msg_Err( p_vout, "out of memory" );
145
146
        return( 1 );
146
 
    }
147
147
 
148
148
    p_vout->pf_init    = Init;
149
149
    p_vout->pf_end     = End;
153
153
 
154
154
#ifdef NEED_QTE_MAIN
155
155
    p_vout->p_sys->p_qte_main =
156
 
        module_Need( p_this, "gui-helper", "qte", VLC_TRUE );
 
156
        module_Need( p_this, "gui-helper", "qte", true );
157
157
    if( p_vout->p_sys->p_qte_main == NULL )
158
158
    {
159
159
        free( p_vout->p_sys );
185
185
        vlc_object_detach( p_vout->p_sys->p_event );
186
186
 
187
187
        /* Kill RunQtThread */
188
 
        p_vout->p_sys->p_event->b_die = VLC_TRUE;
 
188
        vlc_object_kill( p_vout->p_sys->p_event );
189
189
        CloseDisplay(p_vout);
190
190
 
191
191
        vlc_thread_join( p_vout->p_sys->p_event );
192
 
        vlc_object_destroy( p_vout->p_sys->p_event );
 
192
        vlc_object_release( p_vout->p_sys->p_event );
193
193
    }
194
194
 
195
195
#ifdef NEED_QTE_MAIN
388
388
 
389
389
    /* Pointer change */
390
390
//    if( ! p_vout->p_sys->b_cursor_autohidden &&
391
 
//        ( mdate() - p_vout->p_sys->i_lastmoved > 2000000 ) )
 
391
//        ( mdate() - p_vout->p_sys->i_lastmoved >
 
392
//            p_vout->p_sys->i_mouse_hide_timeout ) )
392
393
//    {
393
394
//        /* Hide the mouse automatically */
394
395
//        p_vout->p_sys->b_cursor_autohidden = 1;
395
396
//        SDL_ShowCursor( 0 );
396
397
//    }
397
398
//
398
 
//    if( p_vout->p_vlc->b_die )
 
399
//    if( !vlc_object_alive (p_vout->p_libvlc) )
399
400
//        p_vout->p_sys->bRunning = FALSE;
400
401
 
401
402
    return 0;
514
515
 
515
516
    /* Initializations */
516
517
#if 1 /* FIXME: I need an event queue to handle video output size changes. */
517
 
    p_vout->b_fullscreen = VLC_TRUE;
 
518
    p_vout->b_fullscreen = true;
518
519
#endif
519
520
 
520
521
    /* Set main window's size */
536
537
    /* create thread to exec the qpe application */
537
538
    if ( vlc_thread_create( p_vout->p_sys->p_event, "QT Embedded Thread",
538
539
                            RunQtThread,
539
 
                            VLC_THREAD_PRIORITY_OUTPUT, VLC_TRUE) )
 
540
                            VLC_THREAD_PRIORITY_OUTPUT, true) )
540
541
    {
541
542
        msg_Err( p_vout, "cannot create QT Embedded Thread" );
542
 
        vlc_object_destroy( p_vout->p_sys->p_event );
 
543
        vlc_object_release( p_vout->p_sys->p_event );
543
544
        p_vout->p_sys->p_event = NULL;
544
545
        return -1;
545
546
    }
587
588
/*****************************************************************************
588
589
 * main loop of qtapplication
589
590
 *****************************************************************************/
590
 
static void RunQtThread(event_thread_t *p_event)
 
591
static void* RunQtThread( vlc_object_t *p_this )
591
592
{
 
593
    event_thread_t *p_event = (event_thread_t *)p_this;
592
594
    msg_Dbg( p_event->p_vout, "RunQtThread starting" );
593
595
 
594
596
#ifdef NEED_QTE_MAIN
640
642
        p_event->p_vout->p_sys->bRunning = TRUE;
641
643
 
642
644
#ifdef NEED_QTE_MAIN
643
 
        while(!p_event->b_die && p_event->p_vout->p_sys->bRunning)
 
645
        while(vlc_object_alive (p_event) && p_event->p_vout->p_sys->bRunning)
644
646
              {
645
647
               /* Check if we are asked to exit */
646
 
           if( p_event->b_die )
 
648
           if( !vlc_object_alive (p_event) )
647
649
               break;
648
650
 
649
651
               msleep(100);
667
669
#endif
668
670
 
669
671
    msg_Dbg( p_event->p_vout, "RunQtThread terminating" );
 
672
    return NULL;
670
673
}
671
674