Trait adder_codec_rs::framer::driver::Framer
source · pub trait Framer {
type Output;
// Required methods
fn new(builder: FramerBuilder) -> Self;
fn ingest_event(
&mut self,
event: &mut Event,
last_event: Option<Event>
) -> bool;
fn ingest_events_events(&mut self, events: Vec<Vec<Event>>) -> bool;
fn flush_frame_buffer(&mut self) -> bool;
}
Expand description
A trait for accumulating ADΔER events into frames.
Required Associated Types§
Required Methods§
sourcefn new(builder: FramerBuilder) -> Self
fn new(builder: FramerBuilder) -> Self
Create a new Framer
with the given FramerBuilder
.
sourcefn ingest_event(&mut self, event: &mut Event, last_event: Option<Event>) -> bool
fn ingest_event(&mut self, event: &mut Event, last_event: Option<Event>) -> bool
Ingest an ADΔER event. Will process differently depending on choice of FramerMode
.
If INSTANTANEOUS, this function will set the corresponding output frame’s pixel value to
the value derived from this Event
, only if this is the first value ingested for that
pixel and frame. Otherwise, the operation will silently be ignored.
If INTEGRATION, this function will integrate this Event
value for the corresponding
output frame(s)
sourcefn ingest_events_events(&mut self, events: Vec<Vec<Event>>) -> bool
fn ingest_events_events(&mut self, events: Vec<Vec<Event>>) -> bool
Ingest a vector of a vector of ADΔER events.
sourcefn flush_frame_buffer(&mut self) -> bool
fn flush_frame_buffer(&mut self) -> bool
For all frames left that we haven’t written out yet, for any None pixels, set them to the last recorded intensity for that pixel.
Returns true
if there are frames now ready to write out
Object Safety§
This trait is not object safe.