[vlc-devel] commit: macosx: ExecuteOnMainThread is not used, delete it. (Pierre d' Herbemont )

git version control git at videolan.org
Sat Jul 5 12:39:53 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Jul  5 12:18:07 2008 +0200| [547cfbf40f3c9c7ca342cad75c4a8c01e70f88af]

macosx: ExecuteOnMainThread is not used, delete it.

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

 modules/gui/macosx/intf.h |    1 -
 modules/gui/macosx/intf.m |   64 ---------------------------------------------
 2 files changed, 0 insertions(+), 65 deletions(-)

diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index 7ec3957..bc17c79 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -46,7 +46,6 @@
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
-int ExecuteOnMainThread( id target, SEL sel, void * p_arg );
 unsigned int CocoaKeyToVLC( unichar i_key );
 
 #define VLCIntf [[VLCMain sharedInstance] getIntf]
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index cac24fa..7b8709d 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -184,70 +184,6 @@ static void * ManageThread( void *user_data )
     return NULL;
 }
 
-int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
-{
-    int i_ret = 0;
-
-    //NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
-
-    if( [target respondsToSelector: @selector(performSelectorOnMainThread:
-                                             withObject:waitUntilDone:)] )
-    {
-        [target performSelectorOnMainThread: sel
-                withObject: [NSValue valueWithPointer: p_arg]
-                waitUntilDone: NO];
-    }
-    else if( NSApp != nil && [[VLCMain sharedInstance] respondsToSelector: @selector(getIntf)] )
-    {
-        NSValue * o_v1;
-        NSValue * o_v2;
-        NSArray * o_array;
-        NSPort * o_recv_port;
-        NSInvocation * o_inv;
-        NSPortMessage * o_msg;
-        intf_thread_t * p_intf;
-        NSConditionLock * o_lock;
-        NSMethodSignature * o_sig;
-
-        id * val[] = { &o_lock, &o_v2 };
-
-        p_intf = (intf_thread_t *)VLCIntf;
-
-        o_recv_port = [[NSPort port] retain];
-        o_v1 = [NSValue valueWithPointer: val];
-        o_v2 = [NSValue valueWithPointer: p_arg];
-
-        o_sig = [target methodSignatureForSelector: sel];
-        o_inv = [NSInvocation invocationWithMethodSignature: o_sig];
-        [o_inv setArgument: &o_v1 atIndex: 2];
-        [o_inv setTarget: target];
-        [o_inv setSelector: sel];
-
-        o_array = [NSArray arrayWithObject:
-            [NSData dataWithBytes: &o_inv length: sizeof(o_inv)]];
-        o_msg = [[NSPortMessage alloc]
-            initWithSendPort: p_intf->p_sys->o_sendport
-            receivePort: o_recv_port components: o_array];
-
-        o_lock = [[NSConditionLock alloc] initWithCondition: 0];
-        [o_msg sendBeforeDate: [NSDate distantPast]];
-        [o_lock lockWhenCondition: 1];
-        [o_lock unlock];
-        [o_lock release];
-
-        [o_msg release];
-        [o_recv_port release];
-    }
-    else
-    {
-        i_ret = 1;
-    }
-
-    //[o_pool release];
-
-    return( i_ret );
-}
-
 /*****************************************************************************
  * playlistChanged: Callback triggered by the intf-change playlist
  * variable, to let the intf update the playlist.




More information about the vlc-devel mailing list