Struct adder_codec_rs::raw::raw_stream::RawStream
source · pub struct RawStream {
pub codec_version: u8,
pub width: u16,
pub height: u16,
pub tps: DeltaT,
pub ref_interval: DeltaT,
pub delta_t_max: DeltaT,
pub channels: u8,
pub event_size: u8,
pub source_camera: SourceCamera,
/* private fields */
}
Fields§
§codec_version: u8
§width: u16
§height: u16
§tps: DeltaT
§ref_interval: DeltaT
§delta_t_max: DeltaT
§channels: u8
§event_size: u8
§source_camera: SourceCamera
Trait Implementations§
source§impl Codec for RawStream
impl Codec for RawStream
source§fn encode_header(
&mut self,
width: u16,
height: u16,
tps: DeltaT,
ref_interval: DeltaT,
delta_t_max: DeltaT,
channels: u8,
codec_version: u8,
source_camera: SourceCamera
)
fn encode_header(
&mut self,
width: u16,
height: u16,
tps: DeltaT,
ref_interval: DeltaT,
delta_t_max: DeltaT,
channels: u8,
codec_version: u8,
source_camera: SourceCamera
)
Encode the header for this RawStream. If an [input_stream] is open for this struct already, then it is dropped. Intended usage is to create a separate RawStream if you want to read and write two streams at once (for example, if you are cropping the spatial pixels of a stream, reducing the number of channels, or scaling the DeltaT values in some way).
fn new() -> Self
fn get_source_type(&self) -> SourceType
fn write_eof(&mut self)
source§fn flush_writer(&mut self)
fn flush_writer(&mut self)
Flush the stream so that program can be exited safely
fn close_writer(&mut self)
source§fn close_reader(&mut self)
fn close_reader(&mut self)
Close the stream so that program can be exited safely
fn set_output_stream(&mut self, stream: Option<BufWriter<File>>)
fn set_input_stream(&mut self, stream: Option<BufReader<File>>)
source§fn set_input_stream_position(&mut self, pos: u64) -> Result<(), StreamError>
fn set_input_stream_position(&mut self, pos: u64) -> Result<(), StreamError>
Go to this position (as a byte address) in the input stream. Returns a StreamError if
not aligned to an Event Read more
fn set_input_stream_position_from_end(
&mut self,
pos: i64
) -> Result<(), StreamError>
fn get_input_stream_position(&mut self) -> Result<u64, StreamError>
fn get_eof_position(&mut self) -> Result<u64, StreamError>
fn decode_header(&mut self) -> Result<usize, StreamError>
fn encode_event(&mut self, event: &Event)
fn encode_events(&mut self, events: &[Event])
fn encode_events_events(&mut self, events: &[Vec<Event>])
fn decode_event(&mut self) -> Result<Event, StreamError>
fn open_writer<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error>
fn open_reader<P: AsRef<Path>>(&mut self, path: P) -> Result<(), Error>
Auto Trait Implementations§
impl RefUnwindSafe for RawStream
impl Send for RawStream
impl Sync for RawStream
impl Unpin for RawStream
impl UnwindSafe for RawStream
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.