Visualization module.
More...
|
bg_visualizer_t * | bg_visualizer_create (bg_plugin_registry_t *plugin_reg) |
| Create a visualizer. More...
|
|
void | bg_visualizer_destroy (bg_visualizer_t *v) |
| Destroy a visualizer. More...
|
|
const bg_parameter_info_t * | bg_visualizer_get_parameters (bg_visualizer_t *v) |
| Get the parameters of a visualizer. More...
|
|
void | bg_visualizer_set_callbacks (bg_visualizer_t *v, bg_ov_callbacks_t *cb) |
| Set ov callbacks. More...
|
|
void | bg_visualizer_set_parameter (void *priv, const char *name, const bg_parameter_value_t *val) |
| Set a parameter of a visualizer. More...
|
|
void | bg_visualizer_set_vis_plugin (bg_visualizer_t *v, const bg_plugin_info_t *info) |
| Set the visualization plugin. More...
|
|
void | bg_visualizer_set_vis_parameter (void *priv, const char *name, const bg_parameter_value_t *val) |
| Set a parameter of the visualization plugin. More...
|
|
void | bg_visualizer_open_plugin (bg_visualizer_t *v, const gavl_audio_format_t *format, bg_plugin_handle_t *ov_handle) |
| Open visualization with a video output plugin. More...
|
|
void | bg_visualizer_open_id (bg_visualizer_t *v, const gavl_audio_format_t *format, const bg_plugin_info_t *ov_info, const char *display_id) |
| Open visualization with a plugin info and a window ID. More...
|
|
void | bg_visualizer_set_audio_format (bg_visualizer_t *v, const gavl_audio_format_t *format) |
| Set the audio format of a visualizer. More...
|
|
void | bg_visualizer_update (bg_visualizer_t *v, const gavl_audio_frame_t *frame) |
| Send audio data to a visualizer. More...
|
|
void | bg_visualizer_close (bg_visualizer_t *v) |
| Close a visualizer. More...
|
|
int | bg_visualizer_need_restart (bg_visualizer_t *v) |
| Check, whether a visualizer needs to be restarted. More...
|
|
double | bg_visualizer_get_fps (bg_visualizer_t *v) |
| Get the frames per second. More...
|
|
Visualization module.
This is the recommended frontend for visualization plugins. You pass it audio frames in your format, and it will handle all format conversions, rendering and fps control. Visualizations are run in a separate process, so plugins can never make the calling application crash.
Opaque visualizer structure.
You don't want to know what's inside
Create a visualizer.
- Parameters
-
plugin_reg | A plugin registry |
- Returns
- A newly create visualizer
Destroy a visualizer.
- Parameters
-
Get the parameters of a visualizer.
- Parameters
-
- Returns
- NULL terminated array of parameter descriptions
Set ov callbacks.
- Parameters
-
v | A visualizer |
cb | Callbacks |
void bg_visualizer_set_parameter |
( |
void * |
priv, |
|
|
const char * |
name, |
|
|
const bg_parameter_value_t * |
val |
|
) |
| |
Set a parameter of a visualizer.
- Parameters
-
priv | A visualizer casted to void |
name | Name |
val | Value |
Set the visualization plugin.
- Parameters
-
v | A Visualizer |
info | A plugin info |
void bg_visualizer_set_vis_parameter |
( |
void * |
priv, |
|
|
const char * |
name, |
|
|
const bg_parameter_value_t * |
val |
|
) |
| |
Set a parameter of the visualization plugin.
- Parameters
-
priv | A visualizer casted to void |
name | Name |
val | Value |
Open visualization with a video output plugin.
- Parameters
-
v | A Visualizer |
format | An audio format |
ov_handle | Handle for the video output plugin |
Open visualization with a plugin info and a window ID.
- Parameters
-
v | A Visualizer |
format | An audio format |
ov_info | Which video output plugin to use |
display_id | Window ID |
Set the audio format of a visualizer.
- Parameters
-
v | A Visualizer |
format | An audio format |
This function can be called on a visualizer, which is already open, to change the audio format on the fly
Send audio data to a visualizer.
- Parameters
-
v | A Visualizer |
frame | An audio frame |
Close a visualizer.
- Parameters
-
This stops all the internal visualization thread as well as the child process, in which the visualization is run
Check, whether a visualizer needs to be restarted.
- Parameters
-
- Returns
- 1 if the visualizer needs a restart
Call this function after bg_visualizer_set_parameter to check, if you must close and reopen the visualizer.
Get the frames per second.
- Parameters
-
- Returns
- The frames per second