Skip to content

Commit

Permalink
[AVFoundation] Add AVCaptureDeviceTypeExternal. (#21190)
Browse files Browse the repository at this point in the history
Adds an enum entry for: 

https://developer.apple.com/documentation/avfoundation/avcapturedevicetypeexternal

PR originally submitted by @jeremy-visionaid in #21187.

Fixes #21187.

---------

Co-authored-by: Jeremy Powell <[email protected]>
  • Loading branch information
rolfbjarne and jeremy-visionaid authored Sep 11, 2024
1 parent 94240fe commit e8bf454
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 17 deletions.
11 changes: 9 additions & 2 deletions src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11416,9 +11416,10 @@ interface AVCaptureDeviceDiscoverySession {

/// <summary>Enumerates the types of device that can capture audiovisual data.</summary>
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoTV, NoWatch]
[TV (17, 0), NoWatch]
enum AVCaptureDeviceType {

[NoTV]
[Field ("AVCaptureDeviceTypeBuiltInMicrophone")]
BuiltInMicrophone,

Expand All @@ -11430,6 +11431,7 @@ enum AVCaptureDeviceType {
[Field ("AVCaptureDeviceTypeBuiltInTelephotoCamera")]
BuiltInTelephotoCamera,

[NoTV]
[NoMac]
[Deprecated (PlatformName.iOS, 10, 2, message: "Use 'BuiltInDualCamera' instead.")]
[MacCatalyst (13, 1)]
Expand Down Expand Up @@ -11466,9 +11468,14 @@ enum AVCaptureDeviceType {
[Field ("AVCaptureDeviceTypeExternalUnknown")]
ExternalUnknown,

[NoWatch, NoTV, NoMac, MacCatalyst (15, 4), iOS (15, 4)]
[NoWatch, TV (17, 0), NoMac, MacCatalyst (15, 4), iOS (15, 4)]
[Field ("AVCaptureDeviceTypeBuiltInLiDARDepthCamera")]
BuiltInLiDarDepthCamera,

[NoWatch]
[iOS (17, 0), MacCatalyst (17, 0), TV (17, 0), Mac (14, 0)]
[Field ("AVCaptureDeviceTypeExternal")]
External,
}

[NoTV, NoWatch] // matches API that uses it.
Expand Down
1 change: 1 addition & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5150,6 +5150,7 @@ F:AVFoundation.AVCaptureDeviceType.BuiltInTripleCamera
F:AVFoundation.AVCaptureDeviceType.BuiltInTrueDepthCamera
F:AVFoundation.AVCaptureDeviceType.BuiltInUltraWideCamera
F:AVFoundation.AVCaptureDeviceType.BuiltInWideAngleCamera
F:AVFoundation.AVCaptureDeviceType.External
F:AVFoundation.AVCaptureDeviceType.ExternalUnknown
F:AVFoundation.AVCaptureExposureMode.AutoExpose
F:AVFoundation.AVCaptureExposureMode.ContinuousAutoExposure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@
!missing-field! AVAudioSessionRenderingModeChangeNotification not bound
!missing-field! AVAudioSessionRenderingModeNewRenderingModeKey not bound
!missing-field! AVCaptureDeviceTypeContinuityCamera not bound
!missing-field! AVCaptureDeviceTypeExternal not bound
!missing-field! AVCaptureDeviceTypeMicrophone not bound
!missing-field! AVCaptureReactionTypeBalloons not bound
!missing-field! AVCaptureReactionTypeConfetti not bound
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@
!missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound
!missing-field! AVAudioApplicationMuteStateKey not bound
!missing-field! AVAudioSessionPortContinuityMicrophone not bound
!missing-field! AVCaptureDeviceTypeExternal not bound
!missing-field! AVCaptureDeviceTypeMicrophone not bound
!missing-field! AVCaptureReactionTypeBalloons not bound
!missing-field! AVCaptureReactionTypeConfetti not bound
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@
!missing-field! AVAssetExportPresetMVHEVC960x960 not bound
!missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound
!missing-field! AVAudioApplicationMuteStateKey not bound
!missing-field! AVCaptureDeviceTypeExternal not bound
!missing-field! AVCaptureDeviceTypeMicrophone not bound
!missing-field! AVCaptureReactionTypeBalloons not bound
!missing-field! AVCaptureReactionTypeConfetti not bound
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,7 @@
!missing-field! AVAudioApplicationMuteStateKey not bound
!missing-field! AVAudioSessionPortContinuityMicrophone not bound
!missing-field! AVCaptureDeviceSubjectAreaDidChangeNotification not bound
!missing-field! AVCaptureDeviceTypeBuiltInDualCamera not bound
!missing-field! AVCaptureDeviceTypeBuiltInDualWideCamera not bound
!missing-field! AVCaptureDeviceTypeBuiltInLiDARDepthCamera not bound
!missing-field! AVCaptureDeviceTypeBuiltInTelephotoCamera not bound
!missing-field! AVCaptureDeviceTypeBuiltInTripleCamera not bound
!missing-field! AVCaptureDeviceTypeBuiltInTrueDepthCamera not bound
!missing-field! AVCaptureDeviceTypeBuiltInUltraWideCamera not bound
!missing-field! AVCaptureDeviceTypeBuiltInWideAngleCamera not bound
!missing-field! AVCaptureDeviceTypeContinuityCamera not bound
!missing-field! AVCaptureDeviceTypeExternal not bound
!missing-field! AVCaptureDeviceTypeMicrophone not bound
!missing-field! AVCaptureDeviceWasConnectedNotification not bound
!missing-field! AVCaptureDeviceWasDisconnectedNotification not bound
Expand Down
1 change: 0 additions & 1 deletion tests/xtro-sharpie/iOS-AVFoundation.todo
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@
!missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound
!missing-field! AVAudioApplicationMuteStateKey not bound
!missing-field! AVAudioSessionPortContinuityMicrophone not bound
!missing-field! AVCaptureDeviceTypeExternal not bound
!missing-field! AVCaptureDeviceTypeMicrophone not bound
!missing-field! AVCaptureReactionTypeBalloons not bound
!missing-field! AVCaptureReactionTypeConfetti not bound
Expand Down
1 change: 0 additions & 1 deletion tests/xtro-sharpie/macOS-AVFoundation.todo
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@
!missing-field! AVAssetExportPresetMVHEVC960x960 not bound
!missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound
!missing-field! AVAudioApplicationMuteStateKey not bound
!missing-field! AVCaptureDeviceTypeExternal not bound
!missing-field! AVCaptureDeviceTypeMicrophone not bound
!missing-field! AVCaptureReactionTypeBalloons not bound
!missing-field! AVCaptureReactionTypeConfetti not bound
Expand Down
1 change: 0 additions & 1 deletion tests/xtro-sharpie/tvOS-AVFoundation.todo
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@
!missing-field! AVCaptureDeviceTypeBuiltInUltraWideCamera not bound
!missing-field! AVCaptureDeviceTypeBuiltInWideAngleCamera not bound
!missing-field! AVCaptureDeviceTypeContinuityCamera not bound
!missing-field! AVCaptureDeviceTypeExternal not bound
!missing-field! AVCaptureDeviceTypeMicrophone not bound
!missing-field! AVCaptureDeviceWasConnectedNotification not bound
!missing-field! AVCaptureDeviceWasDisconnectedNotification not bound
Expand Down

8 comments on commit e8bf454

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.