//Copies a frame to the buffer but does not set it as 'written' //Returns true if frame data is now in buffer private bool _CopyDecodedFrameToBuffer() { bool result; SACDecoder decoder; try { decoder = (SACDecoder)Marshal.PtrToStructure(_Videodecoder, typeof(SACDecoder)); } catch (Exception e) { CLog.LogError("Couldn't copy the frame to the managed environment.", false, false, e); return(false); } if (decoder.Buffer != IntPtr.Zero) { _LastDecodedTime = (float)decoder.Timecode; result = _Framebuffer.Put(decoder.Buffer, _LastDecodedTime); } else { result = false; } _FrameAvailable = false; return(result); }
//Copies a frame to the buffer but does not set it as 'written' //Returns true if frame data is now in buffer private bool _CopyDecodedFrameToBuffer() { bool result; var decoder = (SACDecoder)Marshal.PtrToStructure(_Videodecoder, typeof(SACDecoder)); if (decoder.Buffer != IntPtr.Zero) { _LastDecodedTime = (float)decoder.Timecode; result = _Framebuffer.Put(decoder.Buffer, _LastDecodedTime); } else { result = false; } _FrameAvailable = false; return(result); }