Trait h264_reader::rbsp::BitRead
source · pub trait BitRead {
// Required methods
fn read_ue(&mut self, name: &'static str) -> Result<u32, BitReaderError>;
fn read_se(&mut self, name: &'static str) -> Result<i32, BitReaderError>;
fn read_bool(&mut self, name: &'static str) -> Result<bool, BitReaderError>;
fn read_u8(
&mut self,
bit_count: u32,
name: &'static str
) -> Result<u8, BitReaderError>;
fn read_u16(
&mut self,
bit_count: u32,
name: &'static str
) -> Result<u16, BitReaderError>;
fn read_u32(
&mut self,
bit_count: u32,
name: &'static str
) -> Result<u32, BitReaderError>;
fn read_i32(
&mut self,
bit_count: u32,
name: &'static str
) -> Result<i32, BitReaderError>;
fn has_more_rbsp_data(
&mut self,
name: &'static str
) -> Result<bool, BitReaderError>;
fn finish_rbsp(self) -> Result<(), BitReaderError>;
fn finish_sei_payload(self) -> Result<(), BitReaderError>;
}
Required Methods§
fn read_ue(&mut self, name: &'static str) -> Result<u32, BitReaderError>
fn read_se(&mut self, name: &'static str) -> Result<i32, BitReaderError>
fn read_bool(&mut self, name: &'static str) -> Result<bool, BitReaderError>
fn read_u8( &mut self, bit_count: u32, name: &'static str ) -> Result<u8, BitReaderError>
fn read_u16( &mut self, bit_count: u32, name: &'static str ) -> Result<u16, BitReaderError>
fn read_u32( &mut self, bit_count: u32, name: &'static str ) -> Result<u32, BitReaderError>
fn read_i32( &mut self, bit_count: u32, name: &'static str ) -> Result<i32, BitReaderError>
sourcefn has_more_rbsp_data(
&mut self,
name: &'static str
) -> Result<bool, BitReaderError>
fn has_more_rbsp_data( &mut self, name: &'static str ) -> Result<bool, BitReaderError>
Returns true if positioned before the RBSP trailing bits.
This matches the definition of more_rbsp_data()
in Rec. ITU-T H.264
(03/2010) section 7.2.
sourcefn finish_rbsp(self) -> Result<(), BitReaderError>
fn finish_rbsp(self) -> Result<(), BitReaderError>
Consumes the reader, returning error if it’s not positioned at the RBSP trailing bits.
sourcefn finish_sei_payload(self) -> Result<(), BitReaderError>
fn finish_sei_payload(self) -> Result<(), BitReaderError>
Consumes the reader, returning error if this sei_payload
message is unfinished.
This is similar to finish_rbsp
, but SEI payloads have no trailing bits if
already byte-aligned.