Trait Source

Source
pub trait Source<W: Write + Send + Sync + 'static> {
    // Required methods
    fn consume(&mut self) -> Result<Vec<Vec<Event>>, SourceError>;
    fn crf(&mut self, crf: u8);
    fn get_video_mut(&mut self) -> &mut Video<W>;
    fn get_video_ref(&self) -> &Video<W>;
    fn get_video(self) -> Video<W>;
    fn get_input(&self) -> Option<&Frame>;
    fn get_running_input_bitrate(&self) -> f64;
}
Expand description

A trait for objects that can be used as a source of data for the ADΔER transcode model.

Required Methods§

Source

fn consume(&mut self) -> Result<Vec<Vec<Event>>, SourceError>

Intake one input interval worth of data from the source stream into the ADΔER model as intensities.

Source

fn crf(&mut self, crf: u8)

Set the Constant Rate Factor (CRF) quality setting for the encoder. 0 is lossless, 9 is worst quality.

Source

fn get_video_mut(&mut self) -> &mut Video<W>

Get a mutable reference to the Video object associated with this Source.

Source

fn get_video_ref(&self) -> &Video<W>

Get an immutable reference to the Video object associated with this Source.

Source

fn get_video(self) -> Video<W>

Get the Video object associated with this Source, consuming the Source in the process.

Source

fn get_input(&self) -> Option<&Frame>

Get the input frame from the source

Source

fn get_running_input_bitrate(&self) -> f64

Get the last-calculated bitrate of the input (in bits per second)

Implementors§

Source§

impl<W: Write + 'static + Send + Sync> Source<W> for AdderSource<W>

Source§

impl<W: Write + 'static + Send + Sync> Source<W> for Framed<W>

Source§

impl<W: Write + Send + Sync + 'static> Source<W> for Prophesee<W>