aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorTheo Fabi <fabi.theo@gmail.com>2024-06-09 15:51:08 -0400
committerThilo Borgmann <thilo.borgmann@mail.de>2024-06-20 18:52:06 +0200
commitd6d14b3a15cbe0c2e8f3a8607f98edfcab56e330 (patch)
treee236be18a1ca112d8e6f32bba986de466c2fd254 /libavdevice
parent8d6014dbc6fb7c324a114030761901220ebc3540 (diff)
downloadffmpeg-d6d14b3a15cbe0c2e8f3a8607f98edfcab56e330.tar.gz
avdevice/avfoundation: add external video devices
Video devices categorized by AVFoundation as 'AVCaptureDeviceTypeExternal(Unknown)' (like USB video streams) were not recognized by libavdevice. Signed-off-by: Theo Fabi <fabi.theo@gmail.com>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/avfoundation.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index e558ad7d90..c5a09c6563 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -788,6 +788,9 @@ static NSArray* getDevicesWithMediaType(AVMediaType mediaType) {
#endif
#if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 170000 || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000))
[deviceTypes addObject: AVCaptureDeviceTypeContinuityCamera];
+ [deviceTypes addObject: AVCaptureDeviceTypeExternal];
+ #elif (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000)
+ [deviceTypes addObject: AVCaptureDeviceTypeExternalUnknown];
#endif
} else if (mediaType == AVMediaTypeAudio) {
#if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 170000 || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000))