diff --git a/src/AVFoundation/AVPlayer.cs b/src/AVFoundation/AVPlayer.cs deleted file mode 100644 index 0060d03e16ce..000000000000 --- a/src/AVFoundation/AVPlayer.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -// AVPlayer.cs: Complementing methods -// -// Author: -// Miguel de Icaza (miguel@xamarin.com) -// -// Copyright 2012, 2014 Xamarin Inc -// -#if !MONOMAC && !WATCH - -using System; -using Foundation; -using CoreMedia; -using CoreVideo; - -#nullable enable - -namespace AVFoundation { - public partial class AVPlayerItemVideoOutput { - public CVPixelBuffer? CopyPixelBuffer (CMTime itemTime, ref CMTime outItemTimeForDisplay) - { - var ptr = WeakCopyPixelBuffer (itemTime, ref outItemTimeForDisplay); - if (ptr == IntPtr.Zero) - return null; - - return new CVPixelBuffer (ptr, true); - } - } -} - -#endif diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 4307696de378..464274ac8206 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -13823,9 +13823,18 @@ interface AVPlayerItemVideoOutput { [Export ("hasNewPixelBufferForItemTime:")] bool HasNewPixelBufferForItemTime (CMTime itemTime); +#if !XAMCORE_5_0 [Protected] [Export ("copyPixelBufferForItemTime:itemTimeForDisplay:")] IntPtr WeakCopyPixelBuffer (CMTime itemTime, ref CMTime outItemTimeForDisplay); +#endif + +#if !XAMCORE_5_0 + [Sealed] +#endif + [Export ("copyPixelBufferForItemTime:itemTimeForDisplay:")] + [return: Release] + CVPixelBuffer CopyPixelBuffer (CMTime itemTime, ref CMTime outItemTimeForDisplay); [Export ("setDelegate:queue:")] void SetDelegate ([NullAllowed] IAVPlayerItemOutputPullDelegate delegateClass, [NullAllowed] DispatchQueue delegateQueue); diff --git a/src/frameworks.sources b/src/frameworks.sources index 59f18cf1af44..8ea1f3b581bd 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -281,7 +281,6 @@ AVFOUNDATION_SOURCES = \ AVFoundation/AVMetadataMachineReadableCodeObject.cs \ AVFoundation/AVMetadataObject.cs \ AVFoundation/AVOutputSettingsAssistant.cs \ - AVFoundation/AVPlayer.cs \ AVFoundation/AVPlayerItem.cs \ AVFoundation/AVPlayerItemVideoOutput.cs \ AVFoundation/AVPlayerLayer.cs \