Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
    // Required methods
    fn process(&mut self, frame: Frame) -> Result<Frame>;
    fn name(&self) -> &str;

    // Provided method
    fn reset(&mut self) -> Result<()> { ... }
}
Expand description

A video frame plugin that processes frames in-order.

Plugins modify video feeds at the frame level, enabling effects, transformations, and custom rendering.

§Examples

A rotation plugin might read the frame, apply geometric transformation, and return the result.

Required Methods§

Source

fn process(&mut self, frame: Frame) -> Result<Frame>

Process a frame and return the result.

Takes ownership of the input frame. Implementations may reuse the buffer or allocate a new one depending on the transformation.

Source

fn name(&self) -> &str

Human-readable name for this plugin.

Provided Methods§

Source

fn reset(&mut self) -> Result<()>

Reset internal state (e.g., after seeking or pause).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§