Fix mac-avcapture compilation with OSX SDK version < 10.9

This commit is contained in:
Palana 2014-05-13 00:14:27 +02:00
parent e9b6d1d189
commit c57d883506
3 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,8 @@
#import <AVFoundation/AVFoundation.h>
#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

View File

@ -15,7 +15,7 @@ include_directories(${AVFOUNDATION}
${COCOA})
set(mac-avcapture_HEADERS
)
AVCaptureInputPort+PreMavericksCompat.h)
set(mac-avcapture_SOURCES
av-capture.m

View File

@ -6,6 +6,8 @@
#include <obs.h>
#include <media-io/video-io.h>
#import "AVCaptureInputPort+PreMavericksCompat.h"
#define MILLI_TIMESCALE 1000
#define MICRO_TIMESCALE (MILLI_TIMESCALE * 1000)
#define NANO_TIMESCALE (MICRO_TIMESCALE * 1000)