Struct adder_codec_rs::transcoder::source::video::Video
source · pub struct Video<W: Write> {
pub state: VideoState,
pub instantaneous_frame: Mat,
pub running_intensities: Array3<i32>,
pub instantaneous_view_mode: FramedViewMode,
pub event_sender: Sender<Vec<Event>>,
pub encoder_type: EncoderType,
/* private fields */
}
Expand description
Attributes common to ADΔER transcode process
Fields§
§state: VideoState
The current state of the video transcode
instantaneous_frame: Mat
The current instantaneous display frame
running_intensities: Array3<i32>
The current instantaneous frame, for determining features
instantaneous_view_mode: FramedViewMode
The current view mode of the instantaneous frame
event_sender: Sender<Vec<Event>>
Channel for sending events to the encoder
encoder_type: EncoderType
Implementations§
source§impl<W: Write + 'static> Video<W>
impl<W: Write + 'static> Video<W>
sourcepub fn c_thresh_pos(self, c_thresh_pos: u8) -> Self
pub fn c_thresh_pos(self, c_thresh_pos: u8) -> Self
Set the positive contrast threshold
sourcepub fn c_thresh_neg(self, _c_thresh_neg: u8) -> Self
pub fn c_thresh_neg(self, _c_thresh_neg: u8) -> Self
Set the negative contrast threshold
sourcepub fn chunk_rows(self, chunk_rows: usize) -> Self
pub fn chunk_rows(self, chunk_rows: usize) -> Self
Set the number of rows to process at a time (in each thread)
sourcepub fn time_parameters(
self,
tps: DeltaT,
ref_time: DeltaT,
delta_t_max: DeltaT,
time_mode: Option<TimeMode>
) -> Result<Self, SourceError>
pub fn time_parameters( self, tps: DeltaT, ref_time: DeltaT, delta_t_max: DeltaT, time_mode: Option<TimeMode> ) -> Result<Self, SourceError>
Set the time parameters for the video.
These parameters, in conjunction, determine the temporal resolution and maximum transcode accuracy/quality.
Arguments
tps
: ticks per secondref_time
: reference time in ticks.delta_t_max
: maximum time difference between events of the same pixel, in ticks
returns: Result<Video<W>, Box<dyn Error, Global>>
sourcepub fn write_out(
self,
source_camera: Option<SourceCamera>,
time_mode: Option<TimeMode>,
encoder_type: EncoderType,
write: W
) -> Result<Self, SourceError>
pub fn write_out( self, source_camera: Option<SourceCamera>, time_mode: Option<TimeMode>, encoder_type: EncoderType, write: W ) -> Result<Self, SourceError>
Write out the video to a file.
Arguments
source_camera
: the type of video sourcetime_mode
: the time mode of the videowrite
: the output stream to write to
sourcepub fn show_display(self, show_display: bool) -> Self
pub fn show_display(self, show_display: bool) -> Self
Set the display mode for the instantaneous view.
sourcepub fn end_write_stream(&mut self) -> Result<(), SourceError>
pub fn end_write_stream(&mut self) -> Result<(), SourceError>
Close and flush the stream writer.
Errors
Returns an error if the stream writer cannot be closed cleanly.
sourcepub fn get_ref_time(&self) -> u32
pub fn get_ref_time(&self) -> u32
Get ref_time
sourcepub fn get_delta_t_max(&self) -> u32
pub fn get_delta_t_max(&self) -> u32
Get delta_t_max
sourcepub fn update_delta_t_max(&mut self, dtm: u32)
pub fn update_delta_t_max(&mut self, dtm: u32)
Set a new value for delta_t_max
sourcepub fn update_detect_features(&mut self, detect_features: bool)
pub fn update_detect_features(&mut self, detect_features: bool)
Set a new bool for feature_detection
sourcepub fn update_adder_thresh_pos(&mut self, c: u8)
pub fn update_adder_thresh_pos(&mut self, c: u8)
Set a new value for c_thresh_pos
sourcepub fn update_adder_thresh_neg(&mut self, _c: u8)
pub fn update_adder_thresh_neg(&mut self, _c: u8)
Set a new value for c_thresh_neg
pub fn detect_features(self, detect_features: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<W> RefUnwindSafe for Video<W>where W: RefUnwindSafe,
impl<W> !Sync for Video<W>
impl<W> Unpin for Video<W>where W: Unpin,
impl<W> UnwindSafe for Video<W>where W: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.