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

« back to all changes in this revision

Viewing changes to src/misc/beos_specific.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
 * beos_init.cpp: Initialization for BeOS specific features
3
3
 *****************************************************************************
4
4
 * Copyright (C) 1999-2004 the VideoLAN team
5
 
 * $Id: 7e0e74c29d598aeb4f3f78dd29cc6f04b94cd2e2 $
 
5
 * $Id: 226725b42b39412db04807f50ea37d57e5a96db1 $
6
6
 *
7
7
 * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
8
8
 *
33
33
 
34
34
extern "C"
35
35
{
36
 
#include <vlc/vlc.h>
 
36
#ifdef HAVE_CONFIG_H
 
37
# include "config.h"
 
38
#endif
 
39
 
 
40
#include <vlc_common.h>
 
41
#include "../libvlc.h"
37
42
}
38
43
 
39
44
/*****************************************************************************
66
71
#include "../../modules/gui/beos/MsgVals.h"
67
72
#define REALLY_QUIT 'requ'
68
73
 
 
74
static vlc_object_t *p_appthread;
 
75
 
69
76
extern "C"
70
77
{
71
78
 
72
79
/*****************************************************************************
73
80
 * Local prototypes.
74
81
 *****************************************************************************/
75
 
static void AppThread( vlc_object_t *p_appthread );
 
82
static void* AppThread( vlc_object_t *p_appthread );
76
83
 
77
84
/*****************************************************************************
78
85
 * system_Init: create a BApplication object and fill in program path.
79
86
 *****************************************************************************/
80
 
void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
 
87
void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
81
88
{
82
 
    p_this->p_libvlc->p_appthread =
 
89
    p_appthread =
83
90
            (vlc_object_t *)vlc_object_create( p_this, sizeof(vlc_object_t) );
84
91
 
85
92
    /* Create the BApplication thread and wait for initialization */
86
 
    vlc_thread_create( p_this->p_libvlc->p_appthread, "app thread", AppThread,
87
 
                       VLC_THREAD_PRIORITY_LOW, VLC_TRUE );
 
93
    vlc_thread_create( p_appthread, "app thread", AppThread,
 
94
                       VLC_THREAD_PRIORITY_LOW, true );
88
95
}
89
96
 
90
97
/*****************************************************************************
91
98
 * system_Configure: check for system specific configuration options.
92
99
 *****************************************************************************/
93
 
void system_Configure( vlc_t *, int *pi_argc, char *ppsz_argv[] )
 
100
void system_Configure( libvlc_int_t *, int *pi_argc, const char *ppsz_argv[] )
94
101
{
95
102
}
96
103
 
97
104
/*****************************************************************************
98
105
 * system_End: destroy the BApplication object.
99
106
 *****************************************************************************/
100
 
void system_End( vlc_t *p_this )
 
107
void system_End( libvlc_int_t *p_this )
101
108
{
102
109
    /* Tell the BApplication to die */
103
110
    be_app->PostMessage( REALLY_QUIT );
104
111
 
105
 
    vlc_thread_join( p_this->p_libvlc->p_appthread );
106
 
    vlc_object_destroy( p_this->p_libvlc->p_appthread );
 
112
    vlc_thread_join( p_appthread );
 
113
    vlc_object_release( p_appthread );
107
114
 
108
 
    free( p_this->p_libvlc->psz_vlcpath );
 
115
    free( vlc_global()->psz_vlcpath );
109
116
}
110
117
 
111
118
/* following functions are local */
113
120
/*****************************************************************************
114
121
 * AppThread: the BApplication thread.
115
122
 *****************************************************************************/
116
 
static void AppThread( vlc_object_t * p_this )
 
123
static void* AppThread( vlc_object_t * p_this )
117
124
{
118
125
    VlcApplication * BeApp =
119
126
        new VlcApplication("application/x-vnd.videolan-vlc");
120
 
    vlc_object_attach( p_this, p_this->p_vlc );
 
127
    vlc_object_attach( p_this, p_this->p_libvlc );
121
128
    BeApp->p_this = p_this;
122
129
    BeApp->Run();
123
130
    vlc_object_detach( p_this );
124
131
    delete BeApp;
 
132
    return NULL;
125
133
}
126
134
 
127
135
} /* extern "C" */
172
180
    BEntry entry( &info.ref );
173
181
    entry.GetPath( &path );
174
182
    path.GetParent( &path );
175
 
    p_this->p_libvlc->psz_vlcpath = strdup( path.Path() );
 
183
    vlc_global()->psz_vlcpath = strdup( path.Path() );
176
184
 
177
185
    /* Tell the main thread we are finished initializing the BApplication */
178
186
    vlc_thread_ready( p_this );
233
241
{
234
242
    if( !fReadyToQuit )
235
243
    {
236
 
        p_this->p_vlc->b_die = 1;
 
244
        vlc_object_kill( p_this->p_libvlc );
237
245
        return false;
238
246
    }
239
247