pub trait Source<W: Write> {
    // Required methods
    fn consume(
        &mut self,
        view_interval: u32,
        thread_pool: &ThreadPool
    ) -> Result<Vec<Vec<Event>>, SourceError>;
    fn get_video_mut(&mut self) -> &mut Video<W>;
    fn get_video_ref(&self) -> &Video<W>;
    fn get_video(self) -> Video<W>;
}
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 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.

Implementors§

source§

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

source§

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