From c57d8835067b4c85d65fe6793a534c52209bd4d1 Mon Sep 17 00:00:00 2001 From: Palana Date: Tue, 13 May 2014 00:14:27 +0200 Subject: [PATCH] Fix mac-avcapture compilation with OSX SDK version < 10.9 --- .../mac-avcapture/AVCaptureInputPort+PreMavericksCompat.h | 8 ++++++++ plugins/mac-avcapture/CMakeLists.txt | 2 +- plugins/mac-avcapture/av-capture.m | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 plugins/mac-avcapture/AVCaptureInputPort+PreMavericksCompat.h diff --git a/plugins/mac-avcapture/AVCaptureInputPort+PreMavericksCompat.h b/plugins/mac-avcapture/AVCaptureInputPort+PreMavericksCompat.h new file mode 100644 index 000000000..fa4cbbb1c --- /dev/null +++ b/plugins/mac-avcapture/AVCaptureInputPort+PreMavericksCompat.h @@ -0,0 +1,8 @@ +#import + +#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \ + __MAC_OS_X_VERSION_MAX_ALLOWED < 1090 +@interface AVCaptureInputPort (PreMavericksCompat) +@property(nonatomic, readonly) CMClockRef clock; +@end +#endif diff --git a/plugins/mac-avcapture/CMakeLists.txt b/plugins/mac-avcapture/CMakeLists.txt index 107e00427..18f7c38f7 100644 --- a/plugins/mac-avcapture/CMakeLists.txt +++ b/plugins/mac-avcapture/CMakeLists.txt @@ -15,7 +15,7 @@ include_directories(${AVFOUNDATION} ${COCOA}) set(mac-avcapture_HEADERS - ) + AVCaptureInputPort+PreMavericksCompat.h) set(mac-avcapture_SOURCES av-capture.m diff --git a/plugins/mac-avcapture/av-capture.m b/plugins/mac-avcapture/av-capture.m index edc31b2e9..ebcd28f44 100644 --- a/plugins/mac-avcapture/av-capture.m +++ b/plugins/mac-avcapture/av-capture.m @@ -6,6 +6,8 @@ #include #include +#import "AVCaptureInputPort+PreMavericksCompat.h" + #define MILLI_TIMESCALE 1000 #define MICRO_TIMESCALE (MILLI_TIMESCALE * 1000) #define NANO_TIMESCALE (MICRO_TIMESCALE * 1000)