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>
release/7.0
Theo Fabi 7 months ago committed by Thilo Borgmann
parent 887e6f404d
commit 40ddddca45
  1. 3
      libavdevice/avfoundation.m

@ -787,6 +787,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))

Loading…
Cancel
Save