pub struct Parser {
pub last_frame_header: Option<FrameHeaderObu>,
pub sequence_header: Option<Rc<SequenceHeaderObu>>,
/* private fields */
}
Fields§
§last_frame_header: Option<FrameHeaderObu>
We keep this to implement frame_header_copy() in the specification, and to fill in StreamInfo render_width and render_height.
sequence_header: Option<Rc<SequenceHeaderObu>>
The last SequenceHeaderObu parsed.
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn read_obu<'a>(&mut self, data: &'a [u8]) -> Result<ObuAction<'a>, String>
pub fn read_obu<'a>(&mut self, data: &'a [u8]) -> Result<ObuAction<'a>, String>
Parses one OBU from data
, which can be in Annex B or low-overhead
format.
None
may eventually be returned if the OBU is to be dropped.
Sourcepub fn choose_operating_point(
&mut self,
operating_point: u32,
) -> Result<(), String>
pub fn choose_operating_point( &mut self, operating_point: u32, ) -> Result<(), String>
Selects an operating point. Only call this after the Sequence OBU for which the operating point should apply has been parsed.
pub fn parse_frame_header_obu( &mut self, obu: &Obu<'_>, ) -> Result<FrameHeaderObu, String>
Sourcepub fn ref_frame_update(&mut self, fh: &FrameHeaderObu) -> Result<(), String>
pub fn ref_frame_update(&mut self, fh: &FrameHeaderObu) -> Result<(), String>
Implements 7.20. This function should be called right after decoding a frame.
pub fn highest_operating_point(&self) -> Option<u32>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl !Send for Parser
impl !Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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