[FFmpeg-trac] #11015(undetermined:open): Mac arm64, AVFoundation not listing video device part of usb cameras, Logitech?

FFmpeg trac at avcodec.org
Mon Jun 3 02:56:37 EEST 2024


#11015: Mac arm64,  AVFoundation not listing video device part of usb cameras,
Logitech?
-------------------------------------+-------------------------------------
             Reporter:  Dave         |                    Owner:  Thilo
                                     |  Borgmann
                 Type:  defect       |                   Status:  open
             Priority:  important    |                Component:
                                     |  undetermined
              Version:  7.0          |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by ddennedy):

 Hey, I ran into this problem too. I can test a patch. The problem is not
 specific to arm64. Running macOS 12.7 on my M1 machine and 14.5 on the
 Intel. Setting up a remote connection might prove difficult, but I can buy
 you a Logitech webcam.
 I think commit e37b15e26fbc7bc31a86a4a2c7c798e20d4f4c2c is suspicious.

 Under `if (mediaType == AVMediaTypeVideo) {`
 it starts out with only `AVCaptureDeviceTypeBuiltInWideAngleCamera` (see
 "BuiltIn")
 and it never adds `AVCaptureDeviceTypeExternal`.

 Also, my iPhone does not appear as it did in previous versions either
 (`AVCaptureDeviceTypeContinuityCamera`).

 I will test a change like
 {{{
 diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
 index e558ad7d90..90dbf1a755 100644
 --- a/libavdevice/avfoundation.m
 +++ b/libavdevice/avfoundation.m
 @@ -783,20 +783,23 @@ static NSArray* getDevicesWithMediaType(AVMediaType
 mediaType) {
          #if (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 130000)
              [deviceTypes addObject: AVCaptureDeviceTypeDeskViewCamera];
          #endif
 +        #if (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000)
 +            [deviceTypes addObject: AVCaptureDeviceTypeExternal];
 +        #endif
          #if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >=
 150400)
              [deviceTypes addObject:
 AVCaptureDeviceTypeBuiltInLiDARDepthCamera];
          #endif
 -        #if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >=
 170000 || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000))
 +        #if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >=
 170000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000))
              [deviceTypes addObject: AVCaptureDeviceTypeContinuityCamera];
          #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))
 +        #if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >=
 170000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000))
              deviceTypes = [NSMutableArray
 arrayWithArray:@[AVCaptureDeviceTypeMicrophone]];
          #else
              deviceTypes = [NSMutableArray
 arrayWithArray:@[AVCaptureDeviceTypeBuiltInMicrophone]];
          #endif
      } else if (mediaType == AVMediaTypeMuxed) {
 -        #if (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >=
 170000 || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000))
 +        #if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >=
 170000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 140000))
              deviceTypes = [NSMutableArray
 arrayWithArray:@[AVCaptureDeviceTypeExternal]];
          #elif (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000)
              deviceTypes = [NSMutableArray
 arrayWithArray:@[AVCaptureDeviceTypeExternalUnknown]];
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11015#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list