summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavdevice/avfoundation.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 0b1888693f..59d5b0af4f 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -132,7 +132,9 @@ typedef struct
CMSampleBufferRef current_audio_frame;
AVCaptureDevice *observed_device;
+#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
AVCaptureDeviceTransportControlsPlaybackMode observed_mode;
+#endif
int observed_quit;
} AVFContext;
@@ -200,6 +202,7 @@ static void unlock_frames(AVFContext* ctx)
change:(NSDictionary *)change
context:(void *)context {
if (context == _context) {
+#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
AVCaptureDeviceTransportControlsPlaybackMode mode =
[change[NSKeyValueChangeNewKey] integerValue];
@@ -209,6 +212,7 @@ static void unlock_frames(AVFContext* ctx)
}
_context->observed_mode = mode;
}
+#endif
} else {
[super observeValueForKeyPath: keyPath
ofObject: object