Skip to content

Commit 9d66ed2

Browse files
authored
[AVFoundation] Improve AVPlayerItemVideoOutput.CopyPixelBuffer. Fixes #21702. (#21710)
* The generator can handle the custom logic now, so remove the manually written bindings. * Add the API for macOS. Fixes #21702.
1 parent b9eea5e commit 9d66ed2

File tree

3 files changed

+9
-32
lines changed

3 files changed

+9
-32
lines changed

src/AVFoundation/AVPlayer.cs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/avfoundation.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13823,9 +13823,18 @@ interface AVPlayerItemVideoOutput {
1382313823
[Export ("hasNewPixelBufferForItemTime:")]
1382413824
bool HasNewPixelBufferForItemTime (CMTime itemTime);
1382513825

13826+
#if !XAMCORE_5_0
1382613827
[Protected]
1382713828
[Export ("copyPixelBufferForItemTime:itemTimeForDisplay:")]
1382813829
IntPtr WeakCopyPixelBuffer (CMTime itemTime, ref CMTime outItemTimeForDisplay);
13830+
#endif
13831+
13832+
#if !XAMCORE_5_0
13833+
[Sealed]
13834+
#endif
13835+
[Export ("copyPixelBufferForItemTime:itemTimeForDisplay:")]
13836+
[return: Release]
13837+
CVPixelBuffer CopyPixelBuffer (CMTime itemTime, ref CMTime outItemTimeForDisplay);
1382913838

1383013839
[Export ("setDelegate:queue:")]
1383113840
void SetDelegate ([NullAllowed] IAVPlayerItemOutputPullDelegate delegateClass, [NullAllowed] DispatchQueue delegateQueue);

src/frameworks.sources

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ AVFOUNDATION_SOURCES = \
281281
AVFoundation/AVMetadataMachineReadableCodeObject.cs \
282282
AVFoundation/AVMetadataObject.cs \
283283
AVFoundation/AVOutputSettingsAssistant.cs \
284-
AVFoundation/AVPlayer.cs \
285284
AVFoundation/AVPlayerItem.cs \
286285
AVFoundation/AVPlayerItemVideoOutput.cs \
287286
AVFoundation/AVPlayerLayer.cs \

0 commit comments

Comments
 (0)