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§
Sourcefn info() -> PluginInfo
fn info() -> PluginInfo
Called by the application to query plugin information.
Sourcefn new(width: usize, height: usize) -> Self
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.
Sourcefn update(
&self,
time: f64,
width: usize,
height: usize,
inframe: &[u32],
outframe: &mut [u32],
)
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.
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.