[vlc-devel] commit: BeOS app thread: only used in one file ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun May 4 18:24:46 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sun May  4 19:25:58 2008 +0300| [2667b2aea8a913292b5b6d8a69d6987a900ae7af]

BeOS app thread: only used in one file

No need to clutter the root object with stuff that can be static.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2667b2aea8a913292b5b6d8a69d6987a900ae7af
---

 src/libvlc.h               |    1 -
 src/misc/beos_specific.cpp |   10 ++++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/libvlc.h b/src/libvlc.h
index 5efccbe..3b25abb 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -121,7 +121,6 @@ struct libvlc_global_data_t
 
     /* Arch-specific variables */
 #if defined( SYS_BEOS )
-    vlc_object_t *         p_appthread;
     char *                 psz_vlcpath;
 #elif defined( __APPLE__ )
     char *                 psz_vlcpath;
diff --git a/src/misc/beos_specific.cpp b/src/misc/beos_specific.cpp
index 9b7d502..91099ec 100644
--- a/src/misc/beos_specific.cpp
+++ b/src/misc/beos_specific.cpp
@@ -71,6 +71,8 @@ private:
 #include "../../modules/gui/beos/MsgVals.h"
 #define REALLY_QUIT 'requ'
 
+static vlc_object_t *p_appthread;
+
 extern "C"
 {
 
@@ -84,11 +86,11 @@ static void AppThread( vlc_object_t *p_appthread );
  *****************************************************************************/
 void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
 {
-    vlc_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( vlc_global()->p_appthread, "app thread", AppThread,
+    vlc_thread_create( p_appthread, "app thread", AppThread,
                        VLC_THREAD_PRIORITY_LOW, true );
 }
 
@@ -107,8 +109,8 @@ void system_End( libvlc_int_t *p_this )
     /* Tell the BApplication to die */
     be_app->PostMessage( REALLY_QUIT );
 
-    vlc_thread_join( vlc_global()->p_appthread );
-    vlc_object_release( vlc_global()->p_appthread );
+    vlc_thread_join( p_appthread );
+    vlc_object_release( p_appthread );
 
     free( vlc_global()->psz_vlcpath );
 }




More information about the vlc-devel mailing list