Struct h264_reader::rbsp::BitReader

source ·
pub struct BitReader<R: BufRead + Clone> { /* private fields */ }
Expand description

Reads H.264 bitstream syntax elements from an RBSP representation (no NAL header byte or emulation prevention three bytes).

Implementations§

source§

impl<R: BufRead + Clone> BitReader<R>

source

pub fn new(inner: R) -> Self

source

pub fn reader(&mut self) -> Option<&mut R>

Borrows the underlying reader if byte-aligned.

Trait Implementations§

source§

impl<R: BufRead + Clone> BitRead for BitReader<R>

source§

fn read_ue(&mut self, name: &'static str) -> Result<u32, BitReaderError>

source§

fn read_se(&mut self, name: &'static str) -> Result<i32, BitReaderError>

source§

fn read_bool(&mut self, name: &'static str) -> Result<bool, BitReaderError>

source§

fn read_u8( &mut self, bit_count: u32, name: &'static str ) -> Result<u8, BitReaderError>

source§

fn read_u16( &mut self, bit_count: u32, name: &'static str ) -> Result<u16, BitReaderError>

source§

fn read_u32( &mut self, bit_count: u32, name: &'static str ) -> Result<u32, BitReaderError>

source§

fn read_i32( &mut self, bit_count: u32, name: &'static str ) -> Result<i32, BitReaderError>

source§

fn has_more_rbsp_data( &mut self, name: &'static str ) -> Result<bool, BitReaderError>

Returns true if positioned before the RBSP trailing bits. Read more
source§

fn finish_rbsp(self) -> Result<(), BitReaderError>

Consumes the reader, returning error if it’s not positioned at the RBSP trailing bits.
source§

fn finish_sei_payload(self) -> Result<(), BitReaderError>

Consumes the reader, returning error if this sei_payload message is unfinished. Read more

Auto Trait Implementations§

§

impl<R> RefUnwindSafe for BitReader<R>where R: RefUnwindSafe,

§

impl<R> Send for BitReader<R>where R: Send,

§

impl<R> Sync for BitReader<R>where R: Sync,

§

impl<R> Unpin for BitReader<R>where R: Unpin,

§

impl<R> UnwindSafe for BitReader<R>where R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.