E.g. tvOS doesn't have devicesWithMediaType.
In principle, we could probably disable building the whole
input device on such OSes, but that would either require
testing explicitly for the OS type in configure (which we don't
do anywhere so far), or test for individual objective C methods.
This approach allows the code to compile, but no input devices
will be found at runtime.
---
libavdevice/avfoundation.m | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 61dac4b713..6f15e2837e 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -814,8 +814,10 @@ static int get_audio_config(AVFormatContext *s)
mediaType:mediaType
position:AVCaptureDevicePositionUnspecified];
return [captureDeviceDiscoverySession devices];
-#else
+#elif TARGET_OS_OSX
return [AVCaptureDevice devicesWithMediaType:mediaType];
+#else
+ return nil;
#endif
}
--
2.39.5 (Apple Git-154)
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".