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 source_camera: SourceCamera,
/* private fields */
}
Fields
codec_version: u8
width: u16
height: u16
tps: DeltaT
ref_interval: DeltaT
delta_t_max: DeltaT
channels: u8
source_camera: SourceCamera
Trait Implementations
sourceimpl Codec for RawStream
impl Codec for RawStream
sourcefn 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)
sourcefn flush_writer(&mut self)
fn flush_writer(&mut self)
Flush the stream so that program can be exited safely
fn close_writer(&mut self)
sourcefn 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>>)
fn decode_header(&mut self) -> Result<(), 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more