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§
Sourcefn consume(&mut self) -> Result<Vec<Vec<Event>>, SourceError>
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.
Sourcefn crf(&mut self, crf: u8)
fn crf(&mut self, crf: u8)
Set the Constant Rate Factor (CRF) quality setting for the encoder. 0 is lossless, 9 is worst quality.
Sourcefn get_video_mut(&mut self) -> &mut Video<W>
fn get_video_mut(&mut self) -> &mut Video<W>
Sourcefn get_video_ref(&self) -> &Video<W>
fn get_video_ref(&self) -> &Video<W>
Sourcefn get_running_input_bitrate(&self) -> f64
fn get_running_input_bitrate(&self) -> f64
Get the last-calculated bitrate of the input (in bits per second)