aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-04-30 13:34:13 +0300
committerThilo Borgmann <thilo.borgmann@mail.de>2020-04-30 14:21:47 +0200
commitc810a9502cebe32e1dd08ee3d0d17053dde44aa9 (patch)
tree85ac3564fda6024ab2015acdbc76a44a9b7595ad
parent0a181c2cb1fe4038f900d3e1e7c8106e0326f784 (diff)
downloadffmpeg-c810a9502cebe32e1dd08ee3d0d17053dde44aa9.tar.gz
avfoundation: Fix building on iOS
Apparently the changes from 3c9185bf3a83395d12a987f626dbdb985eac4320 aren't enough; even with that in place, I got errors like this when trying to build for iOS: src/libavdevice/avfoundation.m:135:5: error: 'AVCaptureDeviceTransportControlsPlaybackMode' is unavailable: not available on iOS AVCaptureDeviceTransportControlsPlaybackMode observed_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