mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
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.
This commit is contained in:
parent
f20cdcd36b
commit
bb8cdf4cc5
1 changed files with 10 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue