]> git.sesse.net Git - vlc/commitdiff
Remove b_should_run_on_first_thread
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 7 May 2012 16:57:49 +0000 (19:57 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 7 May 2012 17:06:41 +0000 (20:06 +0300)
include/vlc_interface.h
src/interface/interface.c

index 14898e38f04b029c883c65adb40e3b31a225a8ad..5c761c23e21d80e0b49bb9f975ff5a70a4fe77d7 100644 (file)
@@ -53,10 +53,6 @@ typedef struct intf_thread_t
 
     struct intf_thread_t *p_next; /** LibVLC interfaces book keeping */
     vlc_thread_t thread; /** LibVLC thread */
-    /* Thread properties and locks */
-#if defined( __APPLE__ )
-    bool          b_should_run_on_first_thread;
-#endif
 
     /* Specific interfaces */
     intf_sys_t *        p_sys;                          /** system interface */
index b3a7c4876cb77be723a13d290c7779315dc37182..b30cdb4e40e29876a87dc49b44ad01a98d1af4b6 100644 (file)
@@ -106,11 +106,6 @@ int intf_Create( vlc_object_t *p_this, const char *chain )
 
     var_AddCallback( p_intf, "intf-add", AddIntfCallback, NULL );
 
-    /* Attach interface to LibVLC */
-#if defined( __APPLE__ )
-    p_intf->b_should_run_on_first_thread = false;
-#endif
-
     /* Choose the best module */
     p_intf->p_cfg = NULL;
     char *psz_parser = *chain == '$'
@@ -129,17 +124,6 @@ int intf_Create( vlc_object_t *p_this, const char *chain )
         goto error;
     }
 
-#if defined( __APPLE__ )
-    /* Hack to get Mac OS X Cocoa runtime running
-     * (it needs access to the main thread) */
-    if( p_intf->b_should_run_on_first_thread )
-    {
-        libvlc_SetExitHandler( p_libvlc, vlc_object_kill, p_intf );
-        assert( p_intf->pf_run );
-        p_intf->pf_run( p_intf );
-    }
-    else
-#endif
     /* Run the interface in a separate thread */
     if( p_intf->pf_run
      && vlc_clone( &p_intf->thread,
@@ -192,9 +176,6 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
         if( p_intf->pf_run )
         {
             vlc_cancel( p_intf->thread );
-#ifdef __APPLE__
-            if (!p_intf->b_should_run_on_first_thread)
-#endif
             vlc_join( p_intf->thread, NULL );
         }
         module_unneed( p_intf, p_intf->p_module );