From d1bdf9ea1195c5f81906631ab789cb741a96968c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 4 Oct 2014 11:47:17 +0200 Subject: cocoa: move to a simpler threading model Unfortunately using dispatch_sync for synchronization turned out to be really bad for us. It caused a wide array of race conditions, deadlocks, etc. Moving to a very simple mutex. It's not clear to me how to do liveresizing with this, for now it just flickers with is unacceptable (maybe I'll draw black instead). This should fix all the threading cocoa bugs. Reopen if it's not the case! Fixes #751 Fixes #1129 --- video/out/cocoa/mpvadapter.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out/cocoa/mpvadapter.h') diff --git a/video/out/cocoa/mpvadapter.h b/video/out/cocoa/mpvadapter.h index af536d2f56..205b2b1443 100644 --- a/video/out/cocoa/mpvadapter.h +++ b/video/out/cocoa/mpvadapter.h @@ -19,12 +19,13 @@ #include "video/out/vo.h" @interface MpvCocoaAdapter : NSObject +- (void)lock; +- (void)unlock; - (void)setNeedsResize; - (void)signalMouseMovement:(NSPoint)point; - (void)putKey:(int)mpkey withModifiers:(int)modifiers; - (void)putAxis:(int)mpkey delta:(float)delta; - (void)putCommand:(char*)cmd; -- (void)performAsyncResize:(NSSize)size; - (void)handleFilesArray:(NSArray *)files; - (void)didChangeWindowedScreenProfile:(NSScreen *)screen; -- cgit v1.2.3