public override void Destroy() { if (_Encoder != null) { _Encoder.Destroy(); _Encoder = null; } if (_Decoder != null) { _Decoder.Destroy(); _Decoder = null; } }
public override VideoBuffer Decode(byte[] encodedFrame) { if (_Decoder == null) { _Decoder = new Win8_VP8.Decoder(); } if (_Padep.SequenceNumberingViolated) { _Decoder.NeedsKeyFrame = true; return(null); } // vp8 -> bitmap var bitmap = _Decoder.Decode(encodedFrame); // bitmap -> buffer if (bitmap == null) { return(null); } return(new VideoBuffer(bitmap.Width, bitmap.Height, new VideoPlane(bitmap.Buffer))); }
public override VideoBuffer Decode(byte[] encodedFrame) { if (_Decoder == null) { _Decoder = new Win8_VP8.Decoder(); } if (_Padep.SequenceNumberingViolated) { _Decoder.NeedsKeyFrame = true; return null; } // vp8 -> bitmap var bitmap = _Decoder.Decode(encodedFrame); // bitmap -> buffer if (bitmap == null) { return null; } return new VideoBuffer(bitmap.Width, bitmap.Height, new VideoPlane(bitmap.Buffer)); }
public override void Destroy() { if (_Encoder != null) { _Encoder.Destroy(); _Encoder = null; } if (_Decoder != null) { _Decoder.Destroy(); _Decoder = null; } }