Skip to content

Commit 63abb2d

Browse files
authored
[AVFoundation] Add a few missing APIs. Fixes #16954. (#17310)
Fixes #16954.
1 parent 688fa45 commit 63abb2d

File tree

5 files changed

+52
-49
lines changed

5 files changed

+52
-49
lines changed

src/avfoundation.cs

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9962,6 +9962,9 @@ interface AVCapturePhotoSettings : NSCopying {
99629962
[Export ("autoStillImageStabilizationEnabled")]
99639963
bool IsAutoStillImageStabilizationEnabled { [Bind ("isAutoStillImageStabilizationEnabled")] get; set; }
99649964

9965+
[Deprecated (PlatformName.iOS, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")]
9966+
[Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")]
9967+
[Deprecated (PlatformName.MacOSX, 13, 0, message: "Use 'MaxPhotoDimensions' instead.")]
99659968
[Export ("highResolutionPhotoEnabled")]
99669969
bool IsHighResolutionPhotoEnabled { [Bind ("isHighResolutionPhotoEnabled")] get; set; }
99679970

@@ -10099,6 +10102,12 @@ interface AVCapturePhotoSettings : NSCopying {
1009910102
[NoMac]
1010010103
[Export ("autoContentAwareDistortionCorrectionEnabled")]
1010110104
bool AutoContentAwareDistortionCorrectionEnabled { [Bind ("isAutoContentAwareDistortionCorrectionEnabled")] get; set; }
10105+
10106+
[iOS (16, 0)]
10107+
[MacCatalyst (16, 0)]
10108+
[Mac (13, 0)]
10109+
[Export ("maxPhotoDimensions")]
10110+
CMVideoDimensions MaxPhotoDimensions { get; set; }
1010210111
}
1010310112

1010410113
[Introduced (PlatformName.MacCatalyst, 14, 0)]
@@ -10305,7 +10314,10 @@ interface AVCapturePhotoOutput {
1030510314
[NullAllowed, Export ("photoSettingsForSceneMonitoring", ArgumentSemantic.Copy)]
1030610315
AVCapturePhotoSettings PhotoSettingsForSceneMonitoring { get; set; }
1030710316

10308-
[NoMac]
10317+
[Mac (10, 15)]
10318+
[Deprecated (PlatformName.iOS, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")]
10319+
[Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")]
10320+
[Deprecated (PlatformName.MacOSX, 13, 0, message: "Use 'MaxPhotoDimensions' instead.")]
1030910321
[Export ("highResolutionCaptureEnabled")]
1031010322
bool IsHighResolutionCaptureEnabled { [Bind ("isHighResolutionCaptureEnabled")] get; set; }
1031110323

@@ -10473,6 +10485,18 @@ interface AVCapturePhotoOutput {
1047310485
[NoMac]
1047410486
[Export ("contentAwareDistortionCorrectionEnabled")]
1047510487
bool ContentAwareDistortionCorrectionEnabled { [Bind ("isContentAwareDistortionCorrectionEnabled")] get; set; }
10488+
10489+
[iOS (16, 0)]
10490+
[MacCatalyst (16, 0)]
10491+
[Mac (13, 0)]
10492+
[Export ("maxPhotoDimensions")]
10493+
CMVideoDimensions MaxPhotoDimensions { get; set; }
10494+
10495+
[iOS (16, 0)]
10496+
[MacCatalyst (16, 0)]
10497+
[Mac (13, 0)]
10498+
[Export ("preservesLivePhotoCaptureSuspendedOnSessionStop")]
10499+
bool PreservesLivePhotoCaptureSuspendedOnSessionStop { get; set; }
1047610500
}
1047710501

1047810502
[Introduced (PlatformName.MacCatalyst, 14, 0)]
@@ -11502,14 +11526,20 @@ interface AVCaptureDeviceFormat {
1150211526
#endif
1150311527

1150411528
[iOS (8, 0), NoMac]
11529+
[Deprecated (PlatformName.iOS, 16, 0, message: "Use 'SupportedMaxPhotoDimension' instead.")]
11530+
[Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'SupportedMaxPhotoDimension' instead.")]
1150511531
[Export ("highResolutionStillImageDimensions")]
1150611532
CMVideoDimensions HighResolutionStillImageDimensions { get; }
1150711533

1150811534
[iOS (11, 0), NoMac]
11535+
[Deprecated (PlatformName.iOS, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")]
11536+
[Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")]
1150911537
[Export ("videoMinZoomFactorForDepthDataDelivery")]
1151011538
nfloat VideoMinZoomFactorForDepthDataDelivery { get; }
1151111539

1151211540
[iOS (11, 0), NoMac]
11541+
[Deprecated (PlatformName.iOS, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")]
11542+
[Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")]
1151311543
[Export ("videoMaxZoomFactorForDepthDataDelivery")]
1151411544
nfloat VideoMaxZoomFactorForDepthDataDelivery { get; }
1151511545

@@ -11589,6 +11619,27 @@ interface AVCaptureDeviceFormat {
1158911619
[NoWatch, NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (15, 0)]
1159011620
[Export ("videoFrameRateRangeForPortraitEffect")]
1159111621
AVFrameRateRange VideoFrameRateRangeForPortraitEffect { get; }
11622+
11623+
[iOS (16, 0)]
11624+
[MacCatalyst (16, 0)]
11625+
[Mac (13, 0)]
11626+
[BindAs (typeof (CMVideoDimensions []))]
11627+
[Export ("supportedMaxPhotoDimensions")]
11628+
NSValue [] SupportedMaxPhotoDimensions { get; }
11629+
11630+
[iOS (16, 0)]
11631+
[MacCatalyst (16, 0)]
11632+
[Mac (13, 0)]
11633+
[BindAs (typeof (nfloat []))]
11634+
[Export ("secondaryNativeResolutionZoomFactors")]
11635+
NSNumber [] SecondaryNativeResolutionZoomFactors { get; }
11636+
11637+
[iOS (16, 0)]
11638+
[MacCatalyst (16, 0)]
11639+
[Mac (13, 0)]
11640+
[BindAs (typeof (nfloat []))]
11641+
[Export ("supportedVideoZoomFactorsForDepthDataDelivery")]
11642+
NSNumber [] SupportedVideoZoomFactorsForDepthDataDelivery { get; }
1159211643
}
1159311644

1159411645
delegate void AVCaptureCompletionHandler (CMSampleBuffer imageDataSampleBuffer, NSError error);

tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -311,19 +311,3 @@
311311
!missing-type! AVSpeechSynthesisProviderVoice not bound
312312
!missing-enum-value! AVSpeechSynthesisVoiceQuality native value AVSpeechSynthesisVoiceQualityPremium = 3 not bound
313313
!missing-selector! AVPlayerLayer::copyDisplayedPixelBuffer not bound
314-
!missing-selector! AVCapturePhotoOutput::preservesLivePhotoCaptureSuspendedOnSessionStop not bound
315-
!missing-selector! AVCapturePhotoOutput::setPreservesLivePhotoCaptureSuspendedOnSessionStop: not bound
316-
!deprecated-attribute-missing! AVCaptureDeviceFormat::highResolutionStillImageDimensions missing a [Deprecated] attribute
317-
!deprecated-attribute-missing! AVCaptureDeviceFormat::videoMaxZoomFactorForDepthDataDelivery missing a [Deprecated] attribute
318-
!deprecated-attribute-missing! AVCaptureDeviceFormat::videoMinZoomFactorForDepthDataDelivery missing a [Deprecated] attribute
319-
!deprecated-attribute-missing! AVCapturePhotoOutput::isHighResolutionCaptureEnabled missing a [Deprecated] attribute
320-
!deprecated-attribute-missing! AVCapturePhotoOutput::setHighResolutionCaptureEnabled: missing a [Deprecated] attribute
321-
!deprecated-attribute-missing! AVCapturePhotoSettings::isHighResolutionPhotoEnabled missing a [Deprecated] attribute
322-
!deprecated-attribute-missing! AVCapturePhotoSettings::setHighResolutionPhotoEnabled: missing a [Deprecated] attribute
323-
!missing-selector! AVCaptureDeviceFormat::secondaryNativeResolutionZoomFactors not bound
324-
!missing-selector! AVCaptureDeviceFormat::supportedMaxPhotoDimensions not bound
325-
!missing-selector! AVCaptureDeviceFormat::supportedVideoZoomFactorsForDepthDataDelivery not bound
326-
!missing-selector! AVCapturePhotoOutput::maxPhotoDimensions not bound
327-
!missing-selector! AVCapturePhotoOutput::setMaxPhotoDimensions: not bound
328-
!missing-selector! AVCapturePhotoSettings::maxPhotoDimensions not bound
329-
!missing-selector! AVCapturePhotoSettings::setMaxPhotoDimensions: not bound

tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,19 +279,11 @@
279279
!missing-type! AVSpeechSynthesisProviderVoice not bound
280280
!missing-enum-value! AVSpeechSynthesisVoiceQuality native value AVSpeechSynthesisVoiceQualityPremium = 3 not bound
281281
!missing-selector! AVPlayerLayer::copyDisplayedPixelBuffer not bound
282-
!missing-selector! AVCapturePhotoOutput::preservesLivePhotoCaptureSuspendedOnSessionStop not bound
283-
!missing-selector! AVCapturePhotoOutput::setPreservesLivePhotoCaptureSuspendedOnSessionStop: not bound
284282
!missing-selector! AVCaptureDeskViewApplication::presentWithCompletionHandler: not bound
285283
!missing-selector! AVCaptureDeskViewApplication::presentWithLaunchConfiguration:completionHandler: not bound
286284
!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::mainWindowFrame not bound
287285
!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::requiresSetUpModeCompletion not bound
288286
!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::setMainWindowFrame: not bound
289287
!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::setRequiresSetUpModeCompletion: not bound
290-
!missing-selector! AVCaptureDeviceFormat::secondaryNativeResolutionZoomFactors not bound
291-
!missing-selector! AVCaptureDeviceFormat::supportedMaxPhotoDimensions not bound
292-
!missing-selector! AVCapturePhotoOutput::maxPhotoDimensions not bound
293-
!missing-selector! AVCapturePhotoOutput::setMaxPhotoDimensions: not bound
294-
!missing-selector! AVCapturePhotoSettings::maxPhotoDimensions not bound
295-
!missing-selector! AVCapturePhotoSettings::setMaxPhotoDimensions: not bound
296288
!missing-type! AVCaptureDeskViewApplication not bound
297289
!missing-type! AVCaptureDeskViewApplicationLaunchConfiguration not bound

tests/xtro-sharpie/iOS-AVFoundation.todo

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -311,19 +311,3 @@
311311
!missing-type! AVSpeechSynthesisProviderVoice not bound
312312
!missing-enum-value! AVSpeechSynthesisVoiceQuality native value AVSpeechSynthesisVoiceQualityPremium = 3 not bound
313313
!missing-selector! AVPlayerLayer::copyDisplayedPixelBuffer not bound
314-
!missing-selector! AVCapturePhotoOutput::preservesLivePhotoCaptureSuspendedOnSessionStop not bound
315-
!missing-selector! AVCapturePhotoOutput::setPreservesLivePhotoCaptureSuspendedOnSessionStop: not bound
316-
!deprecated-attribute-missing! AVCaptureDeviceFormat::highResolutionStillImageDimensions missing a [Deprecated] attribute
317-
!deprecated-attribute-missing! AVCaptureDeviceFormat::videoMaxZoomFactorForDepthDataDelivery missing a [Deprecated] attribute
318-
!deprecated-attribute-missing! AVCaptureDeviceFormat::videoMinZoomFactorForDepthDataDelivery missing a [Deprecated] attribute
319-
!deprecated-attribute-missing! AVCapturePhotoOutput::isHighResolutionCaptureEnabled missing a [Deprecated] attribute
320-
!deprecated-attribute-missing! AVCapturePhotoOutput::setHighResolutionCaptureEnabled: missing a [Deprecated] attribute
321-
!deprecated-attribute-missing! AVCapturePhotoSettings::isHighResolutionPhotoEnabled missing a [Deprecated] attribute
322-
!deprecated-attribute-missing! AVCapturePhotoSettings::setHighResolutionPhotoEnabled: missing a [Deprecated] attribute
323-
!missing-selector! AVCaptureDeviceFormat::secondaryNativeResolutionZoomFactors not bound
324-
!missing-selector! AVCaptureDeviceFormat::supportedMaxPhotoDimensions not bound
325-
!missing-selector! AVCaptureDeviceFormat::supportedVideoZoomFactorsForDepthDataDelivery not bound
326-
!missing-selector! AVCapturePhotoOutput::maxPhotoDimensions not bound
327-
!missing-selector! AVCapturePhotoOutput::setMaxPhotoDimensions: not bound
328-
!missing-selector! AVCapturePhotoSettings::maxPhotoDimensions not bound
329-
!missing-selector! AVCapturePhotoSettings::setMaxPhotoDimensions: not bound

tests/xtro-sharpie/macOS-AVFoundation.todo

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,19 +279,11 @@
279279
!missing-type! AVSpeechSynthesisProviderVoice not bound
280280
!missing-enum-value! AVSpeechSynthesisVoiceQuality native value AVSpeechSynthesisVoiceQualityPremium = 3 not bound
281281
!missing-selector! AVPlayerLayer::copyDisplayedPixelBuffer not bound
282-
!missing-selector! AVCapturePhotoOutput::preservesLivePhotoCaptureSuspendedOnSessionStop not bound
283-
!missing-selector! AVCapturePhotoOutput::setPreservesLivePhotoCaptureSuspendedOnSessionStop: not bound
284282
!missing-selector! AVCaptureDeskViewApplication::presentWithCompletionHandler: not bound
285283
!missing-selector! AVCaptureDeskViewApplication::presentWithLaunchConfiguration:completionHandler: not bound
286284
!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::mainWindowFrame not bound
287285
!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::requiresSetUpModeCompletion not bound
288286
!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::setMainWindowFrame: not bound
289287
!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::setRequiresSetUpModeCompletion: not bound
290-
!missing-selector! AVCaptureDeviceFormat::secondaryNativeResolutionZoomFactors not bound
291-
!missing-selector! AVCaptureDeviceFormat::supportedMaxPhotoDimensions not bound
292-
!missing-selector! AVCapturePhotoOutput::maxPhotoDimensions not bound
293-
!missing-selector! AVCapturePhotoOutput::setMaxPhotoDimensions: not bound
294-
!missing-selector! AVCapturePhotoSettings::maxPhotoDimensions not bound
295-
!missing-selector! AVCapturePhotoSettings::setMaxPhotoDimensions: not bound
296288
!missing-type! AVCaptureDeskViewApplication not bound
297289
!missing-type! AVCaptureDeskViewApplicationLaunchConfiguration not bound

0 commit comments

Comments
 (0)