From 4871938dd0ffc472e0eb689e769005229ae1814b Mon Sep 17 00:00:00 2001 From: Rachel Kang Date: Tue, 16 Mar 2021 13:32:01 -0400 Subject: [PATCH 1/7] [AVFoundation] Update bindings for Xcode 12.5 beta 1,2,3 --- src/AVFoundation/AVContentKeySession.cs | 36 ++ src/AVFoundation/Enums.cs | 41 +- src/avfoundation.cs | 408 ++++++++++++++++-- src/frameworks.sources | 1 + tests/introspection/Mac/MacApiSelectorTest.cs | 3 + tests/introspection/iOS/iOSApiSelectorTest.cs | 8 + tests/xtro-sharpie/iOS-AVFoundation.ignore | 3 + tests/xtro-sharpie/iOS-AVFoundation.todo | 64 --- tests/xtro-sharpie/macOS-AVFoundation.ignore | 3 + tests/xtro-sharpie/macOS-AVFoundation.todo | 60 --- tests/xtro-sharpie/tvOS-AVFoundation.ignore | 3 + tests/xtro-sharpie/tvOS-AVFoundation.todo | 92 ---- .../xtro-sharpie/watchOS-AVFoundation.ignore | 8 + tests/xtro-sharpie/watchOS-AVFoundation.todo | 61 --- 14 files changed, 475 insertions(+), 316 deletions(-) create mode 100644 src/AVFoundation/AVContentKeySession.cs diff --git a/src/AVFoundation/AVContentKeySession.cs b/src/AVFoundation/AVContentKeySession.cs new file mode 100644 index 0000000000..8acd7a421c --- /dev/null +++ b/src/AVFoundation/AVContentKeySession.cs @@ -0,0 +1,36 @@ +// +// Copyright 2021 Microsoft Corp +// +// Authors: +// Alex Soto (alexsoto@microsoft.com) +// Rachel Kang (rachelkang@microsoft.com) +// + +#if false +using System; +using System.Runtime.InteropServices; +using CoreGraphics; +using ObjCRuntime; + +namespace AVFoundation { + public partial class AVContentKeySession { + + [iOS (14, 5), Mac (11, 3), TV (14, 5), Watch (7,4)] + [DllImport (Constants.AVFoundationLibrary)] + [return: MarshalAs (UnmanagedType.I1)] + static extern /* BOOL */ bool AVSampleBufferAttachContentKey ( + /* CMSampleBufferRef */ IntPt sbuf, + /* AVContentKey */ IntPt contentKey, + /* NSError * _Nullable * _Nullable */ out IntPtr outError); + + [iOS (14, 5), Mac (11, 3), TV (14, 5), Watch (7,4)] + public static bool AttachContentKey (CMSampleBuffer sampleBuffer, AVContentKey contentKey, out NSError error) + { + IntPtr outerr; + var retVal = AVSampleBufferAttachContentKey (sampleBuffer.Handle, contentKey.Handle, out outerr); + error = Runtime.GetNSObject (outerr); + return retVal; + } + } +} +#endif \ No newline at end of file diff --git a/src/AVFoundation/Enums.cs b/src/AVFoundation/Enums.cs index f58b9a9ffc..eacfba76ad 100644 --- a/src/AVFoundation/Enums.cs +++ b/src/AVFoundation/Enums.cs @@ -74,6 +74,7 @@ namespace AVFoundation { Cancelled, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, NoWatch] [Native] // NSInteger - AVCaptureSession.h @@ -84,6 +85,7 @@ namespace AVFoundation { LandscapeLeft, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [Native] @@ -92,6 +94,7 @@ namespace AVFoundation { Off, On, Auto } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [Native] @@ -100,6 +103,7 @@ namespace AVFoundation { Off, On, Auto } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [Native] @@ -108,6 +112,7 @@ namespace AVFoundation { Locked, AutoFocus, ContinuousAutoFocus, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [Native] @@ -118,14 +123,16 @@ namespace AVFoundation { Front = 2 } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureExposureMode : long { - Locked, AutoExpose, ContinuousAutoExposure, [iOS (8,0)] Custom + Locked, AutoExpose, ContinuousAutoExposure, [iOS (8,0), Mac (10,15)] Custom } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [Native] @@ -273,6 +280,7 @@ namespace AVFoundation { } [Watch (6,0)] + [Flags] [Native] // NSUInteger - AVAsset.h public enum AVAssetReferenceRestrictions : ulong { @@ -292,6 +300,7 @@ namespace AVFoundation { } #if !XAMCORE_3_0 || MONOMAC + [Unavailable (PlatformName.MacCatalyst)] [NoTV] [Native] // NSInteger - AVCaptureDevice.h @@ -299,6 +308,7 @@ namespace AVFoundation { NotPlaying, Playing } + [Unavailable (PlatformName.MacCatalyst)] [NoTV, NoWatch] [Native] // NSInteger - AVCaptureSession.h @@ -393,6 +403,10 @@ namespace AVFoundation { #endif [NoWatch, iOS (10,0), TV (10,0)] AllowAirPlay = 64, + [NoMac] + [NoTV] + [iOS (14,5), Watch (7,3)] + OverrideMutedMicrophoneInterruption = 128 } [Native] @@ -427,6 +441,7 @@ namespace AVFoundation { } #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [Native] @@ -451,6 +466,8 @@ namespace AVFoundation { Mastering } + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [Mac (10,14)] [NoWatch] [NoTV] [Native] @@ -587,6 +604,8 @@ namespace AVFoundation { Unknown, Rendering, Failed } + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [iOS (8,0)] [NoWatch] [NoTV] [Native] @@ -602,7 +621,8 @@ namespace AVFoundation { #if XAMCORE_4_0 [NoMac] #endif - [NoTV, NoWatch, iOS (8,0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoTV, NoWatch, iOS (8,0), Mac (10,15)] [Native] public enum AVCaptureAutoFocusSystem : long { None, @@ -611,6 +631,7 @@ namespace AVFoundation { } #if !MONOMAC + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, NoWatch] [iOS (9,0)] [Native] @@ -658,6 +679,7 @@ namespace AVFoundation { } [iOS (9,0), Mac (10,11)] + [Flags] [Native] public enum AVMusicSequenceLoadOptions : ulong { PreserveTracks = 0, @@ -668,6 +690,7 @@ namespace AVFoundation { [iOS (13,0)] [Watch (6,0)] [Mac (10,11)] + [Flags] [Native] public enum AVMovieWritingOptions : ulong { @@ -706,12 +729,14 @@ namespace AVFoundation { Opportunistic = 2, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, NoWatch, Mac (10,15), iOS (10,0)] [Native] public enum AVCaptureColorSpace : long { Srgb = 0, P3D65 = 1, + [Introduced (PlatformName.MacCatalyst, 14, 1)] [iOS (14,1)][NoMac] HlgBT2020 = 2, } @@ -882,7 +907,8 @@ namespace AVFoundation { PresetHevc3840x2160WithAlpha = 14, } - [TV (11,0), NoWatch, iOS (11,0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [TV (11,0), NoWatch, Mac( 10,13), iOS (11,0)] [Native] public enum AVDepthDataAccuracy : long { Relative = 0, @@ -931,6 +957,7 @@ namespace AVFoundation { NotRunning = -80802, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, iOS (11,0)] [NoWatch] [Native] @@ -943,7 +970,8 @@ namespace AVFoundation { Unavailable = 4 } - [NoWatch, NoTV, iOS (11,0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [NoWatch, NoTV, Mac (10,15), iOS (11,0)] [Native] public enum AVCaptureOutputDataDroppedReason : long { @@ -1017,13 +1045,15 @@ namespace AVFoundation { HevcWithAlpha = 9, } - [TV (11,0), NoWatch, iOS (11,0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] [Native] public enum AVDepthDataQuality : long { Low = 0, High = 1 } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, NoMac, iOS (11,1)] [Flags] [Native] @@ -1068,6 +1098,7 @@ namespace AVFoundation { Female, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, NoMac, iOS (13,0)] [Native] public enum AVCapturePhotoQualityPrioritization : long { diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 1cf9a65ce8..26a8144d74 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -245,6 +245,7 @@ namespace AVFoundation { AVMetadataItem[] Items { get; set; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [TV (11,0), NoWatch, iOS (11,0), Mac (10, 13)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -595,6 +596,7 @@ namespace AVFoundation { NSString PersistentContentKeyType { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [iOS (7,0)] // And OSX 10.7 @@ -1836,6 +1838,14 @@ namespace AVFoundation { delegate void AVPermissionGranted (bool granted); + [Native] + public enum AVAudioSessionInterruptionReason : ulong + { + Default = 0, + AppWasSuspended = 1, + BuiltInMicMuted = 2 + } + [Mac (11,0)] [Watch (3,0)] #if MONOMAC @@ -2358,6 +2368,13 @@ namespace AVFoundation { [Export ("inputOrientation")] AVAudioStereoOrientation InputOrientation { get; } + [Watch (7,3), TV (14,5), NoMac, iOS (14,5)] + [Export ("setPrefersNoInterruptionsFromSystemAlerts:error:")] + bool SetPrefersNoInterruptionsFromSystemAlerts (bool inValue, [NullAllowed] out NSError outError); + + [Watch (7, 3), TV (14, 5), NoMac, iOS (14, 5)] + [Export ("prefersNoInterruptionsFromSystemAlerts")] + bool PrefersNoInterruptionsFromSystemAlerts { get; } } [NoMac] @@ -2408,6 +2425,10 @@ namespace AVFoundation { [Export ("AVAudioSessionInterruptionOptionKey")] AVAudioSessionInterruptionOptions Option { get; } + + [iOS (14, 5), Watch (7, 3), NoTV, NoMac] + [Export ("AVAudioSessionInterruptionReasonKey")] + AVAudioSessionInterruptionReason Reason { get; } [iOS (10, 3), TV (10, 2), Watch (3, 2)] [NullAllowed] @@ -3182,6 +3203,7 @@ namespace AVFoundation { interface IAVCaptureFileOutputDelegate {} + [Unavailable (PlatformName.MacCatalyst)] [Protocol, Model] [BaseType (typeof (NSObject))] interface AVCaptureFileOutputDelegate { @@ -3198,6 +3220,7 @@ namespace AVFoundation { #if XAMCORE_4_0 [Abstract] // Abstract superclass. #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, iOS (11,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -3207,6 +3230,7 @@ namespace AVFoundation { CMTime Timestamp { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, iOS (11,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -3237,6 +3261,7 @@ namespace AVFoundation { interface IAVCaptureDataOutputSynchronizerDelegate {} + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, iOS (11,0)] [NoMac] [Protocol, Model] @@ -3274,6 +3299,7 @@ namespace AVFoundation { DispatchQueue DelegateCallbackQueue { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoMac, NoWatch, NoTV, iOS (11,0)] [BaseType (typeof(AVCaptureSynchronizedData))] interface AVCaptureSynchronizedSampleBufferData @@ -3288,6 +3314,7 @@ namespace AVFoundation { AVCaptureOutputDataDroppedReason DroppedReason { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoMac, NoWatch, NoTV, iOS (11,0)] [BaseType (typeof(AVCaptureSynchronizedData))] interface AVCaptureSynchronizedMetadataObjectData @@ -3296,6 +3323,7 @@ namespace AVFoundation { AVMetadataObject[] MetadataObjects { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoMac, NoWatch, NoTV, iOS (11,0)] [BaseType (typeof(AVCaptureSynchronizedData))] [DisableDefaultCtor] @@ -3338,6 +3366,11 @@ namespace AVFoundation { [Abstract] [Export ("stopRequestingMediaData")] void StopRequestingMediaData (); + + [TV (14,5), Watch (7,4), Mac (11,3), iOS (14,5)] + [Abstract] + [Export ("hasSufficientMediaDataForReliablePlaybackStart")] + bool HasSufficientMediaDataForReliablePlaybackStart { get; } } [TV (11,0), Watch (6,0), Mac (10,13), iOS (11,0)] @@ -3407,6 +3440,14 @@ namespace AVFoundation { [Export ("setRate:time:")] void SetRate (float rate, CMTime time); + [Watch (7,4), TV (14,5), Mac (11,3), iOS (14,5)] + [Export ("setRate:time:atHostTime:")] + void SetRate (float rate, CMTime time, CMTime hostTime); + + [Watch (7,4), TV (14,5), Mac (11,3), iOS (14,5)] + [Export ("delaysRateChangeUntilHasSufficientMediaData")] + bool DelaysRateChangeUntilHasSufficientMediaData { get; set; } + // AVSampleBufferRenderSynchronizer_AVSampleBufferRenderSynchronizerRendererManagement [Export ("renderers")] @@ -6713,8 +6754,8 @@ namespace AVFoundation { AVMetadataItemFilter ForSharing { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] - [NoTV] [Mac (10,10)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSGenericException Reason: Cannot instantiate AVMetadataObject because it is an abstract superclass. @@ -6736,55 +6777,55 @@ namespace AVFoundation { [Field ("AVMetadataObjectTypeFace")] NSString TypeFace { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeAztecCode")] NSString TypeAztecCode { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeCode128Code")] NSString TypeCode128Code { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeCode39Code")] NSString TypeCode39Code { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeCode39Mod43Code")] NSString TypeCode39Mod43Code { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeCode93Code")] NSString TypeCode93Code { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeEAN13Code")] NSString TypeEAN13Code { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeEAN8Code")] NSString TypeEAN8Code { get; } [Field ("AVMetadataObjectTypePDF417Code")] - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] NSString TypePDF417Code { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeQRCode")] NSString TypeQRCode { get; } - [NoTV, iOS (7,0), Mac (10,15)] + [iOS (7,0), Mac (10,15)] [Field ("AVMetadataObjectTypeUPCECode")] NSString TypeUPCECode { get; } - [NoTV, iOS (8,0), Mac (10,15)] + [iOS (8,0), Mac (10,15)] [Field ("AVMetadataObjectTypeInterleaved2of5Code")] NSString TypeInterleaved2of5Code { get; } - [NoTV, iOS (8,0), Mac (10,15)] + [iOS (8,0), Mac (10,15)] [Field ("AVMetadataObjectTypeITF14Code")] NSString TypeITF14Code { get; } - [NoTV, iOS (8,0), Mac (10,15)] + [iOS (8,0), Mac (10,15)] [Field ("AVMetadataObjectTypeDataMatrixCode")] NSString TypeDataMatrixCode { get; } @@ -6810,78 +6851,79 @@ namespace AVFoundation { [NoWatch] [NoTV] #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] [Mac (10,10)] [Flags] enum AVMetadataObjectType : ulong { [Field (null)] None = 0, - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeFace")] Face = 1 << 0, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeAztecCode")] AztecCode = 1 << 1, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeCode128Code")] Code128Code = 1 << 2, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeCode39Code")] Code39Code = 1 << 3, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeCode39Mod43Code")] Code39Mod43Code = 1 << 4, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeCode93Code")] Code93Code = 1 << 5, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeEAN13Code")] EAN13Code = 1 << 6, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeEAN8Code")] EAN8Code = 1 << 7, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypePDF417Code")] PDF417Code = 1 << 8, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeQRCode")] QRCode = 1 << 9, [iOS (7,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeUPCECode")] UPCECode = 1 << 10, [iOS (8,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeInterleaved2of5Code")] Interleaved2of5Code = 1 << 11, [iOS (8,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeITF14Code")] ITF14Code = 1 << 12, [iOS (8,0), Mac (10,15)] - [NoTV][NoWatch] + [NoWatch] [Field ("AVMetadataObjectTypeDataMatrixCode")] DataMatrixCode = 1 << 13, @@ -6906,8 +6948,8 @@ namespace AVFoundation { SalientObject = 1 << 17, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] - [NoTV] [Mac (10,10)] [BaseType (typeof (AVMetadataObject))] interface AVMetadataFaceObject : NSCopying { @@ -6927,8 +6969,8 @@ namespace AVFoundation { nint FaceID { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] - [NoTV] [iOS (7,0), Mac (10,15)] [BaseType (typeof (AVMetadataObject))] interface AVMetadataMachineReadableCodeObject { @@ -6940,7 +6982,7 @@ namespace AVFoundation { // @interface AVMetadataMachineReadableCodeDescriptor (AVMetadataMachineReadableCodeObject) - [iOS (11, 0)] + [iOS (11, 0), TV (11,0)] [Export ("descriptor")] [NullAllowed] CIBarcodeDescriptor Descriptor { get; } @@ -8407,7 +8449,8 @@ namespace AVFoundation { AVVideoCompositionCoreAnimationTool FromComposedVideoFrames (CALayer [] videoLayers, CALayer inAnimationlayer); } - [TV (11,0), NoWatch, iOS (11,0)] + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface AVCameraCalibrationData @@ -8440,6 +8483,7 @@ namespace AVFoundation { NSError Error { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -8520,6 +8564,7 @@ namespace AVFoundation { [Field ("AVCaptureSessionPreset3840x2160")] NSString Preset3840x2160 { get; } + [Unavailable (PlatformName.MacCatalyst)] [Field ("AVCaptureSessionPresetiFrame960x540")] NSString PresetiFrame960x540 { get; } @@ -8534,6 +8579,7 @@ namespace AVFoundation { [Field ("AVCaptureSessionPresetInputPriority")] NSString PresetInputPriority { get; } #endif + [Unavailable (PlatformName.MacCatalyst)] [NoiOS] [Field ("AVCaptureSessionPreset320x240")] NSString Preset320x240 { get; } @@ -8621,6 +8667,7 @@ namespace AVFoundation { AVCaptureConnection[] Connections { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -8718,11 +8765,13 @@ namespace AVFoundation { [Export ("activeVideoStabilizationMode")] AVCaptureVideoStabilizationMode ActiveVideoStabilizationMode { get; } #endif + [Unavailable (PlatformName.MacCatalyst)] [NoiOS] [Export ("supportsVideoFieldMode")] bool SupportsVideoFieldMode { [Bind ("isVideoFieldModeSupported")] get; } #if MONOMAC + [Unavailable (PlatformName.MacCatalyst)] [Export ("videoFieldMode")] AVVideoFieldMode VideoFieldMode { get; set; } #endif @@ -8737,6 +8786,7 @@ namespace AVFoundation { } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -8747,15 +8797,18 @@ namespace AVFoundation { [Export ("averagePowerLevel")] float AveragePowerLevel { get; } // defined as 'float' + [Unavailable (PlatformName.MacCatalyst)] [NoiOS] [Export ("enabled")] bool Enabled { [Bind ("isEnabled")] get; set; } + [Unavailable (PlatformName.MacCatalyst)] [NoiOS] [Export ("volume")] float Volume { get; set; } /* float intended here */ } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -8770,6 +8823,7 @@ namespace AVFoundation { NSString PortFormatDescriptionDidChangeNotification { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -8802,6 +8856,7 @@ namespace AVFoundation { interface IAVCaptureDepthDataOutputDelegate {} + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, iOS (11,0), NoMac] [Protocol, Model] [BaseType (typeof(NSObject))] @@ -8814,6 +8869,7 @@ namespace AVFoundation { void DidDropDepthData (AVCaptureDepthDataOutput output, AVDepthData depthData, CMTime timestamp, AVCaptureConnection connection, AVCaptureOutputDataDroppedReason reason); } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, iOS (11,0), NoMac] [BaseType (typeof(AVCaptureOutput))] interface AVCaptureDepthDataOutput @@ -8838,6 +8894,7 @@ namespace AVFoundation { bool FilteringEnabled { [Bind ("isFilteringEnabled")] get; set; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (AVCaptureInput))] @@ -8868,6 +8925,7 @@ namespace AVFoundation { } #if MONOMAC + [Unavailable (PlatformName.MacCatalyst)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -8879,6 +8937,7 @@ namespace AVFoundation { string LocalizedName { get; } } + [Unavailable (PlatformName.MacCatalyst)] [NoWatch] [BaseType (typeof (AVCaptureFileOutput))] [NoTV] @@ -8900,6 +8959,7 @@ namespace AVFoundation { void StartRecording (NSUrl outputFileUrl, string fileType, [Protocolize] AVCaptureFileOutputRecordingDelegate recordingDelegate); } + [Unavailable (PlatformName.MacCatalyst)] [NoWatch] [NoTV] [BaseType (typeof (AVCaptureOutput))] @@ -8941,6 +9001,7 @@ namespace AVFoundation { #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -8972,6 +9033,7 @@ namespace AVFoundation { } #if MONOMAC + [Unavailable (PlatformName.MacCatalyst)] [NoWatch] [NoTV] [BaseType (typeof (AVCaptureInput))] @@ -9000,6 +9062,7 @@ namespace AVFoundation { } #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (CALayer))] @@ -9084,6 +9147,7 @@ namespace AVFoundation { bool Previewing { [Bind ("isPreviewing")] get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] [NoWatch] [BaseType (typeof (AVCaptureOutput))] @@ -9164,6 +9228,7 @@ namespace AVFoundation { bool DeliversPreviewSizedOutputBuffers { get; set; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -9180,6 +9245,7 @@ namespace AVFoundation { interface IAVCaptureVideoDataOutputSampleBufferDelegate {} + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (AVCaptureOutput))] @@ -9209,6 +9275,7 @@ namespace AVFoundation { [return: NullAllowed] NSDictionary GetRecommendedAudioSettingsForAssetWriter (string outputFileType); + [Unavailable (PlatformName.MacCatalyst)] [NoiOS] [Export ("audioSettings", ArgumentSemantic.Copy)] [NullAllowed] @@ -9220,6 +9287,7 @@ namespace AVFoundation { AudioSettings AudioSettings { get; set; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (NSObject))] @@ -9230,6 +9298,7 @@ namespace AVFoundation { void DidOutputSampleBuffer (AVCaptureOutput captureOutput, CMSampleBuffer sampleBuffer, AVCaptureConnection connection); } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoMac] [NoWatch] [NoTV] @@ -9257,6 +9326,7 @@ namespace AVFoundation { AVCaptureManualExposureBracketedStillImageSettings Create (CMTime duration, float /* float, not CGFloat */ ISO); } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoMac] [NoTV] [iOS (8,0)] @@ -9273,6 +9343,7 @@ namespace AVFoundation { interface IAVCaptureFileOutputRecordingDelegate {} + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [BaseType (typeof (AVCaptureOutput))] // Objective-C exception thrown. Name: NSGenericException Reason: Cannot instantiate AVCaptureFileOutput because it is an abstract superclass. @@ -9315,6 +9386,7 @@ namespace AVFoundation { void ResumeRecording (); #if MONOMAC + [Unavailable (PlatformName.MacCatalyst)] [Export ("delegate", ArgumentSemantic.Assign), NullAllowed] IAVCaptureFileOutputDelegate Delegate { get; set; } @@ -9337,18 +9409,22 @@ namespace AVFoundation { void FinishedRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, NSObject [] connections, [NullAllowed] NSError error); #if MONOMAC + [Unavailable (PlatformName.MacCatalyst)] [Export ("captureOutput:didPauseRecordingToOutputFileAtURL:fromConnections:")] void DidPauseRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, AVCaptureConnection [] connections); + [Unavailable (PlatformName.MacCatalyst)] [Export ("captureOutput:didResumeRecordingToOutputFileAtURL:fromConnections:")] void DidResumeRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, AVCaptureConnection [] connections); + [Unavailable (PlatformName.MacCatalyst)] [Export ("captureOutput:willFinishRecordingToOutputFileAtURL:fromConnections:error:")] void WillFinishRecording (AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, AVCaptureConnection [] connections, [NullAllowed] NSError error); #endif } #if !MONOMAC + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [BaseType (typeof (AVCaptureOutput))] @@ -9410,6 +9486,7 @@ namespace AVFoundation { NSNumber Height { get; set; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV, Mac (10,15), iOS (10,0)] [BaseType (typeof(NSObject))] @@ -9589,6 +9666,7 @@ namespace AVFoundation { [Export ("autoVirtualDeviceFusionEnabled")] bool AutoVirtualDeviceFusionEnabled { [Bind ("isAutoVirtualDeviceFusionEnabled")] get; set; } + [Introduced (PlatformName.MacCatalyst, 14, 1)] [iOS (14,1)] [NoMac] [Export ("autoContentAwareDistortionCorrectionEnabled")] @@ -9596,6 +9674,7 @@ namespace AVFoundation { } #if !MONOMAC + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV, NoMac, iOS (10,0)] [BaseType (typeof(AVCapturePhotoSettings))] @@ -9619,6 +9698,7 @@ namespace AVFoundation { } #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV, Mac (10,15), iOS (10,0)] [BaseType (typeof(NSObject))] @@ -9685,6 +9765,7 @@ namespace AVFoundation { [Export ("virtualDeviceFusionEnabled")] bool VirtualDeviceFusionEnabled { [Bind ("isVirtualDeviceFusionEnabled")] get; } + [Introduced (PlatformName.MacCatalyst, 14, 1)] [iOS (14,1)] [NoMac] [Export ("contentAwareDistortionCorrectionEnabled")] @@ -9694,6 +9775,7 @@ namespace AVFoundation { interface IAVCapturePhotoCaptureDelegate {} + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV, Mac (10,15), iOS (10,0)] [Protocol, Model] @@ -9735,6 +9817,7 @@ namespace AVFoundation { void DidFinishCapture (AVCapturePhotoOutput captureOutput, AVCaptureResolvedPhotoSettings resolvedSettings, [NullAllowed] NSError error); } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV, Mac (10,15), iOS (10,0)] [BaseType (typeof(AVCaptureOutput))] @@ -9749,19 +9832,23 @@ namespace AVFoundation { [Export ("availablePhotoCodecTypes")] string [] AvailablePhotoCodecTypes { get; } + [Introduced (PlatformName.MacCatalyst, 14, 3)] [NoWatch, NoTV, NoMac, iOS (14,3)] [Export ("appleProRAWSupported")] bool AppleProRawSupported { [Bind ("isAppleProRAWSupported")] get; } + [Introduced (PlatformName.MacCatalyst, 14, 3)] [NoWatch, NoTV, NoMac, iOS (14,3)] [Export ("appleProRAWEnabled")] bool AppleProRawEnabled { [Bind ("isAppleProRAWEnabled")] get; set; } + [Introduced (PlatformName.MacCatalyst, 14, 3)] [NoWatch, NoTV, NoMac, iOS (14,3)] [Static] [Export ("isBayerRAWPixelFormat:")] bool IsBayerRawPixelFormat (CVPixelFormatType pixelFormat); + [Introduced (PlatformName.MacCatalyst, 14, 3)] [NoWatch, NoTV, NoMac, iOS (14,3)] [Static] [Export ("isAppleProRAWPixelFormat:")] @@ -9953,17 +10040,20 @@ namespace AVFoundation { [Export ("virtualDeviceConstituentPhotoDeliveryEnabled")] bool VirtualDeviceConstituentPhotoDeliveryEnabled { [Bind ("isVirtualDeviceConstituentPhotoDeliveryEnabled")] get; set; } + [Introduced (PlatformName.MacCatalyst, 14, 1)] [iOS (14,1)] [NoMac] [Export ("contentAwareDistortionCorrectionSupported")] bool ContentAwareDistortionCorrectionSupported { [Bind ("isContentAwareDistortionCorrectionSupported")] get; } + [Introduced (PlatformName.MacCatalyst, 14, 1)] [iOS (14,1)] [NoMac] [Export ("contentAwareDistortionCorrectionEnabled")] bool ContentAwareDistortionCorrectionEnabled { [Bind ("isContentAwareDistortionCorrectionEnabled")] get; set; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (AVCaptureFileOutput))] [NoTV] [NoWatch] @@ -10031,19 +10121,23 @@ namespace AVFoundation { [return: NullAllowed] NSData JpegStillToNSData (CMSampleBuffer buffer); + [Introduced (PlatformName.MacCatalyst, 14, 0)] // 5.0 [Export ("capturingStillImage")] bool CapturingStillImage { [Bind ("isCapturingStillImage")] get; } #if !MONOMAC + [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (7,0)] [Export ("automaticallyEnablesStillImageStabilizationWhenAvailable")] bool AutomaticallyEnablesStillImageStabilizationWhenAvailable { get; set; } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (7,0)] [Export ("stillImageStabilizationActive")] bool IsStillImageStabilizationActive { [Bind ("isStillImageStabilizationActive")] get; } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (7,0)] [Export ("stillImageStabilizationSupported")] bool IsStillImageStabilizationSupported { [Bind ("isStillImageStabilizationSupported")] get; } @@ -10069,11 +10163,13 @@ namespace AVFoundation { bool LensStabilizationDuringBracketedCaptureEnabled { [Bind ("isLensStabilizationDuringBracketedCaptureEnabled")] get; set; } #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (8,0), Mac (11, 0)] [Export ("highResolutionStillImageOutputEnabled")] bool HighResolutionStillImageOutputEnabled { [Bind ("isHighResolutionStillImageOutputEnabled")] get; set; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, iOS (10,0), Mac (10,15), NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // init NS_UNAVAILABLE @@ -10092,6 +10188,7 @@ namespace AVFoundation { NSSet[] SupportedMultiCamDeviceSets { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, iOS (10,0), Mac (10,15), NoWatch] enum AVCaptureDeviceType { @@ -10130,6 +10227,7 @@ namespace AVFoundation { [Field ("AVCaptureDeviceTypeBuiltInDualWideCamera")] BuiltInDualWideCamera, + [Unavailable (PlatformName.MacCatalyst)] [NoWatch, NoTV, NoiOS] [Field ("AVCaptureDeviceTypeExternalUnknown")] ExternalUnknown, @@ -10144,6 +10242,7 @@ namespace AVFoundation { #if WATCH [Static] #endif + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, Watch (6,0)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Cannot instantiate a AVCaptureDevice directly. @@ -10444,6 +10543,7 @@ namespace AVFoundation { [Export ("suspended")] bool Suspended { [Bind ("isSuspended")] get; } + [Unavailable (PlatformName.MacCatalyst)] [NoiOS, NoWatch] [Export ("linkedDevices")] AVCaptureDevice [] LinkedDevices { get; } @@ -10452,29 +10552,36 @@ namespace AVFoundation { [Export ("manufacturer")] string Manufacturer { get; } + [Unavailable (PlatformName.MacCatalyst)] [NoiOS, NoWatch] [Export ("transportControlsSpeed")] float TransportControlsSpeed { get; } // float intended + [Unavailable (PlatformName.MacCatalyst)] [NoiOS, NoWatch] [Export ("transportControlsSupported")] bool TransportControlsSupported { get; } + [Unavailable (PlatformName.MacCatalyst)] [NoWatch] [NoiOS] // TODO: We can provide a better binding once IOKit is bound kIOAudioDeviceTransportType* [Export ("transportType")] int WeakTransportType { get; } // int intended #if MONOMAC // Can't use [NoiOS] since types are also inside a block + [Unavailable (PlatformName.MacCatalyst)] [NullAllowed, Export ("activeInputSource", ArgumentSemantic.Retain)] AVCaptureDeviceInputSource ActiveInputSource { get; set; } + [Unavailable (PlatformName.MacCatalyst)] [Export ("inputSources")] AVCaptureDeviceInputSource [] InputSources { get; } + [Unavailable (PlatformName.MacCatalyst)] [Export ("setTransportControlsPlaybackMode:speed:")] void SetTransportControlsPlaybackMode (AVCaptureDeviceTransportControlsPlaybackMode mode, float speed); // Float intended + [Unavailable (PlatformName.MacCatalyst)] [Export ("transportControlsPlaybackMode")] AVCaptureDeviceTransportControlsPlaybackMode TransportControlsPlaybackMode { get; } #endif @@ -10696,7 +10803,6 @@ namespace AVFoundation { [return: NullAllowed] NSData GetExtrinsicMatrix (AVCaptureDevice fromDevice, AVCaptureDevice toDevice); - [Unavailable (PlatformName.MacCatalyst)] [NoWatch, NoTV, NoMac, iOS (13,0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("globalToneMappingEnabled")] @@ -10717,6 +10823,7 @@ namespace AVFoundation { bool GeometricDistortionCorrectionEnabled { [Bind ("isGeometricDistortionCorrectionEnabled")] get; set; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, iOS (11, 1), NoMac, NoWatch] enum AVCaptureSystemPressureLevel { [Field ("AVCaptureSystemPressureLevelNominal")] @@ -10735,6 +10842,7 @@ namespace AVFoundation { Shutdown, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, NoMac, iOS (11,1)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -10751,6 +10859,7 @@ namespace AVFoundation { AVCaptureSystemPressureFactors Factors { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [iOS (7,0)] @@ -10852,7 +10961,6 @@ namespace AVFoundation { [Export ("multiCamSupported")] bool MultiCamSupported { [Bind ("isMultiCamSupported")] get; } - [Unavailable (PlatformName.MacCatalyst)] [NoWatch, NoTV, NoMac, iOS (13, 0)] [Advice ("This API is not available when using UIKit on macOS.")] [Export ("globalToneMappingSupported")] @@ -11053,6 +11161,10 @@ namespace AVFoundation { [Field ("AVPlayerWaitingWithNoItemToPlayReason")] NSString WaitingWithNoItemToPlayReason { get; } + [iOS (14, 5), TV (14, 5), Mac (11, 3)] + [Field ("AVPlayerWaitingDuringInterstitialEventReason")] + NSString WaitingDuringInterstitialEventReason { get; } + // From AVPlayer (AVPlayerPlaybackCapabilities) Category [TV (11,2), NoWatch, NoMac, iOS (11,2)] @@ -11554,6 +11666,10 @@ namespace AVFoundation { [Export ("startsOnFirstEligibleVariant")] bool StartsOnFirstEligibleVariant { get; set; } + [Watch (7, 4), TV (14, 5), Mac (11, 3), iOS (14, 5)] + [Export ("variantPreferences", ArgumentSemantic.Assign)] + AVVariantPreferences VariantPreferences { get; set; } + [iOS (14,1)] [TV (14,2)][Mac (11,0)] [NoWatch] @@ -11561,6 +11677,15 @@ namespace AVFoundation { bool AppliesPerFrameHdrDisplayMetadata { get; set; } } + [Watch (7,4), TV (14,5), Mac (11,3), iOS (14,5)] + [Flags] + [Native] + public enum AVVariantPreferences : ulong + { + None = 0, + ScalabilityToLosslessAudio = 1 << 0 + } + [NoiOS][NoTV][NoWatch] [Category] [BaseType (typeof (AVPlayerItem))] @@ -11584,6 +11709,25 @@ namespace AVFoundation { AVContentAuthorizationStatus GetContentAuthorizationRequestStatus (); } + [NoWatch] + [Category] + [BaseType (typeof(AVPlayerItem))] + interface AVPlayerItem_AVPlayerInterstitialSupport + { + [TV (14, 5), Mac (11, 3), iOS (14, 5)] + [Export ("automaticallyHandlesInterstitialEvents")] + bool GetAutomaticallyHandlesInterstitialEvents (); + + [TV (14, 5), Mac (11, 3), iOS (14, 5)] + [Export ("setAutomaticallyHandlesInterstitialEvents:")] + void SetAutomaticallyHandlesInterstitialEvents (bool value); + + [TV (14, 5), Mac (11, 4), iOS (14, 5)] + [Export ("templatePlayerItem")] + [return: NullAllowed] + AVPlayerItem GetTemplatePlayerItem (); + } + [NoWatch, NoMac, NoiOS] [TV (13,0)] [Category] @@ -12250,6 +12394,127 @@ namespace AVFoundation { #endif } + [iOS (14,5), Mac (11,3), TV (14,5)] + [Flags] + [Native] + enum AVPlayerInterstitialEventRestrictions : ulong + { + None = 0, + ConstrainsSeekingForwardInPrimaryContent = (1 << 0), + RequiresPlaybackAtPreferredRateForAdvancement = (1 << 2), + DefaultPolicy = None + } + + [TV (14,5), Mac (11,3), iOS (14,5)] + [BaseType (typeof(NSObject))] + [DisableDefaultCtor] + interface AVPlayerInterstitialEvent + { + [Static] + [Export ("interstitialEventWithPrimaryItem:time:templateItems:restrictions:resumptionOffset:")] + AVPlayerInterstitialEvent InterstitialEventWithPrimaryItem (AVPlayerItem primaryItem, CMTime time, AVPlayerItem[] templateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); + + [Static] + [Export ("playerInterstitialEventWithPrimaryItem:time:interstitialTemplateItems:restrictions:resumptionOffset:")] + AVPlayerInterstitialEvent PlayerInterstitialEventWithPrimaryItem (AVPlayerItem primaryItem, CMTime time, AVPlayerItem[] interstitialTemplateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); + + [Static] + [Export ("interstitialEventWithPrimaryItem:date:templateItems:restrictions:resumptionOffset:")] + AVPlayerInterstitialEvent InterstitialEventWithPrimaryItem (AVPlayerItem primaryItem, NSDate date, AVPlayerItem[] templateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); + + [Static] + [Export ("playerInterstitialEventWithPrimaryItem:date:interstitialTemplateItems:restrictions:resumptionOffset:")] + AVPlayerInterstitialEvent PlayerInterstitialEventWithPrimaryItem (AVPlayerItem primaryItem, NSDate date, AVPlayerItem[] interstitialTemplateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); + + [NullAllowed, Export ("primaryItem", ArgumentSemantic.Weak)] + AVPlayerItem PrimaryItem { get; } + + [Export ("time")] + CMTime Time { get; } + + [NullAllowed, Export ("date")] + NSDate Date { get; } + + [Export ("templateItems")] + AVPlayerItem[] TemplateItems { get; } + + [Export ("interstitialTemplateItems")] + AVPlayerItem[] InterstitialTemplateItems { get; } + + [Export ("restrictions")] + AVPlayerInterstitialEventRestrictions Restrictions { get; } + + [Export ("resumptionOffset")] + CMTime ResumptionOffset { get; } + } + + [DisableDefaultCtor] + [TV (14,5), Mac (11,3), iOS (14,5)] + [BaseType (typeof(NSObject))] + interface AVPlayerInterstitialEventObserver + { + [Static] + [Export ("interstitialEventObserverWithPrimaryPlayer:")] + AVPlayerInterstitialEventObserver InterstitialEventObserverWithPrimaryPlayer (AVPlayer primaryPlayer); + + [Static] + [Export ("playerInterstitialEventObserverWithPrimaryPlayer:")] + AVPlayerInterstitialEventObserver PlayerInterstitialEventObserverWithPrimaryPlayer (AVPlayer primaryPlayer); + + [Export ("initWithPrimaryPlayer:")] + [DesignatedInitializer] + IntPtr Constructor (AVPlayer primaryPlayer); + + [NullAllowed, Export ("primaryPlayer", ArgumentSemantic.Weak)] + AVPlayer PrimaryPlayer { get; } + + [NullAllowed, Export ("interstitialPlayer", ArgumentSemantic.Weak)] + AVQueuePlayer InterstitialPlayer { get; } + + [Export ("events")] + AVPlayerInterstitialEvent[] Events { get; } + + [Export ("interstitialEvents")] + AVPlayerInterstitialEvent[] InterstitialEvents { get; } + + [NullAllowed, Export ("currentEvent")] + AVPlayerInterstitialEvent CurrentEvent { get; } + + [Field ("AVPlayerInterstitialEventObserverEventsDidChangeNotification")] + [Notification] + NSString EventsDidChangeNotification { get; } + + [Field ("AVPlayerInterstitialEventObserverCurrentEventDidChangeNotification")] + [Notification] + NSString CurrentEventDidChangeNotification { get; } + } + + [DisableDefaultCtor] + [TV (14,5), Mac (11,3), iOS (14,5)] + [BaseType (typeof(AVPlayerInterstitialEventObserver))] + interface AVPlayerInterstitialEventController + { + [Static] + [Export ("interstitialEventControllerWithPrimaryPlayer:")] + AVPlayerInterstitialEventController InterstitialEventControllerWithPrimaryPlayer (AVPlayer primaryPlayer); + + [Static] + [Export ("playerInterstitialEventControllerWithPrimaryPlayer:")] + AVPlayerInterstitialEventController PlayerInterstitialEventControllerWithPrimaryPlayer (AVPlayer primaryPlayer); + + [Export ("initWithPrimaryPlayer:")] + IntPtr Constructor (AVPlayer primaryPlayer); + + [NullAllowed, Export ("events", ArgumentSemantic.Copy)] + AVPlayerInterstitialEvent[] Events { get; set; } + + [NullAllowed, Export ("interstitialEvents", ArgumentSemantic.Copy)] + AVPlayerInterstitialEvent[] InterstitialEvents { get; set; } + + [Export ("cancelCurrentEventWithResumptionOffset:")] + void CancelCurrentEventWithResumptionOffset (CMTime resumptionOffset); + } + [Watch (6,0)] [BaseType (typeof (NSObject))] [Model] @@ -12461,6 +12726,21 @@ namespace AVFoundation { [Notification] NSString RequiresFlushToResumeDecodingDidChangeNotification { get; } + [TV (14, 5), Watch (7, 4), Mac (11, 3), iOS (14, 5)] + [Field ("AVSampleBufferDisplayLayerOutputObscuredDueToInsufficientExternalProtectionDidChangeNotification")] + [Notification] + NSString OutputObscuredDueToInsufficientExternalProtectionDidChangeNotification { get; } + + } + + [NoWatch] + [Category] + [BaseType (typeof(AVSampleBufferDisplayLayer))] + interface AVSampleBufferDisplayLayer_ProtectedContent + { + [TV (14, 5), Mac (11, 3), iOS (14, 5)] + [Export ("outputObscuredDueToInsufficientExternalProtection")] + bool GetOutputObscuredDueToInsufficientExternalProtection (); } [NoWatch] @@ -12765,6 +13045,10 @@ namespace AVFoundation { [Field ("AVAssetDownloadTaskPrefersHDRKey")] NSString PrefersHdrKey { get; } + [NoWatch, NoTV, Mac (11, 3), iOS (14, 5)] + [Field ("AVAssetDownloadTaskPrefersLosslessAudioKey")] + NSString AVAssetDownloadTaskPrefersLosslessAudioKey { get; } + [NoWatch, NoTV, iOS (14, 0)] [Field ("AVAssetDownloadTaskMinimumRequiredPresentationSizeKey")] NSString MinimumRequiredPresentationSizeKey { get; } @@ -13210,6 +13494,7 @@ namespace AVFoundation { } #if !MONOMAC // FIXME: Unsure about if CMMetadataFormatDescription will be an INativeObject and will need manual binding for Classic + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch] [NoTV] [iOS (9,0)] @@ -13326,6 +13611,10 @@ namespace AVFoundation { [TV (10,2), Mac (10,12,4), iOS (10,3), Watch (7,0)] [Protocol] interface AVContentKeyRecipient { + [TV (14,5), Mac (11,3), iOS (14,5), Watch (7,4)] + [Export ("contentKeySession:didProvideContentKey:")] + void DidProvideContentKey (AVContentKeySession contentKeySession, AVContentKey contentKey); + [Abstract] [Export ("mayRequireContentKeysForMediaDataProcessing")] bool MayRequireContentKeysForMediaDataProcessing { get; } @@ -13510,6 +13799,14 @@ namespace AVFoundation { [TV (13,0), Mac (10,15), iOS (13,0)] [Field ("AVContentKeyRequestRequiresValidationDataInSecureTokenKey")] NSString RequiresValidationDataInSecureTokenKey { get; } + + [Watch (7,4), TV (14,5), Mac (11,3), iOS (14,5)] + [Export ("contentKeySpecifier")] + AVContentKeySpecifier ContentKeySpecifier { get; } + + [Watch (7,4), TV (14,5), Mac (11,3), iOS (14,5)] + [NullAllowed, Export ("contentKey")] + AVContentKey ContentKey { get; } } [Category] @@ -13552,6 +13849,35 @@ namespace AVFoundation { AVContentKeyResponse _InitWithAuthorizationToken (NSData authorizationTokenData); } + [TV (14,5), Mac (11,3), iOS (14,5), Watch (7,4)] + [BaseType (typeof(NSObject))] + interface AVContentKeySpecifier + { + [Static] + [Export ("contentKeySpecifierForKeySystem:identifier:options:")] + AVContentKeySpecifier ContentKeySpecifierForKeySystem (AVContentKeySystem keySystem, NSObject contentKeyIdentifier, NSDictionary options); + + [Export ("initForKeySystem:identifier:options:")] + IntPtr Constructor (AVContentKeySystem keySystem, NSObject contentKeyIdentifier, NSDictionary options); + + [Export ("keySystem")] + AVContentKeySystem KeySystem { get; } + + [Export ("identifier")] + NSObject Identifier { get; } + + [Export ("options")] + NSDictionary Options { get; } + } + + [TV (14,5), Mac (11,3), iOS (14,5), Watch (7,4)] + [BaseType (typeof(NSObject))] + interface AVContentKey + { + [Export ("contentKeySpecifier")] + AVContentKeySpecifier ContentKeySpecifier { get; } + } + [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] [DisableDefaultCtor] [BaseType (typeof(NSObject))] @@ -13568,6 +13894,8 @@ namespace AVFoundation { } interface IAVCapturePhotoFileDataRepresentationCustomizer {} + + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, NoMac, iOS (12,0)] [Protocol] interface AVCapturePhotoFileDataRepresentationCustomizer @@ -13593,11 +13921,13 @@ namespace AVFoundation { [return: NullAllowed] AVSemanticSegmentationMatte GetReplacementSemanticSegmentationMatte (NSString semanticSegmentationMatteType, AVCapturePhoto photo); + [Introduced (PlatformName.MacCatalyst, 14, 3)] [NoWatch, NoTV, NoMac, iOS (14,3)] [Export ("replacementAppleProRAWCompressionSettingsForPhoto:defaultSettings:maximumBitDepth:")] NSDictionary GetReplacementAppleProRawCompressionSettings (AVCapturePhoto photo, NSDictionary defaultSettings, nint maximumBitDepth); } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV, iOS (11,0), NoWatch, Mac (10,15)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -13698,6 +14028,7 @@ namespace AVFoundation { AVSemanticSegmentationMatte GetSemanticSegmentationMatte ([BindAs (typeof (AVSemanticSegmentationMatteType))] NSString semanticSegmentationMatteType); } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [Watch (6,0), TV (12,0), Mac (10,14), iOS (12,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -13735,6 +14066,7 @@ namespace AVFoundation { bool ProvidesExpiredSessionReports { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] enum AVSemanticSegmentationMatteType { [DefaultEnumValue] @@ -13746,6 +14078,7 @@ namespace AVFoundation { Hair, [Field ("AVSemanticSegmentationMatteTypeTeeth")] Teeth, + [Introduced (PlatformName.MacCatalyst, 14, 1)] [iOS (14,1)] [Mac (11,0)] [NoWatch][NoTV] @@ -13753,6 +14086,7 @@ namespace AVFoundation { Glasses, } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] @@ -13844,6 +14178,7 @@ namespace AVFoundation { CMTime EndCompositionTime { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, NoMac, iOS (13,0)] [BaseType (typeof(AVCaptureSession))] interface AVCaptureMultiCamSession { @@ -13858,6 +14193,7 @@ namespace AVFoundation { float SystemPressureCost { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, Mac (10,15), iOS (13,0)] [BaseType (typeof(AVMetadataObject))] [DisableDefaultCtor] @@ -13866,24 +14202,28 @@ namespace AVFoundation { nint BodyId { get; } } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, Mac (10,15), iOS (13,0)] [BaseType (typeof(AVMetadataBodyObject))] [DisableDefaultCtor] interface AVMetadataCatBodyObject : NSCopying { } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, Mac (10,15), iOS (13,0)] [BaseType (typeof(AVMetadataBodyObject))] [DisableDefaultCtor] interface AVMetadataDogBodyObject : NSCopying { } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, Mac (10,15), iOS (13,0)] [BaseType (typeof(AVMetadataBodyObject))] [DisableDefaultCtor] interface AVMetadataHumanBodyObject : NSCopying { } + [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoWatch, NoTV, Mac (10,15), iOS (13,0)] [BaseType (typeof(AVMetadataObject))] [DisableDefaultCtor] diff --git a/src/frameworks.sources b/src/frameworks.sources index 1583820c1a..a1d23dc003 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -256,6 +256,7 @@ AVFOUNDATION_SOURCES = \ AVFoundation/AVCaptureVideoPreviewLayer.cs \ AVFoundation/AVCompat.cs \ AVFoundation/AVContentKeyResponse.cs \ + AVFoundation/AVContentKeySession.cs \ AVFoundation/AVDepthData.cs \ AVFoundation/AVFragmentedAsset.cs \ AVFoundation/AVFragmentedAssetTrack.cs \ diff --git a/tests/introspection/Mac/MacApiSelectorTest.cs b/tests/introspection/Mac/MacApiSelectorTest.cs index f11b4ba9f1..2517ff922e 100644 --- a/tests/introspection/Mac/MacApiSelectorTest.cs +++ b/tests/introspection/Mac/MacApiSelectorTest.cs @@ -1120,6 +1120,9 @@ namespace Introspection { case "cancelPendingPrerolls": // 10.8+ case "masterClock": // 10.8+ case "setMasterClock:": // 10.8+ + // AVUrlAsset + case "contentKeySession:didProvideContentKey:": // fails because it is in-lined via protocol AVContentKeyRecipient + return true; // NSDateComponents case "isLeapMonth": // 10.8+ case "setLeapMonth:": // 10.8+ diff --git a/tests/introspection/iOS/iOSApiSelectorTest.cs b/tests/introspection/iOS/iOSApiSelectorTest.cs index edc94dc823..ecbc8384da 100644 --- a/tests/introspection/iOS/iOSApiSelectorTest.cs +++ b/tests/introspection/iOS/iOSApiSelectorTest.cs @@ -158,6 +158,14 @@ namespace Introspection { var declaredType = method.DeclaringType; switch (declaredType.Name) { + case "AVUrlAsset": + switch (name) { + // fails because it is in-lined via protocol AVContentKeyRecipient + case "contentKeySession:didProvideContentKey:": + return true; + break; + } + break; case "NSNull": switch (name) { // conformance to CAAction started with iOS8 diff --git a/tests/xtro-sharpie/iOS-AVFoundation.ignore b/tests/xtro-sharpie/iOS-AVFoundation.ignore index 776d8c4426..63dbfee088 100644 --- a/tests/xtro-sharpie/iOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/iOS-AVFoundation.ignore @@ -17,3 +17,6 @@ # Initial result from new rule missing-release-attribute-on-return-value !missing-release-attribute-on-return-value! CoreMedia.CMSampleBuffer AVFoundation.AVAssetReaderOutput::CopyNextSampleBuffer()'s selector's ('copyNextSampleBuffer') Objective-C method family ('copy') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! CoreVideo.CVPixelBuffer AVFoundation.AVVideoCompositionRenderContext::CreatePixelBuffer()'s selector's ('newPixelBuffer') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. + +# no tests/samples +!missing-pinvoke! AVSampleBufferAttachContentKey is not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/iOS-AVFoundation.todo b/tests/xtro-sharpie/iOS-AVFoundation.todo index 7630a29ed6..e69de29bb2 100644 --- a/tests/xtro-sharpie/iOS-AVFoundation.todo +++ b/tests/xtro-sharpie/iOS-AVFoundation.todo @@ -1,64 +0,0 @@ -!missing-enum! AVAudioSessionInterruptionReason not bound -!missing-enum! AVPlayerInterstitialEventRestrictions not bound -!missing-enum! AVVariantPreferences not bound -!missing-enum-value! AVAudioSessionCategoryOptions native value AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption = 128 not bound -!missing-field! AVAssetDownloadTaskPrefersLosslessAudioKey not bound -!missing-field! AVAudioSessionInterruptionReasonKey not bound -!missing-field! AVPlayerInterstitialEventObserverCurrentEventDidChangeNotification not bound -!missing-field! AVPlayerInterstitialEventObserverEventsDidChangeNotification not bound -!missing-field! AVPlayerWaitingDuringInterstitialEventReason not bound -!missing-field! AVSampleBufferDisplayLayerOutputObscuredDueToInsufficientExternalProtectionDidChangeNotification not bound -!missing-pinvoke! AVSampleBufferAttachContentKey is not bound -!missing-protocol-member! AVContentKeyRecipient::contentKeySession:didProvideContentKey: not found -!missing-protocol-member! AVQueuedSampleBufferRendering::hasSufficientMediaDataForReliablePlaybackStart not found -!missing-selector! +AVContentKeySpecifier::contentKeySpecifierForKeySystem:identifier:options: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:date:templateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:time:templateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::playerInterstitialEventWithPrimaryItem:date:interstitialTemplateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::playerInterstitialEventWithPrimaryItem:time:interstitialTemplateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEventController::interstitialEventControllerWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventController::playerInterstitialEventControllerWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventObserver::interstitialEventObserverWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventObserver::playerInterstitialEventObserverWithPrimaryPlayer: not bound -!missing-selector! AVAudioSession::prefersNoInterruptionsFromSystemAlerts not bound -!missing-selector! AVAudioSession::setPrefersNoInterruptionsFromSystemAlerts:error: not bound -!missing-selector! AVContentKey::contentKeySpecifier not bound -!missing-selector! AVContentKeyRequest::contentKey not bound -!missing-selector! AVContentKeyRequest::contentKeySpecifier not bound -!missing-selector! AVContentKeySpecifier::identifier not bound -!missing-selector! AVContentKeySpecifier::initForKeySystem:identifier:options: not bound -!missing-selector! AVContentKeySpecifier::keySystem not bound -!missing-selector! AVContentKeySpecifier::options not bound -!missing-selector! AVPlayerInterstitialEvent::date not bound -!missing-selector! AVPlayerInterstitialEvent::interstitialTemplateItems not bound -!missing-selector! AVPlayerInterstitialEvent::primaryItem not bound -!missing-selector! AVPlayerInterstitialEvent::restrictions not bound -!missing-selector! AVPlayerInterstitialEvent::resumptionOffset not bound -!missing-selector! AVPlayerInterstitialEvent::templateItems not bound -!missing-selector! AVPlayerInterstitialEvent::time not bound -!missing-selector! AVPlayerInterstitialEventController::cancelCurrentEventWithResumptionOffset: not bound -!missing-selector! AVPlayerInterstitialEventController::events not bound -!missing-selector! AVPlayerInterstitialEventController::initWithPrimaryPlayer: not bound -!missing-selector! AVPlayerInterstitialEventController::interstitialEvents not bound -!missing-selector! AVPlayerInterstitialEventController::setEvents: not bound -!missing-selector! AVPlayerInterstitialEventController::setInterstitialEvents: not bound -!missing-selector! AVPlayerInterstitialEventObserver::currentEvent not bound -!missing-selector! AVPlayerInterstitialEventObserver::events not bound -!missing-selector! AVPlayerInterstitialEventObserver::initWithPrimaryPlayer: not bound -!missing-selector! AVPlayerInterstitialEventObserver::interstitialEvents not bound -!missing-selector! AVPlayerInterstitialEventObserver::interstitialPlayer not bound -!missing-selector! AVPlayerInterstitialEventObserver::primaryPlayer not bound -!missing-selector! AVPlayerItem::automaticallyHandlesInterstitialEvents not bound -!missing-selector! AVPlayerItem::setAutomaticallyHandlesInterstitialEvents: not bound -!missing-selector! AVPlayerItem::setVariantPreferences: not bound -!missing-selector! AVPlayerItem::templatePlayerItem not bound -!missing-selector! AVPlayerItem::variantPreferences not bound -!missing-selector! AVSampleBufferDisplayLayer::outputObscuredDueToInsufficientExternalProtection not bound -!missing-selector! AVSampleBufferRenderSynchronizer::delaysRateChangeUntilHasSufficientMediaData not bound -!missing-selector! AVSampleBufferRenderSynchronizer::setDelaysRateChangeUntilHasSufficientMediaData: not bound -!missing-selector! AVSampleBufferRenderSynchronizer::setRate:time:atHostTime: not bound -!missing-type! AVContentKey not bound -!missing-type! AVContentKeySpecifier not bound -!missing-type! AVPlayerInterstitialEvent not bound -!missing-type! AVPlayerInterstitialEventController not bound -!missing-type! AVPlayerInterstitialEventObserver not bound diff --git a/tests/xtro-sharpie/macOS-AVFoundation.ignore b/tests/xtro-sharpie/macOS-AVFoundation.ignore index 4e84f5348a..9dc00b30b1 100644 --- a/tests/xtro-sharpie/macOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/macOS-AVFoundation.ignore @@ -54,3 +54,6 @@ !extra-enum-value! Managed value -11819 for AVError.MediaServicesWereReset not found in native headers !extra-enum-value! Managed value -11837 for AVError.DeviceIsNotAvailableInBackground not found in native headers !extra-enum-value! Managed value -11847 for AVError.OperationInterrupted not found in native headers + +# no tests/samples +!missing-pinvoke! AVSampleBufferAttachContentKey is not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/macOS-AVFoundation.todo b/tests/xtro-sharpie/macOS-AVFoundation.todo index 887e0c00b0..e69de29bb2 100644 --- a/tests/xtro-sharpie/macOS-AVFoundation.todo +++ b/tests/xtro-sharpie/macOS-AVFoundation.todo @@ -1,60 +0,0 @@ -!missing-enum! AVAudioSessionInterruptionReason not bound -!missing-enum! AVPlayerInterstitialEventRestrictions not bound -!missing-enum! AVVariantPreferences not bound -!missing-enum-value! AVAudioSessionCategoryOptions native value AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption = 128 not bound -!missing-field! AVPlayerInterstitialEventObserverCurrentEventDidChangeNotification not bound -!missing-field! AVPlayerInterstitialEventObserverEventsDidChangeNotification not bound -!missing-field! AVPlayerWaitingDuringInterstitialEventReason not bound -!missing-field! AVSampleBufferDisplayLayerOutputObscuredDueToInsufficientExternalProtectionDidChangeNotification not bound -!missing-pinvoke! AVSampleBufferAttachContentKey is not bound -!missing-protocol-member! AVContentKeyRecipient::contentKeySession:didProvideContentKey: not found -!missing-protocol-member! AVQueuedSampleBufferRendering::hasSufficientMediaDataForReliablePlaybackStart not found -!missing-selector! +AVContentKeySpecifier::contentKeySpecifierForKeySystem:identifier:options: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:date:templateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:time:templateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::playerInterstitialEventWithPrimaryItem:date:interstitialTemplateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::playerInterstitialEventWithPrimaryItem:time:interstitialTemplateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEventController::interstitialEventControllerWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventController::playerInterstitialEventControllerWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventObserver::interstitialEventObserverWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventObserver::playerInterstitialEventObserverWithPrimaryPlayer: not bound -!missing-selector! AVContentKey::contentKeySpecifier not bound -!missing-selector! AVContentKeyRequest::contentKey not bound -!missing-selector! AVContentKeyRequest::contentKeySpecifier not bound -!missing-selector! AVContentKeySpecifier::identifier not bound -!missing-selector! AVContentKeySpecifier::initForKeySystem:identifier:options: not bound -!missing-selector! AVContentKeySpecifier::keySystem not bound -!missing-selector! AVContentKeySpecifier::options not bound -!missing-selector! AVPlayerInterstitialEvent::date not bound -!missing-selector! AVPlayerInterstitialEvent::interstitialTemplateItems not bound -!missing-selector! AVPlayerInterstitialEvent::primaryItem not bound -!missing-selector! AVPlayerInterstitialEvent::restrictions not bound -!missing-selector! AVPlayerInterstitialEvent::resumptionOffset not bound -!missing-selector! AVPlayerInterstitialEvent::templateItems not bound -!missing-selector! AVPlayerInterstitialEvent::time not bound -!missing-selector! AVPlayerInterstitialEventController::cancelCurrentEventWithResumptionOffset: not bound -!missing-selector! AVPlayerInterstitialEventController::events not bound -!missing-selector! AVPlayerInterstitialEventController::initWithPrimaryPlayer: not bound -!missing-selector! AVPlayerInterstitialEventController::interstitialEvents not bound -!missing-selector! AVPlayerInterstitialEventController::setEvents: not bound -!missing-selector! AVPlayerInterstitialEventController::setInterstitialEvents: not bound -!missing-selector! AVPlayerInterstitialEventObserver::currentEvent not bound -!missing-selector! AVPlayerInterstitialEventObserver::events not bound -!missing-selector! AVPlayerInterstitialEventObserver::initWithPrimaryPlayer: not bound -!missing-selector! AVPlayerInterstitialEventObserver::interstitialEvents not bound -!missing-selector! AVPlayerInterstitialEventObserver::interstitialPlayer not bound -!missing-selector! AVPlayerInterstitialEventObserver::primaryPlayer not bound -!missing-selector! AVPlayerItem::automaticallyHandlesInterstitialEvents not bound -!missing-selector! AVPlayerItem::setAutomaticallyHandlesInterstitialEvents: not bound -!missing-selector! AVPlayerItem::setVariantPreferences: not bound -!missing-selector! AVPlayerItem::templatePlayerItem not bound -!missing-selector! AVPlayerItem::variantPreferences not bound -!missing-selector! AVSampleBufferDisplayLayer::outputObscuredDueToInsufficientExternalProtection not bound -!missing-selector! AVSampleBufferRenderSynchronizer::delaysRateChangeUntilHasSufficientMediaData not bound -!missing-selector! AVSampleBufferRenderSynchronizer::setDelaysRateChangeUntilHasSufficientMediaData: not bound -!missing-selector! AVSampleBufferRenderSynchronizer::setRate:time:atHostTime: not bound -!missing-type! AVContentKey not bound -!missing-type! AVContentKeySpecifier not bound -!missing-type! AVPlayerInterstitialEvent not bound -!missing-type! AVPlayerInterstitialEventController not bound -!missing-type! AVPlayerInterstitialEventObserver not bound diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.ignore b/tests/xtro-sharpie/tvOS-AVFoundation.ignore index ac0f1c468c..b394b85c46 100644 --- a/tests/xtro-sharpie/tvOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/tvOS-AVFoundation.ignore @@ -12,3 +12,6 @@ # Initial result from new rule missing-release-attribute-on-return-value !missing-release-attribute-on-return-value! CoreMedia.CMSampleBuffer AVFoundation.AVAssetReaderOutput::CopyNextSampleBuffer()'s selector's ('copyNextSampleBuffer') Objective-C method family ('copy') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. !missing-release-attribute-on-return-value! CoreVideo.CVPixelBuffer AVFoundation.AVVideoCompositionRenderContext::CreatePixelBuffer()'s selector's ('newPixelBuffer') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. + +# no tests/samples +!missing-pinvoke! AVSampleBufferAttachContentKey is not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.todo b/tests/xtro-sharpie/tvOS-AVFoundation.todo index 308dc927e4..e69de29bb2 100644 --- a/tests/xtro-sharpie/tvOS-AVFoundation.todo +++ b/tests/xtro-sharpie/tvOS-AVFoundation.todo @@ -1,92 +0,0 @@ -!missing-enum! AVAudioSessionInterruptionReason not bound -!missing-enum! AVPlayerInterstitialEventRestrictions not bound -!missing-enum! AVVariantPreferences not bound -!missing-enum-value! AVAudioSessionCategoryOptions native value AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption = 128 not bound -!missing-field! AVPlayerInterstitialEventObserverCurrentEventDidChangeNotification not bound -!missing-field! AVPlayerInterstitialEventObserverEventsDidChangeNotification not bound -!missing-field! AVPlayerWaitingDuringInterstitialEventReason not bound -!missing-field! AVSampleBufferDisplayLayerOutputObscuredDueToInsufficientExternalProtectionDidChangeNotification not bound -!missing-pinvoke! AVSampleBufferAttachContentKey is not bound -!missing-protocol-member! AVContentKeyRecipient::contentKeySession:didProvideContentKey: not found -!missing-protocol-member! AVQueuedSampleBufferRendering::hasSufficientMediaDataForReliablePlaybackStart not found -!missing-selector! +AVContentKeySpecifier::contentKeySpecifierForKeySystem:identifier:options: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:date:templateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:time:templateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::playerInterstitialEventWithPrimaryItem:date:interstitialTemplateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::playerInterstitialEventWithPrimaryItem:time:interstitialTemplateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEventController::interstitialEventControllerWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventController::playerInterstitialEventControllerWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventObserver::interstitialEventObserverWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventObserver::playerInterstitialEventObserverWithPrimaryPlayer: not bound -!missing-selector! AVAudioSession::prefersNoInterruptionsFromSystemAlerts not bound -!missing-selector! AVAudioSession::setPrefersNoInterruptionsFromSystemAlerts:error: not bound -!missing-selector! AVContentKey::contentKeySpecifier not bound -!missing-selector! AVContentKeyRequest::contentKey not bound -!missing-selector! AVContentKeyRequest::contentKeySpecifier not bound -!missing-selector! AVContentKeySpecifier::identifier not bound -!missing-selector! AVContentKeySpecifier::initForKeySystem:identifier:options: not bound -!missing-selector! AVContentKeySpecifier::keySystem not bound -!missing-selector! AVContentKeySpecifier::options not bound -!missing-selector! AVPlayerInterstitialEvent::date not bound -!missing-selector! AVPlayerInterstitialEvent::interstitialTemplateItems not bound -!missing-selector! AVPlayerInterstitialEvent::primaryItem not bound -!missing-selector! AVPlayerInterstitialEvent::restrictions not bound -!missing-selector! AVPlayerInterstitialEvent::resumptionOffset not bound -!missing-selector! AVPlayerInterstitialEvent::templateItems not bound -!missing-selector! AVPlayerInterstitialEvent::time not bound -!missing-selector! AVPlayerInterstitialEventController::cancelCurrentEventWithResumptionOffset: not bound -!missing-selector! AVPlayerInterstitialEventController::events not bound -!missing-selector! AVPlayerInterstitialEventController::initWithPrimaryPlayer: not bound -!missing-selector! AVPlayerInterstitialEventController::interstitialEvents not bound -!missing-selector! AVPlayerInterstitialEventController::setEvents: not bound -!missing-selector! AVPlayerInterstitialEventController::setInterstitialEvents: not bound -!missing-selector! AVPlayerInterstitialEventObserver::currentEvent not bound -!missing-selector! AVPlayerInterstitialEventObserver::events not bound -!missing-selector! AVPlayerInterstitialEventObserver::initWithPrimaryPlayer: not bound -!missing-selector! AVPlayerInterstitialEventObserver::interstitialEvents not bound -!missing-selector! AVPlayerInterstitialEventObserver::interstitialPlayer not bound -!missing-selector! AVPlayerInterstitialEventObserver::primaryPlayer not bound -!missing-selector! AVPlayerItem::automaticallyHandlesInterstitialEvents not bound -!missing-selector! AVPlayerItem::setAutomaticallyHandlesInterstitialEvents: not bound -!missing-selector! AVPlayerItem::setVariantPreferences: not bound -!missing-selector! AVPlayerItem::templatePlayerItem not bound -!missing-selector! AVPlayerItem::variantPreferences not bound -!missing-selector! AVSampleBufferDisplayLayer::outputObscuredDueToInsufficientExternalProtection not bound -!missing-selector! AVSampleBufferRenderSynchronizer::delaysRateChangeUntilHasSufficientMediaData not bound -!missing-selector! AVSampleBufferRenderSynchronizer::setDelaysRateChangeUntilHasSufficientMediaData: not bound -!missing-selector! AVSampleBufferRenderSynchronizer::setRate:time:atHostTime: not bound -!missing-type! AVContentKey not bound -!missing-type! AVContentKeySpecifier not bound -!missing-type! AVPlayerInterstitialEvent not bound -!missing-type! AVPlayerInterstitialEventController not bound -!missing-type! AVPlayerInterstitialEventObserver not bound -## appended from unclassified file -!missing-field! AVMetadataObjectTypeAztecCode not bound -!missing-field! AVMetadataObjectTypeCode128Code not bound -!missing-field! AVMetadataObjectTypeCode39Code not bound -!missing-field! AVMetadataObjectTypeCode39Mod43Code not bound -!missing-field! AVMetadataObjectTypeCode93Code not bound -!missing-field! AVMetadataObjectTypeDataMatrixCode not bound -!missing-field! AVMetadataObjectTypeEAN13Code not bound -!missing-field! AVMetadataObjectTypeEAN8Code not bound -!missing-field! AVMetadataObjectTypeFace not bound -!missing-field! AVMetadataObjectTypeInterleaved2of5Code not bound -!missing-field! AVMetadataObjectTypeITF14Code not bound -!missing-field! AVMetadataObjectTypePDF417Code not bound -!missing-field! AVMetadataObjectTypeQRCode not bound -!missing-field! AVMetadataObjectTypeUPCECode not bound -!missing-selector! AVMetadataFaceObject::faceID not bound -!missing-selector! AVMetadataFaceObject::hasRollAngle not bound -!missing-selector! AVMetadataFaceObject::hasYawAngle not bound -!missing-selector! AVMetadataFaceObject::rollAngle not bound -!missing-selector! AVMetadataFaceObject::yawAngle not bound -!missing-selector! AVMetadataMachineReadableCodeObject::corners not bound -!missing-selector! AVMetadataMachineReadableCodeObject::descriptor not bound -!missing-selector! AVMetadataMachineReadableCodeObject::stringValue not bound -!missing-selector! AVMetadataObject::bounds not bound -!missing-selector! AVMetadataObject::duration not bound -!missing-selector! AVMetadataObject::time not bound -!missing-selector! AVMetadataObject::type not bound -!missing-type! AVMetadataFaceObject not bound -!missing-type! AVMetadataMachineReadableCodeObject not bound -!missing-type! AVMetadataObject not bound diff --git a/tests/xtro-sharpie/watchOS-AVFoundation.ignore b/tests/xtro-sharpie/watchOS-AVFoundation.ignore index 2f0595d8ef..af4f1fb523 100644 --- a/tests/xtro-sharpie/watchOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/watchOS-AVFoundation.ignore @@ -23,3 +23,11 @@ # The related keys are inside AVVideo which is not available in watchOS !missing-field! AVVideoAppleProRAWBitDepthKey not bound + +# no tests/samples +!missing-pinvoke! AVSampleBufferAttachContentKey is not bound + +# members of that category are not annotated as supporting watchOS +!missing-selector! AVPlayerItem::automaticallyHandlesInterstitialEvents not bound +!missing-selector! AVPlayerItem::setAutomaticallyHandlesInterstitialEvents: not bound +!missing-selector! AVPlayerItem::templatePlayerItem not bound \ No newline at end of file diff --git a/tests/xtro-sharpie/watchOS-AVFoundation.todo b/tests/xtro-sharpie/watchOS-AVFoundation.todo index dd349c3fa2..e69de29bb2 100644 --- a/tests/xtro-sharpie/watchOS-AVFoundation.todo +++ b/tests/xtro-sharpie/watchOS-AVFoundation.todo @@ -1,61 +0,0 @@ -!missing-enum! AVAudioSessionInterruptionReason not bound -!missing-enum! AVPlayerInterstitialEventRestrictions not bound -!missing-enum! AVVariantPreferences not bound -!missing-enum-value! AVAudioSessionCategoryOptions native value AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption = 128 not bound -!missing-field! AVAudioSessionInterruptionReasonKey not bound -!missing-field! AVPlayerInterstitialEventObserverCurrentEventDidChangeNotification not bound -!missing-field! AVPlayerInterstitialEventObserverEventsDidChangeNotification not bound -!missing-field! AVPlayerWaitingDuringInterstitialEventReason not bound -!missing-pinvoke! AVSampleBufferAttachContentKey is not bound -!missing-protocol-member! AVContentKeyRecipient::contentKeySession:didProvideContentKey: not found -!missing-protocol-member! AVQueuedSampleBufferRendering::hasSufficientMediaDataForReliablePlaybackStart not found -!missing-selector! +AVContentKeySpecifier::contentKeySpecifierForKeySystem:identifier:options: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:date:templateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:time:templateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::playerInterstitialEventWithPrimaryItem:date:interstitialTemplateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEvent::playerInterstitialEventWithPrimaryItem:time:interstitialTemplateItems:restrictions:resumptionOffset: not bound -!missing-selector! +AVPlayerInterstitialEventController::interstitialEventControllerWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventController::playerInterstitialEventControllerWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventObserver::interstitialEventObserverWithPrimaryPlayer: not bound -!missing-selector! +AVPlayerInterstitialEventObserver::playerInterstitialEventObserverWithPrimaryPlayer: not bound -!missing-selector! AVAudioSession::prefersNoInterruptionsFromSystemAlerts not bound -!missing-selector! AVAudioSession::setPrefersNoInterruptionsFromSystemAlerts:error: not bound -!missing-selector! AVContentKey::contentKeySpecifier not bound -!missing-selector! AVContentKeyRequest::contentKey not bound -!missing-selector! AVContentKeyRequest::contentKeySpecifier not bound -!missing-selector! AVContentKeySpecifier::identifier not bound -!missing-selector! AVContentKeySpecifier::initForKeySystem:identifier:options: not bound -!missing-selector! AVContentKeySpecifier::keySystem not bound -!missing-selector! AVContentKeySpecifier::options not bound -!missing-selector! AVPlayerInterstitialEvent::date not bound -!missing-selector! AVPlayerInterstitialEvent::interstitialTemplateItems not bound -!missing-selector! AVPlayerInterstitialEvent::primaryItem not bound -!missing-selector! AVPlayerInterstitialEvent::restrictions not bound -!missing-selector! AVPlayerInterstitialEvent::resumptionOffset not bound -!missing-selector! AVPlayerInterstitialEvent::templateItems not bound -!missing-selector! AVPlayerInterstitialEvent::time not bound -!missing-selector! AVPlayerInterstitialEventController::cancelCurrentEventWithResumptionOffset: not bound -!missing-selector! AVPlayerInterstitialEventController::events not bound -!missing-selector! AVPlayerInterstitialEventController::initWithPrimaryPlayer: not bound -!missing-selector! AVPlayerInterstitialEventController::interstitialEvents not bound -!missing-selector! AVPlayerInterstitialEventController::setEvents: not bound -!missing-selector! AVPlayerInterstitialEventController::setInterstitialEvents: not bound -!missing-selector! AVPlayerInterstitialEventObserver::currentEvent not bound -!missing-selector! AVPlayerInterstitialEventObserver::events not bound -!missing-selector! AVPlayerInterstitialEventObserver::initWithPrimaryPlayer: not bound -!missing-selector! AVPlayerInterstitialEventObserver::interstitialEvents not bound -!missing-selector! AVPlayerInterstitialEventObserver::interstitialPlayer not bound -!missing-selector! AVPlayerInterstitialEventObserver::primaryPlayer not bound -!missing-selector! AVPlayerItem::automaticallyHandlesInterstitialEvents not bound -!missing-selector! AVPlayerItem::setAutomaticallyHandlesInterstitialEvents: not bound -!missing-selector! AVPlayerItem::setVariantPreferences: not bound -!missing-selector! AVPlayerItem::templatePlayerItem not bound -!missing-selector! AVPlayerItem::variantPreferences not bound -!missing-selector! AVSampleBufferRenderSynchronizer::delaysRateChangeUntilHasSufficientMediaData not bound -!missing-selector! AVSampleBufferRenderSynchronizer::setDelaysRateChangeUntilHasSufficientMediaData: not bound -!missing-selector! AVSampleBufferRenderSynchronizer::setRate:time:atHostTime: not bound -!missing-type! AVContentKey not bound -!missing-type! AVContentKeySpecifier not bound -!missing-type! AVPlayerInterstitialEvent not bound -!missing-type! AVPlayerInterstitialEventController not bound -!missing-type! AVPlayerInterstitialEventObserver not bound From f587e8900c4f7f4558757f94c25f2c9fdc5aeeec Mon Sep 17 00:00:00 2001 From: Rachel Kang Date: Tue, 16 Mar 2021 15:57:33 -0400 Subject: [PATCH 2/7] Update with styling/formatting feedback --- src/AVFoundation/AVContentKeySession.cs | 12 ++++++---- src/AVFoundation/Enums.cs | 10 +++++--- src/avfoundation.cs | 24 +++++++++---------- tests/introspection/iOS/iOSApiSelectorTest.cs | 8 +++---- tests/xtro-sharpie/iOS-AVFoundation.ignore | 2 +- tests/xtro-sharpie/macOS-AVFoundation.ignore | 2 +- tests/xtro-sharpie/tvOS-AVFoundation.ignore | 2 +- .../xtro-sharpie/watchOS-AVFoundation.ignore | 2 +- 8 files changed, 35 insertions(+), 27 deletions(-) diff --git a/src/AVFoundation/AVContentKeySession.cs b/src/AVFoundation/AVContentKeySession.cs index 8acd7a421c..5f1e99283f 100644 --- a/src/AVFoundation/AVContentKeySession.cs +++ b/src/AVFoundation/AVContentKeySession.cs @@ -12,6 +12,10 @@ using System.Runtime.InteropServices; using CoreGraphics; using ObjCRuntime; +using CMSampleBufferRef = System.IntPtr; +using AVContentKey = System.IntPtr; +using NSError = System.IntPtr; + namespace AVFoundation { public partial class AVContentKeySession { @@ -19,9 +23,9 @@ namespace AVFoundation { [DllImport (Constants.AVFoundationLibrary)] [return: MarshalAs (UnmanagedType.I1)] static extern /* BOOL */ bool AVSampleBufferAttachContentKey ( - /* CMSampleBufferRef */ IntPt sbuf, - /* AVContentKey */ IntPt contentKey, - /* NSError * _Nullable * _Nullable */ out IntPtr outError); + /* CMSampleBufferRef */ CMSampleBufferRef sbuf, + /* AVContentKey */ AVContentKey contentKey, + /* NSError * _Nullable * _Nullable */ out NSError outError); [iOS (14, 5), Mac (11, 3), TV (14, 5), Watch (7,4)] public static bool AttachContentKey (CMSampleBuffer sampleBuffer, AVContentKey contentKey, out NSError error) @@ -33,4 +37,4 @@ namespace AVFoundation { } } } -#endif \ No newline at end of file +#endif diff --git a/src/AVFoundation/Enums.cs b/src/AVFoundation/Enums.cs index eacfba76ad..34c07d310a 100644 --- a/src/AVFoundation/Enums.cs +++ b/src/AVFoundation/Enums.cs @@ -129,7 +129,11 @@ namespace AVFoundation { [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureExposureMode : long { - Locked, AutoExpose, ContinuousAutoExposure, [iOS (8,0), Mac (10,15)] Custom + Locked, + AutoExpose, + ContinuousAutoExposure, + [iOS (8,0), Mac (10,15)] + Custom } [Introduced (PlatformName.MacCatalyst, 14, 0)] @@ -406,7 +410,7 @@ namespace AVFoundation { [NoMac] [NoTV] [iOS (14,5), Watch (7,3)] - OverrideMutedMicrophoneInterruption = 128 + OverrideMutedMicrophoneInterruption = 128, } [Native] @@ -908,7 +912,7 @@ namespace AVFoundation { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [TV (11,0), NoWatch, Mac( 10,13), iOS (11,0)] + [TV (11,0), NoWatch, Mac (10,13), iOS (11,0)] [Native] public enum AVDepthDataAccuracy : long { Relative = 0, diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 26a8144d74..b9d48e42f4 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -1843,7 +1843,7 @@ namespace AVFoundation { { Default = 0, AppWasSuspended = 1, - BuiltInMicMuted = 2 + BuiltInMicMuted = 2, } [Mac (11,0)] @@ -11683,7 +11683,7 @@ namespace AVFoundation { public enum AVVariantPreferences : ulong { None = 0, - ScalabilityToLosslessAudio = 1 << 0 + ScalabilityToLosslessAudio = 1 << 0, } [NoiOS][NoTV][NoWatch] @@ -12402,7 +12402,7 @@ namespace AVFoundation { None = 0, ConstrainsSeekingForwardInPrimaryContent = (1 << 0), RequiresPlaybackAtPreferredRateForAdvancement = (1 << 2), - DefaultPolicy = None + DefaultPolicy = None, } [TV (14,5), Mac (11,3), iOS (14,5)] @@ -12412,19 +12412,19 @@ namespace AVFoundation { { [Static] [Export ("interstitialEventWithPrimaryItem:time:templateItems:restrictions:resumptionOffset:")] - AVPlayerInterstitialEvent InterstitialEventWithPrimaryItem (AVPlayerItem primaryItem, CMTime time, AVPlayerItem[] templateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); + AVPlayerInterstitialEvent GetInterstitialEvent (AVPlayerItem primaryItem, CMTime time, AVPlayerItem[] templateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); [Static] [Export ("playerInterstitialEventWithPrimaryItem:time:interstitialTemplateItems:restrictions:resumptionOffset:")] - AVPlayerInterstitialEvent PlayerInterstitialEventWithPrimaryItem (AVPlayerItem primaryItem, CMTime time, AVPlayerItem[] interstitialTemplateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); + AVPlayerInterstitialEvent GetPlayerInterstitialEvent (AVPlayerItem primaryItem, CMTime time, AVPlayerItem[] interstitialTemplateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); [Static] [Export ("interstitialEventWithPrimaryItem:date:templateItems:restrictions:resumptionOffset:")] - AVPlayerInterstitialEvent InterstitialEventWithPrimaryItem (AVPlayerItem primaryItem, NSDate date, AVPlayerItem[] templateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); + AVPlayerInterstitialEvent GetInterstitialEvent (AVPlayerItem primaryItem, NSDate date, AVPlayerItem[] templateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); [Static] [Export ("playerInterstitialEventWithPrimaryItem:date:interstitialTemplateItems:restrictions:resumptionOffset:")] - AVPlayerInterstitialEvent PlayerInterstitialEventWithPrimaryItem (AVPlayerItem primaryItem, NSDate date, AVPlayerItem[] interstitialTemplateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); + AVPlayerInterstitialEvent GetPlayerInterstitialEvent (AVPlayerItem primaryItem, NSDate date, AVPlayerItem[] interstitialTemplateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); [NullAllowed, Export ("primaryItem", ArgumentSemantic.Weak)] AVPlayerItem PrimaryItem { get; } @@ -12455,11 +12455,11 @@ namespace AVFoundation { { [Static] [Export ("interstitialEventObserverWithPrimaryPlayer:")] - AVPlayerInterstitialEventObserver InterstitialEventObserverWithPrimaryPlayer (AVPlayer primaryPlayer); + AVPlayerInterstitialEventObserver GetInterstitialEventObserver (AVPlayer primaryPlayer); [Static] [Export ("playerInterstitialEventObserverWithPrimaryPlayer:")] - AVPlayerInterstitialEventObserver PlayerInterstitialEventObserverWithPrimaryPlayer (AVPlayer primaryPlayer); + AVPlayerInterstitialEventObserver GetPlayerInterstitialEventObserver (AVPlayer primaryPlayer); [Export ("initWithPrimaryPlayer:")] [DesignatedInitializer] @@ -12496,11 +12496,11 @@ namespace AVFoundation { { [Static] [Export ("interstitialEventControllerWithPrimaryPlayer:")] - AVPlayerInterstitialEventController InterstitialEventControllerWithPrimaryPlayer (AVPlayer primaryPlayer); + AVPlayerInterstitialEventController GetInterstitialEventController (AVPlayer primaryPlayer); [Static] [Export ("playerInterstitialEventControllerWithPrimaryPlayer:")] - AVPlayerInterstitialEventController PlayerInterstitialEventControllerWithPrimaryPlayer (AVPlayer primaryPlayer); + AVPlayerInterstitialEventController GetPlayerInterstitialEventController (AVPlayer primaryPlayer); [Export ("initWithPrimaryPlayer:")] IntPtr Constructor (AVPlayer primaryPlayer); @@ -13855,7 +13855,7 @@ namespace AVFoundation { { [Static] [Export ("contentKeySpecifierForKeySystem:identifier:options:")] - AVContentKeySpecifier ContentKeySpecifierForKeySystem (AVContentKeySystem keySystem, NSObject contentKeyIdentifier, NSDictionary options); + AVContentKeySpecifier GetContentKeySpecifier (AVContentKeySystem keySystem, NSObject contentKeyIdentifier, NSDictionary options); [Export ("initForKeySystem:identifier:options:")] IntPtr Constructor (AVContentKeySystem keySystem, NSObject contentKeyIdentifier, NSDictionary options); diff --git a/tests/introspection/iOS/iOSApiSelectorTest.cs b/tests/introspection/iOS/iOSApiSelectorTest.cs index ecbc8384da..7e79d38925 100644 --- a/tests/introspection/iOS/iOSApiSelectorTest.cs +++ b/tests/introspection/iOS/iOSApiSelectorTest.cs @@ -160,10 +160,10 @@ namespace Introspection { switch (declaredType.Name) { case "AVUrlAsset": switch (name) { - // fails because it is in-lined via protocol AVContentKeyRecipient - case "contentKeySession:didProvideContentKey:": - return true; - break; + // fails because it is in-lined via protocol AVContentKeyRecipient + case "contentKeySession:didProvideContentKey:": + return true; + break; } break; case "NSNull": diff --git a/tests/xtro-sharpie/iOS-AVFoundation.ignore b/tests/xtro-sharpie/iOS-AVFoundation.ignore index 63dbfee088..e052ec5384 100644 --- a/tests/xtro-sharpie/iOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/iOS-AVFoundation.ignore @@ -19,4 +19,4 @@ !missing-release-attribute-on-return-value! CoreVideo.CVPixelBuffer AVFoundation.AVVideoCompositionRenderContext::CreatePixelBuffer()'s selector's ('newPixelBuffer') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. # no tests/samples -!missing-pinvoke! AVSampleBufferAttachContentKey is not bound \ No newline at end of file +!missing-pinvoke! AVSampleBufferAttachContentKey is not bound diff --git a/tests/xtro-sharpie/macOS-AVFoundation.ignore b/tests/xtro-sharpie/macOS-AVFoundation.ignore index 9dc00b30b1..0aca9f810d 100644 --- a/tests/xtro-sharpie/macOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/macOS-AVFoundation.ignore @@ -56,4 +56,4 @@ !extra-enum-value! Managed value -11847 for AVError.OperationInterrupted not found in native headers # no tests/samples -!missing-pinvoke! AVSampleBufferAttachContentKey is not bound \ No newline at end of file +!missing-pinvoke! AVSampleBufferAttachContentKey is not bound diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.ignore b/tests/xtro-sharpie/tvOS-AVFoundation.ignore index b394b85c46..a2c3ae39e3 100644 --- a/tests/xtro-sharpie/tvOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/tvOS-AVFoundation.ignore @@ -14,4 +14,4 @@ !missing-release-attribute-on-return-value! CoreVideo.CVPixelBuffer AVFoundation.AVVideoCompositionRenderContext::CreatePixelBuffer()'s selector's ('newPixelBuffer') Objective-C method family ('new') indicates that the native method returns a retained object, and as such a '[return: Release]' attribute is required. # no tests/samples -!missing-pinvoke! AVSampleBufferAttachContentKey is not bound \ No newline at end of file +!missing-pinvoke! AVSampleBufferAttachContentKey is not bound diff --git a/tests/xtro-sharpie/watchOS-AVFoundation.ignore b/tests/xtro-sharpie/watchOS-AVFoundation.ignore index af4f1fb523..901e1f78cc 100644 --- a/tests/xtro-sharpie/watchOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/watchOS-AVFoundation.ignore @@ -30,4 +30,4 @@ # members of that category are not annotated as supporting watchOS !missing-selector! AVPlayerItem::automaticallyHandlesInterstitialEvents not bound !missing-selector! AVPlayerItem::setAutomaticallyHandlesInterstitialEvents: not bound -!missing-selector! AVPlayerItem::templatePlayerItem not bound \ No newline at end of file +!missing-selector! AVPlayerItem::templatePlayerItem not bound From a302ccb489779a5a12c73bab49a348b1fd17b3ee Mon Sep 17 00:00:00 2001 From: Rachel Kang Date: Wed, 17 Mar 2021 21:03:22 -0400 Subject: [PATCH 3/7] Update with more feedback fixes --- src/AVFoundation/AVContentKeySession.cs | 4 ++-- src/AVFoundation/Enums.cs | 9 ++++++--- src/avfoundation.cs | 15 +++++++-------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/AVFoundation/AVContentKeySession.cs b/src/AVFoundation/AVContentKeySession.cs index 5f1e99283f..a72ea479b0 100644 --- a/src/AVFoundation/AVContentKeySession.cs +++ b/src/AVFoundation/AVContentKeySession.cs @@ -14,7 +14,7 @@ using ObjCRuntime; using CMSampleBufferRef = System.IntPtr; using AVContentKey = System.IntPtr; -using NSError = System.IntPtr; +using NSErrorPtr = System.IntPtr; namespace AVFoundation { public partial class AVContentKeySession { @@ -25,7 +25,7 @@ namespace AVFoundation { static extern /* BOOL */ bool AVSampleBufferAttachContentKey ( /* CMSampleBufferRef */ CMSampleBufferRef sbuf, /* AVContentKey */ AVContentKey contentKey, - /* NSError * _Nullable * _Nullable */ out NSError outError); + /* NSError * _Nullable * _Nullable */ out NSErrorPtr outError); [iOS (14, 5), Mac (11, 3), TV (14, 5), Watch (7,4)] public static bool AttachContentKey (CMSampleBuffer sampleBuffer, AVContentKey contentKey, out NSError error) diff --git a/src/AVFoundation/Enums.cs b/src/AVFoundation/Enums.cs index 34c07d310a..981122bab3 100644 --- a/src/AVFoundation/Enums.cs +++ b/src/AVFoundation/Enums.cs @@ -133,7 +133,7 @@ namespace AVFoundation { AutoExpose, ContinuousAutoExposure, [iOS (8,0), Mac (10,15)] - Custom + Custom, } [Introduced (PlatformName.MacCatalyst, 14, 0)] @@ -626,7 +626,7 @@ namespace AVFoundation { [NoMac] #endif [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV, NoWatch, iOS (8,0), Mac (10,15)] + [NoTV, NoWatch, iOS (8,0)] [Native] public enum AVCaptureAutoFocusSystem : long { None, @@ -974,8 +974,11 @@ namespace AVFoundation { Unavailable = 4 } +#if XAMCORE_4_0 + [NoMac] +#endif [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, Mac (10,15), iOS (11,0)] + [NoWatch, NoTV, iOS (11,0)] [Native] public enum AVCaptureOutputDataDroppedReason : long { diff --git a/src/avfoundation.cs b/src/avfoundation.cs index b9d48e42f4..28c2c7d1bd 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -2368,11 +2368,11 @@ namespace AVFoundation { [Export ("inputOrientation")] AVAudioStereoOrientation InputOrientation { get; } - [Watch (7,3), TV (14,5), NoMac, iOS (14,5)] + [Watch (7,4), TV (14,5), NoMac, iOS (14,5)] [Export ("setPrefersNoInterruptionsFromSystemAlerts:error:")] bool SetPrefersNoInterruptionsFromSystemAlerts (bool inValue, [NullAllowed] out NSError outError); - [Watch (7, 3), TV (14, 5), NoMac, iOS (14, 5)] + [Watch (7, 4), TV (14, 5), NoMac, iOS (14, 5)] [Export ("prefersNoInterruptionsFromSystemAlerts")] bool PrefersNoInterruptionsFromSystemAlerts { get; } } @@ -2426,7 +2426,7 @@ namespace AVFoundation { [Export ("AVAudioSessionInterruptionOptionKey")] AVAudioSessionInterruptionOptions Option { get; } - [iOS (14, 5), Watch (7, 3), NoTV, NoMac] + [iOS (14, 5), Watch (7, 4), NoTV, NoMac] [Export ("AVAudioSessionInterruptionReasonKey")] AVAudioSessionInterruptionReason Reason { get; } @@ -11710,19 +11710,17 @@ namespace AVFoundation { } [NoWatch] + [TV (14, 5), Mac (11, 3), iOS (14, 5)] [Category] [BaseType (typeof(AVPlayerItem))] interface AVPlayerItem_AVPlayerInterstitialSupport { - [TV (14, 5), Mac (11, 3), iOS (14, 5)] [Export ("automaticallyHandlesInterstitialEvents")] bool GetAutomaticallyHandlesInterstitialEvents (); - [TV (14, 5), Mac (11, 3), iOS (14, 5)] [Export ("setAutomaticallyHandlesInterstitialEvents:")] void SetAutomaticallyHandlesInterstitialEvents (bool value); - [TV (14, 5), Mac (11, 4), iOS (14, 5)] [Export ("templatePlayerItem")] [return: NullAllowed] AVPlayerItem GetTemplatePlayerItem (); @@ -12734,11 +12732,11 @@ namespace AVFoundation { } [NoWatch] + [TV (14, 5), Mac (11, 3), iOS (14, 5)] [Category] [BaseType (typeof(AVSampleBufferDisplayLayer))] interface AVSampleBufferDisplayLayer_ProtectedContent { - [TV (14, 5), Mac (11, 3), iOS (14, 5)] [Export ("outputObscuredDueToInsufficientExternalProtection")] bool GetOutputObscuredDueToInsufficientExternalProtection (); } @@ -13047,7 +13045,7 @@ namespace AVFoundation { [NoWatch, NoTV, Mac (11, 3), iOS (14, 5)] [Field ("AVAssetDownloadTaskPrefersLosslessAudioKey")] - NSString AVAssetDownloadTaskPrefersLosslessAudioKey { get; } + NSString PrefersLosslessAudioKey { get; } [NoWatch, NoTV, iOS (14, 0)] [Field ("AVAssetDownloadTaskMinimumRequiredPresentationSizeKey")] @@ -13853,6 +13851,7 @@ namespace AVFoundation { [BaseType (typeof(NSObject))] interface AVContentKeySpecifier { + // TODO https://github.com/xamarin/xamarin-macios/issues/10904 [Static] [Export ("contentKeySpecifierForKeySystem:identifier:options:")] AVContentKeySpecifier GetContentKeySpecifier (AVContentKeySystem keySystem, NSObject contentKeyIdentifier, NSDictionary options); From f05658c0c24764094ce038a068618fb7f1c0c59a Mon Sep 17 00:00:00 2001 From: Rachel Kang Date: Thu, 18 Mar 2021 14:16:49 -0400 Subject: [PATCH 4/7] More feedback updates --- src/avfoundation.cs | 4 ++-- tests/introspection/iOS/iOSApiSelectorTest.cs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 28c2c7d1bd..0b2f17249c 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -1838,6 +1838,7 @@ namespace AVFoundation { delegate void AVPermissionGranted (bool granted); + [iOS (14, 5), Watch (7, 4), NoTV, NoMac] [Native] public enum AVAudioSessionInterruptionReason : ulong { @@ -10804,7 +10805,6 @@ namespace AVFoundation { NSData GetExtrinsicMatrix (AVCaptureDevice fromDevice, AVCaptureDevice toDevice); [NoWatch, NoTV, NoMac, iOS (13,0)] - [Advice ("This API is not available when using UIKit on macOS.")] [Export ("globalToneMappingEnabled")] bool GlobalToneMappingEnabled { [Bind ("isGlobalToneMappingEnabled")] get; set; } @@ -12510,7 +12510,7 @@ namespace AVFoundation { AVPlayerInterstitialEvent[] InterstitialEvents { get; set; } [Export ("cancelCurrentEventWithResumptionOffset:")] - void CancelCurrentEventWithResumptionOffset (CMTime resumptionOffset); + void CancelCurrentEvent (CMTime resumptionOffset); } [Watch (6,0)] diff --git a/tests/introspection/iOS/iOSApiSelectorTest.cs b/tests/introspection/iOS/iOSApiSelectorTest.cs index 7e79d38925..6f197816ab 100644 --- a/tests/introspection/iOS/iOSApiSelectorTest.cs +++ b/tests/introspection/iOS/iOSApiSelectorTest.cs @@ -163,7 +163,6 @@ namespace Introspection { // fails because it is in-lined via protocol AVContentKeyRecipient case "contentKeySession:didProvideContentKey:": return true; - break; } break; case "NSNull": @@ -892,4 +891,4 @@ namespace Introspection { } } } -} \ No newline at end of file +} From d9d19a4f98d2058903e6c34baccbdef2cbfb88a0 Mon Sep 17 00:00:00 2001 From: Rachel Kang Date: Fri, 19 Mar 2021 10:55:48 -0400 Subject: [PATCH 5/7] Ignore unused OS --- tests/xtro-sharpie/tvOS-AVFoundation.ignore | 3 +++ tests/xtro-sharpie/watchOS-AVFoundation.ignore | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.ignore b/tests/xtro-sharpie/tvOS-AVFoundation.ignore index a2c3ae39e3..f0b1ddc3e8 100644 --- a/tests/xtro-sharpie/tvOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/tvOS-AVFoundation.ignore @@ -15,3 +15,6 @@ # no tests/samples !missing-pinvoke! AVSampleBufferAttachContentKey is not bound + +# not used on tvOS +!missing-enum! AVAudioSessionInterruptionReason not bound diff --git a/tests/xtro-sharpie/watchOS-AVFoundation.ignore b/tests/xtro-sharpie/watchOS-AVFoundation.ignore index 901e1f78cc..803867e340 100644 --- a/tests/xtro-sharpie/watchOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/watchOS-AVFoundation.ignore @@ -31,3 +31,6 @@ !missing-selector! AVPlayerItem::automaticallyHandlesInterstitialEvents not bound !missing-selector! AVPlayerItem::setAutomaticallyHandlesInterstitialEvents: not bound !missing-selector! AVPlayerItem::templatePlayerItem not bound + +# not used on watchOS +!missing-enum! AVAudioSessionInterruptionReason not bound From 3d5b3a89ef5b6685bd3f401f96e3b930298f2166 Mon Sep 17 00:00:00 2001 From: Rachel Kang Date: Tue, 23 Mar 2021 10:59:49 -0400 Subject: [PATCH 6/7] More feedback fixes - update manual binding and test failures --- ...ntKeySession.cs => AVSampleBufferExtensions.cs} | 14 ++++++++++---- src/avfoundation.cs | 1 - src/frameworks.sources | 2 +- tests/xtro-sharpie/iOS-AVFoundation.ignore | 3 +++ tests/xtro-sharpie/macOS-AVFoundation.ignore | 6 ++++++ tests/xtro-sharpie/tvOS-AVFoundation.ignore | 3 +++ tests/xtro-sharpie/watchOS-AVFoundation.ignore | 4 ++-- 7 files changed, 25 insertions(+), 8 deletions(-) rename src/AVFoundation/{AVContentKeySession.cs => AVSampleBufferExtensions.cs} (71%) diff --git a/src/AVFoundation/AVContentKeySession.cs b/src/AVFoundation/AVSampleBufferExtensions.cs similarity index 71% rename from src/AVFoundation/AVContentKeySession.cs rename to src/AVFoundation/AVSampleBufferExtensions.cs index a72ea479b0..611011f30b 100644 --- a/src/AVFoundation/AVContentKeySession.cs +++ b/src/AVFoundation/AVSampleBufferExtensions.cs @@ -6,7 +6,7 @@ // Rachel Kang (rachelkang@microsoft.com) // -#if false +#if false // requires tests using System; using System.Runtime.InteropServices; using CoreGraphics; @@ -17,7 +17,7 @@ using AVContentKey = System.IntPtr; using NSErrorPtr = System.IntPtr; namespace AVFoundation { - public partial class AVContentKeySession { + public static class AVSampleBufferExtensions { [iOS (14, 5), Mac (11, 3), TV (14, 5), Watch (7,4)] [DllImport (Constants.AVFoundationLibrary)] @@ -28,8 +28,14 @@ namespace AVFoundation { /* NSError * _Nullable * _Nullable */ out NSErrorPtr outError); [iOS (14, 5), Mac (11, 3), TV (14, 5), Watch (7,4)] - public static bool AttachContentKey (CMSampleBuffer sampleBuffer, AVContentKey contentKey, out NSError error) + public static bool AttachContentKey (this CMSampleBuffer sampleBuffer, AVContentKey contentKey, out NSError error) { + if (sampleBuffer == null) + throw new ArgumentNullException(nameof(sampleBuffer)); + + if (contentKey == null) + throw new ArgumentNullException(nameof(contentKey)); + IntPtr outerr; var retVal = AVSampleBufferAttachContentKey (sampleBuffer.Handle, contentKey.Handle, out outerr); error = Runtime.GetNSObject (outerr); @@ -37,4 +43,4 @@ namespace AVFoundation { } } } -#endif +# endif diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 0b2f17249c..566c6d1dea 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -3369,7 +3369,6 @@ namespace AVFoundation { void StopRequestingMediaData (); [TV (14,5), Watch (7,4), Mac (11,3), iOS (14,5)] - [Abstract] [Export ("hasSufficientMediaDataForReliablePlaybackStart")] bool HasSufficientMediaDataForReliablePlaybackStart { get; } } diff --git a/src/frameworks.sources b/src/frameworks.sources index a1d23dc003..6bc17e4cd3 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -256,7 +256,6 @@ AVFOUNDATION_SOURCES = \ AVFoundation/AVCaptureVideoPreviewLayer.cs \ AVFoundation/AVCompat.cs \ AVFoundation/AVContentKeyResponse.cs \ - AVFoundation/AVContentKeySession.cs \ AVFoundation/AVDepthData.cs \ AVFoundation/AVFragmentedAsset.cs \ AVFoundation/AVFragmentedAssetTrack.cs \ @@ -270,6 +269,7 @@ AVFOUNDATION_SOURCES = \ AVFoundation/AVPlayerItemVideoOutput.cs \ AVFoundation/AVPlayerLayer.cs \ AVFoundation/AVPlayerViewController.cs \ + AVFoundation/AVSampleBufferExtensions.cs \ AVFoundation/AVTextStyleRule.cs \ AVFoundation/Events.cs \ AVFoundation/AVPlayerLooper.cs \ diff --git a/tests/xtro-sharpie/iOS-AVFoundation.ignore b/tests/xtro-sharpie/iOS-AVFoundation.ignore index e052ec5384..611a431e02 100644 --- a/tests/xtro-sharpie/iOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/iOS-AVFoundation.ignore @@ -20,3 +20,6 @@ # no tests/samples !missing-pinvoke! AVSampleBufferAttachContentKey is not bound + +# adding abstract member to an existing type would be a breaking change +!incorrect-protocol-member! AVQueuedSampleBufferRendering::hasSufficientMediaDataForReliablePlaybackStart is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/macOS-AVFoundation.ignore b/tests/xtro-sharpie/macOS-AVFoundation.ignore index 0aca9f810d..3d3b45d1d4 100644 --- a/tests/xtro-sharpie/macOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/macOS-AVFoundation.ignore @@ -57,3 +57,9 @@ # no tests/samples !missing-pinvoke! AVSampleBufferAttachContentKey is not bound + +# not used on macOS +!missing-enum! AVAudioSessionInterruptionReason not bound + +# adding abstract member to an existing type would be a breaking change +!incorrect-protocol-member! AVQueuedSampleBufferRendering::hasSufficientMediaDataForReliablePlaybackStart is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/tvOS-AVFoundation.ignore b/tests/xtro-sharpie/tvOS-AVFoundation.ignore index f0b1ddc3e8..5f010788c2 100644 --- a/tests/xtro-sharpie/tvOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/tvOS-AVFoundation.ignore @@ -18,3 +18,6 @@ # not used on tvOS !missing-enum! AVAudioSessionInterruptionReason not bound + +# adding abstract member to an existing type would be a breaking change +!incorrect-protocol-member! AVQueuedSampleBufferRendering::hasSufficientMediaDataForReliablePlaybackStart is REQUIRED and should be abstract diff --git a/tests/xtro-sharpie/watchOS-AVFoundation.ignore b/tests/xtro-sharpie/watchOS-AVFoundation.ignore index 803867e340..b5f7bb55d9 100644 --- a/tests/xtro-sharpie/watchOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/watchOS-AVFoundation.ignore @@ -32,5 +32,5 @@ !missing-selector! AVPlayerItem::setAutomaticallyHandlesInterstitialEvents: not bound !missing-selector! AVPlayerItem::templatePlayerItem not bound -# not used on watchOS -!missing-enum! AVAudioSessionInterruptionReason not bound +# adding abstract member to an existing type would be a breaking change +!incorrect-protocol-member! AVQueuedSampleBufferRendering::hasSufficientMediaDataForReliablePlaybackStart is REQUIRED and should be abstract From ea3b15a95ec83a8c62ba51d13b54d6e7c9183970 Mon Sep 17 00:00:00 2001 From: Rachel Kang Date: Tue, 23 Mar 2021 11:17:33 -0400 Subject: [PATCH 7/7] Fix spacing --- src/AVFoundation/AVSampleBufferExtensions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AVFoundation/AVSampleBufferExtensions.cs b/src/AVFoundation/AVSampleBufferExtensions.cs index 611011f30b..46e500381d 100644 --- a/src/AVFoundation/AVSampleBufferExtensions.cs +++ b/src/AVFoundation/AVSampleBufferExtensions.cs @@ -31,10 +31,10 @@ namespace AVFoundation { public static bool AttachContentKey (this CMSampleBuffer sampleBuffer, AVContentKey contentKey, out NSError error) { if (sampleBuffer == null) - throw new ArgumentNullException(nameof(sampleBuffer)); + throw new ArgumentNullException (nameof (sampleBuffer)); if (contentKey == null) - throw new ArgumentNullException(nameof(contentKey)); + throw new ArgumentNullException (nameof (contentKey)); IntPtr outerr; var retVal = AVSampleBufferAttachContentKey (sampleBuffer.Handle, contentKey.Handle, out outerr); @@ -43,4 +43,4 @@ namespace AVFoundation { } } } -# endif +#endif