Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[VideoToolbox] Remove VTDecompressionSession.Create overload requiring manual reference counting. #14218

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/VideoToolbox/VTDecompressionSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,27 @@ public static VTDecompressionSession Create (CMVideoFormatDescription formatDesc
: null;
}
#endif
[Obsolete ("This overload requires that the provided compressionOutputCallback manually CFRetain the passed CMSampleBuffer, use Create(VTDecompressionOutputCallback,CMVideoFormatDescription,VTVideoDecoderSpecification,CVPixelBufferAttributes) variant instead which does not have that requirement.")]

#if !NET
[Obsolete ("This overload requires that the provided compressionOutputCallback manually CFRetain the passed CMSampleBuffer, use Create(VTDecompressionOutputCallback,CMVideoFormatDescription,VTVideoDecoderSpecification,CVPixelBufferAttributes) variant instead which does not have that requirement.")]
public static VTDecompressionSession? Create (VTDecompressionOutputCallback outputCallback,
CMVideoFormatDescription formatDescription,
VTVideoDecoderSpecification? decoderSpecification = null, // hardware acceleration is default behavior on iOS. no opt-in required.
NSDictionary? destinationImageBufferAttributes = null)
{
#if NET
unsafe {
return Create (outputCallback, formatDescription, decoderSpecification, destinationImageBufferAttributes, &DecompressionCallback);
}
#else
return Create (outputCallback, formatDescription, decoderSpecification, destinationImageBufferAttributes, static_DecompressionOutputCallback);
#endif
}
#endif // !NET

public static VTDecompressionSession? Create (VTDecompressionOutputCallback outputCallback,
CMVideoFormatDescription formatDescription,
#if NET
VTVideoDecoderSpecification? decoderSpecification = null, // hardware acceleration is default behavior on iOS. no opt-in required.
CVPixelBufferAttributes? destinationImageBufferAttributes = null)
#else
VTVideoDecoderSpecification? decoderSpecification, // hardware acceleration is default behavior on iOS. no opt-in required.
CVPixelBufferAttributes? destinationImageBufferAttributes)
#endif
{
#if NET
unsafe {
Expand Down