Skip to content

[AVFoundation] Implement Xcode 16.2 beta 1-3 changes. #21709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/AVFoundation/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ public enum AVCaptureFocusMode : long {

[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[Native]
// NSInteger - AVCaptureDevice.h
public enum AVCaptureDevicePosition : long {
Unspecified = 0,
Back = 1,
Front = 2
Front = 2,
}

[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -622,16 +622,20 @@ public enum AVQueuedSampleBufferRenderingStatus : long {

[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[Native]
public enum AVCaptureVideoStabilizationMode : long {
Off,
Standard,
Cinematic,
Standard = 1,
Cinematic = 2,
[iOS (13, 0)]
[MacCatalyst (14, 0)]
CinematicExtended,
Auto = -1
CinematicExtended = 3,
[iOS (17, 0), MacCatalyst (17, 0), TV (17, 0), NoMac]
PreviewOptimized = 4,
[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
CinematicExtendedEnhanced = 5,
Auto = -1,
}

[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -1022,7 +1026,7 @@ public enum AVCaptureLensStabilizationStatus : long {

[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[Native]
public enum AVCaptureOutputDataDroppedReason : long {
None = 0,
Expand Down
63 changes: 46 additions & 17 deletions src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9440,7 +9440,7 @@ interface AVCaptureSessionRuntimeErrorEventArgs {
/// <include file="../docs/api/AVFoundation/AVCaptureSession.xml" path="/Documentation/Docs[@DocId='T:AVFoundation.AVCaptureSession']/*" />
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[BaseType (typeof (NSObject))]
interface AVCaptureSession {

Expand Down Expand Up @@ -9535,11 +9535,11 @@ interface AVCaptureSession {
[Field ("AVCaptureSessionPresetInputPriority")]
NSString PresetInputPriority { get; }

[NoiOS, NoMacCatalyst]
[NoiOS, NoMacCatalyst, NoTV]
[Field ("AVCaptureSessionPreset320x240")]
NSString Preset320x240 { get; }

[NoiOS, NoMacCatalyst]
[NoiOS, NoMacCatalyst, NoTV]
[Field ("AVCaptureSessionPreset960x540")]
NSString Preset960x540 { get; }

Expand Down Expand Up @@ -9598,6 +9598,7 @@ interface AVCaptureSession {
[Export ("synchronizationClock")]
CMClock SynchronizationClock { get; }

[NoTV]
[Deprecated (PlatformName.MacOSX, 12, 3, message: "Use 'SynchronizationClock' instead.")]
[Deprecated (PlatformName.iOS, 15, 4, message: "Use 'SynchronizationClock' instead.")]
[Deprecated (PlatformName.MacCatalyst, 15, 4, message: "Use 'SynchronizationClock' instead.")]
Expand Down Expand Up @@ -9651,7 +9652,7 @@ interface AVCaptureSession {
/// <include file="../docs/api/AVFoundation/AVCaptureConnection.xml" path="/Documentation/Docs[@DocId='T:AVFoundation.AVCaptureConnection']/*" />
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[BaseType (typeof (NSObject))]
interface AVCaptureConnection {

Expand Down Expand Up @@ -9686,7 +9687,11 @@ interface AVCaptureConnection {
[Export ("videoMirrored")]
bool VideoMirrored { [Bind ("isVideoMirrored")] get; set; }

[NoTV]
[Export ("videoOrientation", ArgumentSemantic.Assign)]
[Deprecated (PlatformName.iOS, 17, 0, message: "Use VideoRotationAngle instead.")]
[Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use VideoRotationAngle instead.")]
[Deprecated (PlatformName.MacOSX, 14, 0, message: "Use VideoRotationAngle instead.")]
AVCaptureVideoOrientation VideoOrientation { get; set; }

[Export ("inputPorts")]
Expand All @@ -9701,21 +9706,25 @@ interface AVCaptureConnection {
[Export ("isVideoOrientationSupported")]
bool SupportsVideoOrientation { get; }

[NoTV]
[Deprecated (PlatformName.iOS, 7, 0 /* Only deprecated on iOS */)]
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
[Export ("supportsVideoMinFrameDuration")]
bool SupportsVideoMinFrameDuration { [Bind ("isVideoMinFrameDurationSupported")] get; }

[NoTV]
[Deprecated (PlatformName.iOS, 7, 0 /* Only deprecated on iOS */)]
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
[Export ("videoMinFrameDuration")]
CMTime VideoMinFrameDuration { get; set; }

[NoTV]
[Deprecated (PlatformName.iOS, 7, 0 /* Only deprecated on iOS */)]
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
[Export ("supportsVideoMaxFrameDuration")]
bool SupportsVideoMaxFrameDuration { [Bind ("isVideoMaxFrameDurationSupported")] get; }

[NoTV]
[Export ("videoMaxFrameDuration")]
[Deprecated (PlatformName.iOS, 7, 0 /* Only deprecated on iOS */)]
[Deprecated (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -9744,13 +9753,15 @@ interface AVCaptureConnection {
bool SupportsVideoStabilization { [Bind ("isVideoStabilizationSupported")] get; }

[NoMac]
[NoTV]
[Export ("videoStabilizationEnabled")]
[Deprecated (PlatformName.iOS, 8, 0, message: "Use 'ActiveVideoStabilizationMode' instead.")]
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ActiveVideoStabilizationMode' instead.")]
bool VideoStabilizationEnabled { [Bind ("isVideoStabilizationEnabled")] get; }

[NoMac]
[NoTV]
[Deprecated (PlatformName.iOS, 8, 0, message: "Use 'PreferredVideoStabilizationMode' instead.")]
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'PreferredVideoStabilizationMode' instead.")]
Expand All @@ -9769,10 +9780,12 @@ interface AVCaptureConnection {

[Unavailable (PlatformName.MacCatalyst)]
[NoiOS]
[NoTV]
[Export ("supportsVideoFieldMode")]
bool SupportsVideoFieldMode { [Bind ("isVideoFieldModeSupported")] get; }

[NoiOS]
[NoTV]
[Unavailable (PlatformName.MacCatalyst)]
[Export ("videoFieldMode")]
AVVideoFieldMode VideoFieldMode { get; set; }
Expand All @@ -9787,14 +9800,21 @@ interface AVCaptureConnection {
[Export ("cameraIntrinsicMatrixDeliveryEnabled")]
bool CameraIntrinsicMatrixDeliveryEnabled { [Bind ("isCameraIntrinsicMatrixDeliveryEnabled")] get; set; }

[iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), TV (17, 0)]
[Export ("isVideoRotationAngleSupported:")]
bool IsVideoRotationAngleSupported (nfloat videoRotationAngle);

[iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), TV (17, 0)]
[Export ("videoRotationAngle")]
nfloat VideoRotationAngle { get; }
}

/// <summary>An audio channel in a capture connection.</summary>
///
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureAudioChannel_Class/index.html">Apple documentation for <c>AVCaptureAudioChannel</c></related>
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[BaseType (typeof (NSObject))]
interface AVCaptureAudioChannel {
[Export ("peakHoldLevel")]
Expand All @@ -9817,7 +9837,7 @@ interface AVCaptureAudioChannel {
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureInput_Class/index.html">Apple documentation for <c>AVCaptureInput</c></related>
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[BaseType (typeof (NSObject))]
// Objective-C exception thrown. Name: NSGenericException Reason: Cannot instantiate AVCaptureInput because it is an abstract superclass.
[DisableDefaultCtor]
Expand All @@ -9835,7 +9855,7 @@ interface AVCaptureInput {
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureInputPort_Class/index.html">Apple documentation for <c>AVCaptureInputPort</c></related>
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface AVCaptureInputPort {
Expand Down Expand Up @@ -10039,7 +10059,7 @@ interface AVAssetExportPresetApple {
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureOutput_Class/index.html">Apple documentation for <c>AVCaptureOutput</c></related>
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[BaseType (typeof (NSObject))]
#if NET
// Making a class abstract has problems (see https://github.com/xamarin/xamarin-macios/issues/4969), so not doing this (yet).
Expand Down Expand Up @@ -10100,7 +10120,7 @@ interface AVCaptureScreenInput {
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureVideoPreviewLayer_Class/index.html">Apple documentation for <c>AVCaptureVideoPreviewLayer</c></related>
[Introduced (PlatformName.MacCatalyst, 14, 0)]
[NoWatch]
[NoTV]
[TV (17, 0)]
[BaseType (typeof (CALayer))]
interface AVCaptureVideoPreviewLayer {
[NullAllowed] // by default this property is null
Expand All @@ -10116,34 +10136,39 @@ interface AVCaptureVideoPreviewLayer {
NSString WeakVideoGravity { get; set; }

[NoMac]
[NoTV]
[Export ("orientation")]
[Deprecated (PlatformName.iOS, 6, 0, message: "Use 'AVCaptureConnection.VideoOrientation' instead.")]
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCaptureConnection.VideoOrientation' instead.")]
AVCaptureVideoOrientation Orientation { get; set; }

[NoMac]
[NoTV]
[Export ("automaticallyAdjustsMirroring")]
[Deprecated (PlatformName.iOS, 6, 0, message: "Use 'AVCaptureConnection.AutomaticallyAdjustsVideoMirroring' instead.")]
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCaptureConnection.AutomaticallyAdjustsVideoMirroring' instead.")]
bool AutomaticallyAdjustsMirroring { get; set; }

[NoMac]
[NoTV]
[Export ("mirrored")]
[Deprecated (PlatformName.iOS, 6, 0, message: "Use 'AVCaptureConnection.VideoMirrored' instead.")]
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCaptureConnection.VideoMirrored' instead.")]
bool Mirrored { [Bind ("isMirrored")] get; set; }

[NoMac]
[NoTV]
[Export ("isMirroringSupported")]
[Deprecated (PlatformName.iOS, 6, 0, message: "Use 'AVCaptureConnection.IsVideoMirroringSupported' instead.")]
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCaptureConnection.IsVideoMirroringSupported' instead.")]
bool MirroringSupported { get; }

[NoMac]
[NoTV]
[Export ("isOrientationSupported")]
[Deprecated (PlatformName.iOS, 6, 0, message: "Use 'AVCaptureConnection.IsVideoOrientationSupported' instead.")]
[MacCatalyst (13, 1)]
Expand Down Expand Up @@ -10456,7 +10481,7 @@ interface IAVCaptureFileOutputRecordingDelegate { }
[BaseType (typeof (AVCaptureOutput))]
// Objective-C exception thrown. Name: NSGenericException Reason: Cannot instantiate AVCaptureFileOutput because it is an abstract superclass.
[DisableDefaultCtor]
[NoTV]
[TV (17, 0)]
interface AVCaptureFileOutput {
[Export ("recordedDuration")]
CMTime RecordedDuration { get; }
Expand Down Expand Up @@ -10485,11 +10510,11 @@ interface AVCaptureFileOutput {
[Export ("stopRecording")]
void StopRecording ();

[NoiOS, MacCatalyst (15, 0)]
[iOS (18, 0), MacCatalyst (15, 0), TV (18, 0)]
[Export ("pauseRecording")]
void PauseRecording ();

[NoiOS, MacCatalyst (15, 0)]
[iOS (18, 0), MacCatalyst (15, 0), TV (18, 0)]
[Export ("resumeRecording")]
void ResumeRecording ();

Expand All @@ -10500,7 +10525,7 @@ interface AVCaptureFileOutput {
[Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
IAVCaptureFileOutputDelegate Delegate { get; set; }

[NoiOS, MacCatalyst (15, 0)]
[iOS (18, 0), MacCatalyst (15, 0), TV (18, 0)]
[Export ("recordingPaused")]
bool RecordingPaused { [Bind ("isRecordingPaused")] get; }
}
Expand All @@ -10513,26 +10538,30 @@ interface AVCaptureFileOutput {
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
[NoTV]
[TV (17, 0)]
[NoWatch]
[MacCatalyst (13, 1)]
interface AVCaptureFileOutputRecordingDelegate {
[Export ("captureOutput:didStartRecordingToOutputFileAtURL:fromConnections:")]
void DidStartRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, NSObject [] connections);

[iOS (18, 2), Mac (15, 2), MacCatalyst (18, 2), TV (18, 2)]
[Export ("captureOutput:didStartRecordingToOutputFileAtURL:startPTS:fromConnections:")]
void DidStartRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, CMTime startPts, NSObject [] connections);

[Abstract]
[Export ("captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:"), CheckDisposed]
void FinishedRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, NSObject [] connections, [NullAllowed] NSError error);

[NoMacCatalyst, NoiOS]
[MacCatalyst (18, 0), iOS (18, 0), TV (18, 0)]
[Export ("captureOutput:didPauseRecordingToOutputFileAtURL:fromConnections:")]
void DidPauseRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, AVCaptureConnection [] connections);

[NoMacCatalyst, NoiOS]
[MacCatalyst (18, 0), iOS (18, 0), TV (18, 0)]
[Export ("captureOutput:didResumeRecordingToOutputFileAtURL:fromConnections:")]
void DidResumeRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, AVCaptureConnection [] connections);

[NoMacCatalyst, NoiOS]
[NoMacCatalyst, NoiOS, NoTV]
[Export ("captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error:")]
void WillFinishRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, AVCaptureConnection [] connections, [NullAllowed] NSError error);
}
Expand Down
4 changes: 4 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5362,7 +5362,9 @@ F:AVFoundation.AVCaptureVideoPreviewLayer.InitMode.WithNoConnection
F:AVFoundation.AVCaptureVideoStabilizationMode.Auto
F:AVFoundation.AVCaptureVideoStabilizationMode.Cinematic
F:AVFoundation.AVCaptureVideoStabilizationMode.CinematicExtended
F:AVFoundation.AVCaptureVideoStabilizationMode.CinematicExtendedEnhanced
F:AVFoundation.AVCaptureVideoStabilizationMode.Off
F:AVFoundation.AVCaptureVideoStabilizationMode.PreviewOptimized
F:AVFoundation.AVCaptureVideoStabilizationMode.Standard
F:AVFoundation.AVCaptureWhiteBalanceChromaticityValues.X
F:AVFoundation.AVCaptureWhiteBalanceChromaticityValues.Y
Expand Down Expand Up @@ -26097,6 +26099,7 @@ M:AVFoundation.AVCaptureFileOutput.StartRecordingToOutputFile(Foundation.NSUrl,S
M:AVFoundation.AVCaptureFileOutputDelegate_Extensions.DidOutputSampleBuffer(AVFoundation.IAVCaptureFileOutputDelegate,AVFoundation.AVCaptureOutput,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureConnection)
M:AVFoundation.AVCaptureFileOutputRecordingDelegate_Extensions.DidPauseRecording(AVFoundation.IAVCaptureFileOutputRecordingDelegate,AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,AVFoundation.AVCaptureConnection[])
M:AVFoundation.AVCaptureFileOutputRecordingDelegate_Extensions.DidResumeRecording(AVFoundation.IAVCaptureFileOutputRecordingDelegate,AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,AVFoundation.AVCaptureConnection[])
M:AVFoundation.AVCaptureFileOutputRecordingDelegate_Extensions.DidStartRecording(AVFoundation.IAVCaptureFileOutputRecordingDelegate,AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,CoreMedia.CMTime,Foundation.NSObject[])
M:AVFoundation.AVCaptureFileOutputRecordingDelegate_Extensions.DidStartRecording(AVFoundation.IAVCaptureFileOutputRecordingDelegate,AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,Foundation.NSObject[])
M:AVFoundation.AVCaptureFileOutputRecordingDelegate_Extensions.WillFinishRecording(AVFoundation.IAVCaptureFileOutputRecordingDelegate,AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,AVFoundation.AVCaptureConnection[],Foundation.NSError)
M:AVFoundation.AVCaptureMetadataOutputObjectsDelegate_Extensions.DidOutputMetadataObjects(AVFoundation.IAVCaptureMetadataOutputObjectsDelegate,AVFoundation.AVCaptureMetadataOutput,AVFoundation.AVMetadataObject[],AVFoundation.AVCaptureConnection)
Expand Down Expand Up @@ -26457,6 +26460,7 @@ M:AVFoundation.IAVCaptureFileOutputDelegate.DidOutputSampleBuffer(AVFoundation.A
M:AVFoundation.IAVCaptureFileOutputDelegate.ShouldProvideSampleAccurateRecordingStart(AVFoundation.AVCaptureOutput)
M:AVFoundation.IAVCaptureFileOutputRecordingDelegate.DidPauseRecording(AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,AVFoundation.AVCaptureConnection[])
M:AVFoundation.IAVCaptureFileOutputRecordingDelegate.DidResumeRecording(AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,AVFoundation.AVCaptureConnection[])
M:AVFoundation.IAVCaptureFileOutputRecordingDelegate.DidStartRecording(AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,CoreMedia.CMTime,Foundation.NSObject[])
M:AVFoundation.IAVCaptureFileOutputRecordingDelegate.DidStartRecording(AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,Foundation.NSObject[])
M:AVFoundation.IAVCaptureFileOutputRecordingDelegate.FinishedRecording(AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,Foundation.NSObject[],Foundation.NSError)
M:AVFoundation.IAVCaptureFileOutputRecordingDelegate.WillFinishRecording(AVFoundation.AVCaptureFileOutput,Foundation.NSUrl,AVFoundation.AVCaptureConnection[],Foundation.NSError)
Expand Down
Loading