From 134f3e97bf482b75c0eccbe5ac943a2a1d5a4ad6 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 4 Mar 2013 14:23:06 +0100 Subject: OSX: run native event loop in a separate thread This commit is a followup on the previous one and uses a solution I like more since it totally decouples the Cocoa code from mpv's core and tries to emulate a generic Cocoa application's lifecycle as much as possible without fighting the framework. mpv's main is executed in a pthread while the main thread runs the native cocoa event loop. All of the thread safety is mainly accomplished with additional logic in cocoa_common as to not increase complexity on the crossplatform parts of the code. --- osdep/macosx_application_objc.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'osdep/macosx_application_objc.h') diff --git a/osdep/macosx_application_objc.h b/osdep/macosx_application_objc.h index 340b2a9b1c..b569d60f25 100644 --- a/osdep/macosx_application_objc.h +++ b/osdep/macosx_application_objc.h @@ -22,16 +22,10 @@ @interface Application : NSObject - (void)initialize_menu; - (void)registerSelector:(SEL)selector forKey:(MPMenuKey)key; -- (void)call_callback; -- (void)schedule_timer; - (void)stopPlayback; -@property(nonatomic, assign) play_loop_callback callback; -@property(nonatomic, assign) should_stop_callback shouldStopPlayback; -@property(nonatomic, assign) void *context; @property(nonatomic, assign) struct input_ctx *inputContext; @property(nonatomic, assign) struct mp_fifo *keyFIFO; -@property(nonatomic, retain) NSTimer *callbackTimer; @property(nonatomic, retain) NSMutableDictionary *menuItems; @property(nonatomic, retain) NSArray *files; @property(nonatomic, retain) NSMutableArray *argumentsList; -- cgit v1.2.3