pub struct OverlayStamper { /* private fields */ }Expand description
A timecode overlay layer that can stamp successive frames.
Holds configuration and provides a stateful interface for frame-by-frame overlay rendering with optional automatic timecode advancement.
Implementations§
Source§impl OverlayStamper
impl OverlayStamper
Sourcepub fn new(config: OverlayConfig, frame_width: u32, frame_height: u32) -> Self
pub fn new(config: OverlayConfig, frame_width: u32, frame_height: u32) -> Self
Create a new overlay stamper for a given frame size.
Sourcepub fn stamp(&self, tc: &Timecode) -> (u32, u32, RenderedOverlay)
pub fn stamp(&self, tc: &Timecode) -> (u32, u32, RenderedOverlay)
Render overlay for a single frame and return pixel coordinates + text.
Sourcepub fn frame_size(&self) -> (u32, u32)
pub fn frame_size(&self) -> (u32, u32)
Get the frame dimensions.
Sourcepub fn config(&self) -> &OverlayConfig
pub fn config(&self) -> &OverlayConfig
Get a reference to the configuration.
Trait Implementations§
Source§impl Clone for OverlayStamper
impl Clone for OverlayStamper
Source§fn clone(&self) -> OverlayStamper
fn clone(&self) -> OverlayStamper
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OverlayStamper
impl RefUnwindSafe for OverlayStamper
impl Send for OverlayStamper
impl Sync for OverlayStamper
impl Unpin for OverlayStamper
impl UnsafeUnpin for OverlayStamper
impl UnwindSafe for OverlayStamper
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
Mutably borrows from an owned value. Read more