pub struct Decoder<R: Read + Seek> { /* private fields */ }
Expand description
Struct for decoding Event
s from a stream
Implementations§
Source§impl<R: Read + Seek> Decoder<R>
impl<R: Read + Seek> Decoder<R>
Sourcepub fn new_compressed(
compression: CompressedInput<R>,
reader: &mut BitReader<R, BigEndian>,
) -> Result<Self, CodecError>where
Self: Sized,
pub fn new_compressed(
compression: CompressedInput<R>,
reader: &mut BitReader<R, BigEndian>,
) -> Result<Self, CodecError>where
Self: Sized,
Create a new decoder with the given compression scheme
Sourcepub fn new_raw(
compression: RawInput<R>,
reader: &mut BitReader<R, BigEndian>,
) -> Result<Self, CodecError>where
Self: Sized,
pub fn new_raw(
compression: RawInput<R>,
reader: &mut BitReader<R, BigEndian>,
) -> Result<Self, CodecError>where
Self: Sized,
Create a new decoder with the given compression scheme
Sourcepub fn meta(&self) -> &CodecMetadata
pub fn meta(&self) -> &CodecMetadata
Returns a reference to the metadata of the underlying compression scheme
Sourcepub fn meta_mut(&mut self) -> &mut CodecMetadata
pub fn meta_mut(&mut self) -> &mut CodecMetadata
Returns a mutable reference to the metadata of the underlying compression scheme
Sourcepub fn get_source_type(&self) -> SourceType
pub fn get_source_type(&self) -> SourceType
Get the source data representation, based on the source camera
Sourcepub fn digest_event(
&mut self,
reader: &mut BitReader<R, BigEndian>,
) -> Result<Event, CodecError>
pub fn digest_event( &mut self, reader: &mut BitReader<R, BigEndian>, ) -> Result<Event, CodecError>
Read and decode the next event from the input stream
Sourcepub fn set_input_stream_position(
&mut self,
reader: &mut BitReader<R, BigEndian>,
position: u64,
) -> Result<(), CodecError>
pub fn set_input_stream_position( &mut self, reader: &mut BitReader<R, BigEndian>, position: u64, ) -> Result<(), CodecError>
Sets the input stream position to the given absolute byte position
Sourcepub fn get_input_stream_position(
&self,
reader: &mut BitReader<R, BigEndian>,
) -> Result<u64, CodecError>
pub fn get_input_stream_position( &self, reader: &mut BitReader<R, BigEndian>, ) -> Result<u64, CodecError>
Returns the current position of the input stream in bytes
Sourcepub fn get_eof_position(
&mut self,
reader: &mut BitReader<R, BigEndian>,
) -> Result<u64, CodecError>
pub fn get_eof_position( &mut self, reader: &mut BitReader<R, BigEndian>, ) -> Result<u64, CodecError>
Returns the EOF position, in bytes. This is the position of the first byte of the raw event which demarcates the end of the stream.
pub fn get_compression_type(&self) -> EncoderType
Auto Trait Implementations§
impl<R> Freeze for Decoder<R>
impl<R> RefUnwindSafe for Decoder<R>where
R: RefUnwindSafe,
impl<R> Send for Decoder<R>where
R: Send,
impl<R> Sync for Decoder<R>where
R: Sync,
impl<R> Unpin for Decoder<R>where
R: Unpin,
impl<R> UnwindSafe for Decoder<R>where
R: UnwindSafe,
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