Plugin

Trait Plugin 

Source
pub trait Plugin: PluginBase {
    // Required methods
    fn info() -> PluginInfo;
    fn new(width: usize, height: usize) -> Self;
    fn update(
        &self,
        time: f64,
        width: usize,
        height: usize,
        inframe: &[u32],
        outframe: &mut [u32],
    );
    fn update2(
        &self,
        time: f64,
        width: usize,
        height: usize,
        inframe1: &[u32],
        inframe2: &[u32],
        inframe3: &[u32],
        outframe: &mut [u32],
    );
}
Expand description

The plugin type.

Required Methods§

Source

fn info() -> PluginInfo

Called by the application to query plugin information.

Source

fn new(width: usize, height: usize) -> Self

Constructor for effect instances.

The resolution must be an integer multiple of 8, must be greater than 0 and be at most 2048 in both dimensions.

The plugin must set default values for all parameters in this function.

Source

fn update( &self, time: f64, width: usize, height: usize, inframe: &[u32], outframe: &mut [u32], )

This is where the core effect processing happens. The application calls it after it has set the necessary parameter values.

The function is responsible to restore the fpu state (e.g. rounding mode) and mmx state if applicable before it returns to the caller.

This is never called for effect of type PluginType::Mixer2 and PluginType::Mixer3.

Source

fn update2( &self, time: f64, width: usize, height: usize, inframe1: &[u32], inframe2: &[u32], inframe3: &[u32], outframe: &mut [u32], )

For effect of type PluginType::Mixer2 and PluginType::Mixer3.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§