From c9e1068997099189efd73d8b8115238924ddea17 Mon Sep 17 00:00:00 2001 From: Jeremy Powell Date: Fri, 6 Sep 2024 11:56:36 +1200 Subject: [PATCH 1/5] Add AVCaptureDeviceTypeExternal (#21187) Adds an enum entry for: https://developer.apple.com/documentation/avfoundation/avcapturedevicetypeexternal --- src/avfoundation.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 12ad3bd5eb6c..1069f4c0cfd1 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -11469,6 +11469,11 @@ enum AVCaptureDeviceType { [NoWatch, NoTV, NoMac, MacCatalyst (15, 4), iOS (15, 4)] [Field ("AVCaptureDeviceTypeBuiltInLiDARDepthCamera")] BuiltInLiDarDepthCamera, + + [NoWatch] + [iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] + [Field ("AVCaptureDeviceTypeExternal")] + External, } [NoTV, NoWatch] // matches API that uses it. From d337b980152022947cf887ac4db2d6f90985927c Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 6 Sep 2024 11:41:16 +0200 Subject: [PATCH 2/5] Update xtro. --- .../api-annotations-dotnet/MacCatalyst-AVFoundation.todo | 1 - tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo | 1 - .../xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo | 1 - tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo | 1 - tests/xtro-sharpie/iOS-AVFoundation.todo | 1 - tests/xtro-sharpie/macOS-AVFoundation.todo | 1 - tests/xtro-sharpie/tvOS-AVFoundation.todo | 1 - 7 files changed, 7 deletions(-) diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo index 2fd2d2077c86..a7ea9aa30942 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo @@ -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 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo index 5c2b6c243f35..a67d1ae8ec10 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo @@ -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 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo index 8caeb786fee9..6f4687b02ca3 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo @@ -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 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo index 0081157c3d7b..8dc49ab9acf6 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo @@ -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 diff --git a/tests/xtro-sharpie/iOS-AVFoundation.todo b/tests/xtro-sharpie/iOS-AVFoundation.todo index 5c2b6c243f35..a67d1ae8ec10 100644 --- a/tests/xtro-sharpie/iOS-AVFoundation.todo +++ b/tests/xtro-sharpie/iOS-AVFoundation.todo @@ -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 diff --git a/tests/xtro-sharpie/macOS-AVFoundation.todo b/tests/xtro-sharpie/macOS-AVFoundation.todo index 8caeb786fee9..6f4687b02ca3 100644 --- a/tests/xtro-sharpie/macOS-AVFoundation.todo +++ b/tests/xtro-sharpie/macOS-AVFoundation.todo @@ -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 diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.todo b/tests/xtro-sharpie/tvOS-AVFoundation.todo index 0081157c3d7b..8dc49ab9acf6 100644 --- a/tests/xtro-sharpie/tvOS-AVFoundation.todo +++ b/tests/xtro-sharpie/tvOS-AVFoundation.todo @@ -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 From f815819f46b62a79205628968a4c7e2550707f07 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 6 Sep 2024 13:57:03 +0200 Subject: [PATCH 3/5] Add missing availability attribute. --- src/avfoundation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 1069f4c0cfd1..03eec1dbbefa 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -11471,7 +11471,7 @@ enum AVCaptureDeviceType { BuiltInLiDarDepthCamera, [NoWatch] - [iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] + [iOS (17, 0), MacCatalyst (17, 0), TV (17, 0), Mac (14, 0)] [Field ("AVCaptureDeviceTypeExternal")] External, } From 09e24d3a510b72ce6f9f2b1864ce6541037e249c Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 6 Sep 2024 15:54:03 +0200 Subject: [PATCH 4/5] Fix tvOS availability. --- src/avfoundation.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 03eec1dbbefa..aeef15dd114f 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -11416,9 +11416,10 @@ interface AVCaptureDeviceDiscoverySession { /// Enumerates the types of device that can capture audiovisual data. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV, NoWatch] + [TV (17, 0), NoWatch] enum AVCaptureDeviceType { + [NoTV] [Field ("AVCaptureDeviceTypeBuiltInMicrophone")] BuiltInMicrophone, @@ -11430,6 +11431,7 @@ enum AVCaptureDeviceType { [Field ("AVCaptureDeviceTypeBuiltInTelephotoCamera")] BuiltInTelephotoCamera, + [NoTV] [NoMac] [Deprecated (PlatformName.iOS, 10, 2, message: "Use 'BuiltInDualCamera' instead.")] [MacCatalyst (13, 1)] @@ -11466,7 +11468,7 @@ 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, From 647e37229d8133f207a0b5974e82f0b1a4e6d085 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 6 Sep 2024 15:54:15 +0200 Subject: [PATCH 5/5] Fix cecil & xtro tests. --- tests/cecil-tests/Documentation.KnownFailures.txt | 1 + .../api-annotations-dotnet/tvOS-AVFoundation.todo | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index bb122cdc876a..d099a281ea60 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -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 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo index 8dc49ab9acf6..aa96b7d8f3af 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo @@ -315,14 +315,6 @@ !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! AVCaptureDeviceTypeMicrophone not bound !missing-field! AVCaptureDeviceWasConnectedNotification not bound