Skip to main content

VideoFxPlugin

Trait VideoFxPlugin 

Source
pub trait VideoFxPlugin: PluginBase {
    // Required method
    fn on_draw(&mut self) -> Result<()>;

    // Provided methods
    fn on_start(&mut self) -> Result<()> { ... }
    fn on_stop(&mut self) -> Result<()> { ... }
    fn on_device_init(&mut self) -> Result<()> { ... }
    fn on_device_close(&mut self) -> Result<()> { ... }
    fn on_audio_samples(&mut self, buffer: &[f32]) -> Result<()> { ... }
    fn width(&self) -> i32 { ... }
    fn height(&self) -> i32 { ... }
    fn sample_rate(&self) -> i32 { ... }
    fn song_bpm(&self) -> i32 { ... }
    fn song_pos_beats(&self) -> f64 { ... }
}
Expand description

Video FX plugin trait

Required Methods§

Source

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

Draw the video frame

Provided Methods§

Source

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

Called when the plugin starts

Source

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

Called when the plugin stops

Source

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

Called when graphics device is initialized

Source

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

Called when graphics device is closed

Source

fn on_audio_samples(&mut self, buffer: &[f32]) -> Result<()>

Process audio samples for visualization

Source

fn width(&self) -> i32

Get video width

Source

fn height(&self) -> i32

Get video height

Source

fn sample_rate(&self) -> i32

Get the sample rate

Source

fn song_bpm(&self) -> i32

Get the song BPM

Source

fn song_pos_beats(&self) -> f64

Get the song position in beats

Implementors§