pub struct Decoder { /* private fields */ }Expand description
A Constrained Baseline H.264 decoder. Holds the most recent parameter sets and the previous decoded picture (the inter reference) across calls.
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn decode(
&mut self,
annex_b: &[u8],
) -> Result<Option<YuvFrame>, DecodeError>
pub fn decode( &mut self, annex_b: &[u8], ) -> Result<Option<YuvFrame>, DecodeError>
Decodes a complete Annex-B access unit, returning the reconstructed, cropped frame if the access unit contained a coded picture.
Sourcepub fn decode_stream(
&mut self,
annex_b: &[u8],
) -> Result<Vec<YuvFrame>, DecodeError>
pub fn decode_stream( &mut self, annex_b: &[u8], ) -> Result<Vec<YuvFrame>, DecodeError>
Decodes a complete Annex-B byte stream and returns every picture in
display order (PicOrderCnt within each GOP; an IDR ends a GOP).
This is the convenient whole-stream entry point — it handles access-unit
splitting, multi-slice picture assembly, and B-picture reordering — versus
the lower-level per-access-unit Decoder::decode, which returns pictures
in decode order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more