X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Fbeos_specific.cpp;h=321db791f4ce923b955b882094f03a70f21fef23;hb=a46fb0e4e14d971e7482b010bb42c6bc93df66f7;hp=34e724923f69ecc91aba6fb8e92e8ea59fa2574c;hpb=575b4f3993e8b4aa5e0ac2788e978f07da7c388a;p=vlc diff --git a/src/misc/beos_specific.cpp b/src/misc/beos_specific.cpp index 34e724923f..321db791f4 100644 --- a/src/misc/beos_specific.cpp +++ b/src/misc/beos_specific.cpp @@ -33,7 +33,12 @@ extern "C" { -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include "../libvlc.h" } /***************************************************************************** @@ -66,6 +71,8 @@ private: #include "../../modules/gui/beos/MsgVals.h" #define REALLY_QUIT 'requ' +static vlc_object_t *p_appthread; + extern "C" { @@ -77,20 +84,20 @@ static void AppThread( vlc_object_t *p_appthread ); /***************************************************************************** * system_Init: create a BApplication object and fill in program path. *****************************************************************************/ -void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] ) +void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] ) { - p_this->p_libvlc_global->p_appthread = + p_appthread = (vlc_object_t *)vlc_object_create( p_this, sizeof(vlc_object_t) ); /* Create the BApplication thread and wait for initialization */ - vlc_thread_create( p_this->p_libvlc_global->p_appthread, "app thread", AppThread, - VLC_THREAD_PRIORITY_LOW, VLC_TRUE ); + vlc_thread_create( p_appthread, "app thread", AppThread, + VLC_THREAD_PRIORITY_LOW, true ); } /***************************************************************************** * system_Configure: check for system specific configuration options. *****************************************************************************/ -void system_Configure( libvlc_int_t *, int *pi_argc, char *ppsz_argv[] ) +void system_Configure( libvlc_int_t *, int *pi_argc, const char *ppsz_argv[] ) { } @@ -102,10 +109,10 @@ void system_End( libvlc_int_t *p_this ) /* Tell the BApplication to die */ be_app->PostMessage( REALLY_QUIT ); - vlc_thread_join( p_this->p_libvlc_global->p_appthread ); - vlc_object_destroy( p_this->p_libvlc_global->p_appthread ); + vlc_thread_join( p_appthread ); + vlc_object_release( p_appthread ); - free( vlc_global( p_this )->psz_vlcpath ); + free( vlc_global()->psz_vlcpath ); } /* following functions are local */ @@ -172,7 +179,7 @@ void VlcApplication::ReadyToRun( ) BEntry entry( &info.ref ); entry.GetPath( &path ); path.GetParent( &path ); - vlc_global( p_this )->psz_vlcpath = strdup( path.Path() ); + vlc_global()->psz_vlcpath = strdup( path.Path() ); /* Tell the main thread we are finished initializing the BApplication */ vlc_thread_ready( p_this );