pub trait Source<W: Write> {
    // Required methods
    fn consume(
        &mut self,
        view_interval: u32,
        thread_pool: &ThreadPool
    ) -> 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, view_interval: u32, thread_pool: &ThreadPool ) -> 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>

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> Source<W> for Prophesee<W>

source§

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