public VTStatus DecodeFrame(CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, out VTDecodeInfoFlags infoFlags, VTDecompressionOutputHandler outputHandler) { if (Handle == IntPtr.Zero) { throw new ObjectDisposedException("DecompressionSession"); } if (sampleBuffer == null) { throw new ArgumentNullException("sampleBuffer"); } if (outputHandler == null) { throw new ArgumentNullException("outputHandler"); } unsafe { var block = new BlockLiteral(); var blockPtr = █ block.SetupBlockUnsafe(decompressionOutputHandlerTrampoline, outputHandler); try { return(VTDecompressionSessionDecodeFrameWithOutputHandler(Handle, sampleBuffer.Handle, decodeFlags, out infoFlags, blockPtr)); } finally { blockPtr->CleanupBlock(); } } }
public VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, out VTDecodeInfoFlags infoFlags, VTDecompressionOutputHandler outputHandler) { if (Handle == IntPtr.Zero) throw new ObjectDisposedException ("DecompressionSession"); if (sampleBuffer == null) throw new ArgumentNullException ("sampleBuffer"); if (outputHandler == null) throw new ArgumentNullException ("outputHandler"); unsafe { var block = new BlockLiteral (); var blockPtr = █ block.SetupBlock (decompressionOutputHandlerTrampoline, outputHandler); try { return VTDecompressionSessionDecodeFrameWithOutputHandler (Handle, sampleBuffer.Handle, decodeFlags, out infoFlags, blockPtr); } finally { blockPtr->CleanupBlock (); } } }