]> git.sesse.net Git - vlc/blobdiff - src/misc/beos_specific.cpp
Remove redumdant parameter to vlc_global
[vlc] / src / misc / beos_specific.cpp
index 7ddd9fd48d2266cdca8aec57492549efbf58fca1..6c621b899520c4380deceb85cd86b1ffe8d97b10 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * beos_init.cpp: Initialization for BeOS specific features
  *****************************************************************************
- * Copyright (C) 1999-2004 VideoLAN
- * $Id: beos_specific.cpp,v 1.37 2004/01/25 17:16:06 zorglub Exp $
+ * Copyright (C) 1999-2004 the VideoLAN team
+ * $Id$
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 #include <Application.h>
 #include <Roster.h>
@@ -34,6 +34,7 @@
 extern "C"
 {
 #include <vlc/vlc.h>
+#include "../libvlc.h"
 }
 
 /*****************************************************************************
@@ -77,35 +78,35 @@ static void AppThread( vlc_object_t *p_appthread );
 /*****************************************************************************
  * system_Init: create a BApplication object and fill in program path.
  *****************************************************************************/
-void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
+void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
 {
-    p_this->p_libvlc->p_appthread =
+    vlc_global()->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->p_appthread, "app thread", AppThread,
+    vlc_thread_create( vlc_global()->p_appthread, "app thread", AppThread,
                        VLC_THREAD_PRIORITY_LOW, VLC_TRUE );
 }
 
 /*****************************************************************************
  * system_Configure: check for system specific configuration options.
  *****************************************************************************/
-void system_Configure( vlc_t *, int *pi_argc, char *ppsz_argv[] )
+void system_Configure( libvlc_int_t *, int *pi_argc, char *ppsz_argv[] )
 {
 }
 
 /*****************************************************************************
  * system_End: destroy the BApplication object.
  *****************************************************************************/
-void system_End( vlc_t *p_this )
+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->p_appthread );
-    vlc_object_destroy( p_this->p_libvlc->p_appthread );
+    vlc_thread_join( vlc_global()->p_appthread );
+    vlc_object_destroy( vlc_global()->p_appthread );
 
-    free( p_this->p_libvlc->psz_vlcpath );
+    free( vlc_global()->psz_vlcpath );
 }
 
 /* following functions are local */
@@ -117,7 +118,7 @@ static void AppThread( vlc_object_t * p_this )
 {
     VlcApplication * BeApp =
         new VlcApplication("application/x-vnd.videolan-vlc");
-    vlc_object_attach( p_this, p_this->p_vlc );
+    vlc_object_attach( p_this, p_this->p_libvlc );
     BeApp->p_this = p_this;
     BeApp->Run();
     vlc_object_detach( p_this );
@@ -172,7 +173,7 @@ void VlcApplication::ReadyToRun( )
     BEntry entry( &info.ref );
     entry.GetPath( &path );
     path.GetParent( &path );
-    p_this->p_libvlc->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 );
@@ -233,7 +234,7 @@ bool VlcApplication::QuitRequested()
 {
     if( !fReadyToQuit )
     {
-        p_this->p_vlc->b_die = 1;
+        vlc_object_kill( p_this->p_libvlc );
         return false;
     }