#include <plugin.h>
Data Fields | |
bg_plugin_common_t | common |
Infos and functions common to all plugin types. | |
void(* | set_callbacks )(void *priv, bg_ov_callbacks_t *cb) |
return callback | |
int(* | open_ov )(void *priv, gavl_audio_format_t *audio_format, gavl_video_format_t *video_format) |
Open a frame based visualization plugin. | |
int(* | open_win )(void *priv, gavl_audio_format_t *audio_format, const char *window_id) |
Open a window based visualization plugin. | |
void(* | update )(void *priv, gavl_audio_frame_t *frame) |
Send audio data to the plugin. | |
void(* | draw_frame )(void *priv, gavl_video_frame_t *frame) |
Draw an image. | |
void(* | show_frame )(void *priv) |
Show the image. | |
void(* | close )(void *priv) |
Close a plugin. |
These plugins get audio samples and run visualizations of them. Output can be either into a gavl_video_frame_t or directly via OpenGL. Which method is used is denoted by the BG_PLUGIN_VISUALIZE_FRAME and BG_PLUGIN_VISUALIZE_GL flags.
For OpenGL, you need to pass a window ID to the plugin. The plugin is then responsible for creating Subwindows and setting up an OpenGL context. In General, it's stronly recommended to use the bg_visualizer_t module to use visualizations.
Infos and functions common to all plugin types.
void(* bg_visualization_plugin_s::set_callbacks)(void *priv, bg_ov_callbacks_t *cb) |
return callback
priv | The handle returned by the create() method | |
cb | The callbacks to be called |
int(* bg_visualization_plugin_s::open_ov)(void *priv, gavl_audio_format_t *audio_format, gavl_video_format_t *video_format) |
Open a frame based visualization plugin.
priv | The handle returned by the create() method | |
audio_format | Audio format | |
video_format | Video format |
int(* bg_visualization_plugin_s::open_win)(void *priv, gavl_audio_format_t *audio_format, const char *window_id) |
Open a window based visualization plugin.
priv | The handle returned by the create() method | |
audio_format | Audio format | |
window_id | A window ID |
void(* bg_visualization_plugin_s::update)(void *priv, gavl_audio_frame_t *frame) |
Send audio data to the plugin.
priv | The handle returned by the create() method | |
frame | Audio frame |
void(* bg_visualization_plugin_s::draw_frame)(void *priv, gavl_video_frame_t *frame) |
Draw an image.
priv | The handle returned by the create() method | |
The | video frame to draw to |
void(* bg_visualization_plugin_s::show_frame)(void *priv) |
Show the image.
priv | The handle returned by the create() method |
void(* bg_visualization_plugin_s::close)(void *priv) |
Close a plugin.
priv | The handle returned by the create() method |