mirror of https://git.ffmpeg.org/ffmpeg.git
avfoundation: Fix building on iOS
Apparently the changes from 3c9185bf3a
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;
^
This commit is contained in:
parent
0a181c2cb1
commit
c810a9502c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue