[FFmpeg-devel] [PATCH] avdevice/avfoundation: add external video devices
Theo Fabi
fabi.theo at gmail.com
Sun Jun 9 19:08:39 EEST 2024
Video devices categorized by AVFoundation as
'AVCaptureDeviceTypeExternal(Unknown)' (like USB video streams) were not
recognized by libavdevice.
Signed-off-by: Theo Fabi <fabi.theo at gmail.com>
---
libavdevice/avfoundation.m | 3 +++
1 file changed, 3 insertions(+)
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))
--
2.45.1
More information about the ffmpeg-devel
mailing list