summaryrefslogtreecommitdiff
path: root/sys/osxvideo
diff options
context:
space:
mode:
authorJosep Torra <n770galaxy@gmail.com>2012-05-31 10:26:27 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-05-31 10:26:27 +0200
commitbb8cdf4cc580e481f60580142481b0983d30f40b (patch)
tree814fcc5b9f724f7ac0beef73a2e4e6ef97212020 /sys/osxvideo
parentf20cdcd36b398d92dba5240dddb948cc49465180 (diff)
osxvideosink: Really fix the build on 10.5
The API that we use to run the Cocoa loop in another thread does not exist in 10.5 or earlier.
Diffstat (limited to 'sys/osxvideo')
-rw-r--r--sys/osxvideo/osxvideosink.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/osxvideo/osxvideosink.h b/sys/osxvideo/osxvideosink.h
index 5d32f5ceb..37b68c2f6 100644
--- a/sys/osxvideo/osxvideosink.h
+++ b/sys/osxvideo/osxvideosink.h
@@ -40,6 +40,14 @@
GST_DEBUG_CATEGORY_EXTERN (gst_debug_osx_video_sink);
#define GST_CAT_DEFAULT gst_debug_osx_video_sink
+/* The hack doesn't work on leopard, the _CFMainPThread symbol
+ * is doesn't exist in the CoreFoundation library */
+#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
+#ifdef RUN_NS_APP_THREAD
+#undef RUN_NS_APP_THREAD
+#endif
+#endif
+
G_BEGIN_DECLS
#define GST_TYPE_OSX_VIDEO_SINK \
@@ -75,8 +83,8 @@ struct _GstOSXVideoSink {
GstOSXWindow *osxwindow;
void *osxvideosinkobject;
NSView *superview;
-#ifdef RUN_NS_APP_THREAD
NSThread *ns_app_thread;
+#ifdef RUN_NS_APP_THREAD
GMutex *loop_thread_lock;
GCond *loop_thread_cond;
#else
@@ -129,15 +137,13 @@ GType gst_osx_video_sink_get_type(void);
GstOSXVideoSink *osxvideosink;
}
-#ifdef RUN_NS_APP_THREAD
-+ (BOOL) isMainThread;
-#endif
-(id) initWithSink: (GstOSXVideoSink *) sink;
-(void) createInternalWindow;
-(void) resize;
-(void) destroy;
-(void) showFrame: (GstBufferObject*) buf;
#ifdef RUN_NS_APP_THREAD
++ (BOOL) isMainThread;
-(void) nsAppThread;
#endif
@end