Database of all installed plugins. More...
Data Structures | |
struct | bg_plugin_info_s |
Information about a plugin. More... | |
struct | bg_plugin_registry_options_t |
Creation options for a plugin registry. More... | |
struct | bg_plugin_handle_s |
Handle of a loaded plugin. More... | |
Modules | |
Defaults saved between sessions | |
Plugin defaults. | |
Typedefs | |
typedef struct bg_plugin_info_s | bg_plugin_info_t |
Typedef for plugin info. | |
typedef struct bg_plugin_registry_s | bg_plugin_registry_t |
Opaque handle for a plugin registry. | |
typedef struct bg_plugin_handle_s | bg_plugin_handle_t |
Typedef for plugin handle. | |
Enumerations | |
enum | bg_plugin_api_t { BG_PLUGIN_API_GMERLIN = 0, BG_PLUGIN_API_LADSPA, BG_PLUGIN_API_LV, BG_PLUGIN_API_FREI0R } |
Identifiers for plugin APIs. More... | |
enum | bg_stream_type_t { BG_STREAM_AUDIO = (1<<0), BG_STREAM_SUBTITLE_TEXT = (1<<1), BG_STREAM_SUBTITLE_OVERLAY = (1<<2), BG_STREAM_VIDEO = (1<<3) } |
Identifiers for stream types. More... | |
Functions | |
bg_plugin_registry_t * | bg_plugin_registry_create (bg_cfg_section_t *section) |
Create a plugin registry. | |
bg_plugin_registry_t * | bg_plugin_registry_create_with_options (bg_cfg_section_t *section, const bg_plugin_registry_options_t *opt) |
Create a plugin registry with options. | |
void | bg_plugin_registry_scan_devices (bg_plugin_registry_t *plugin_reg, uint32_t type_mask, uint32_t flag_mask) |
Scan for pluggable devices. | |
void | bg_plugin_registry_destroy (bg_plugin_registry_t *reg) |
Destroy a plugin registry. | |
int | bg_plugin_registry_get_num_plugins (bg_plugin_registry_t *reg, uint32_t type_mask, uint32_t flag_mask) |
Count plugins. | |
const bg_plugin_info_t * | bg_plugin_find_by_index (bg_plugin_registry_t *reg, int index, uint32_t type_mask, uint32_t flag_mask) |
Find a plugin by index. | |
const bg_plugin_info_t * | bg_plugin_find_by_name (bg_plugin_registry_t *reg, const char *name) |
Find a plugin by it's unique short name. | |
const bg_plugin_info_t * | bg_plugin_find_by_filename (bg_plugin_registry_t *reg, const char *filename, int type_mask) |
Find a plugin by the file extension. | |
const bg_plugin_info_t * | bg_plugin_find_by_protocol (bg_plugin_registry_t *reg, const char *protocol) |
Find an input plugin for a network protocol. | |
char ** | bg_plugin_registry_get_plugins (bg_plugin_registry_t *reg, uint32_t type_mask, uint32_t flag_mask) |
Get a list of plugins. | |
void | bg_plugin_registry_free_plugins (char **plugins) |
Free a plugin list. | |
int | bg_input_plugin_load (bg_plugin_registry_t *reg, const char *location, const bg_plugin_info_t *info, bg_plugin_handle_t **ret, bg_input_callbacks_t *callbacks, int prefer_edl) |
Load and open an input plugin. | |
int | bg_input_plugin_load_edl (bg_plugin_registry_t *reg, const bg_edl_t *edl, const bg_plugin_info_t *info, bg_plugin_handle_t **ret, bg_input_callbacks_t *callbacks) |
Load and open an edl decoder. | |
void | bg_plugin_registry_set_extensions (bg_plugin_registry_t *reg, const char *plugin_name, const char *extensions) |
Set file extensions for a plugin. | |
void | bg_plugin_registry_set_protocols (bg_plugin_registry_t *reg, const char *plugin_name, const char *protocols) |
Set protocols for a plugin. | |
void | bg_plugin_registry_set_priority (bg_plugin_registry_t *reg, const char *plugin_name, int priority) |
Set priority for a plugin. | |
bg_cfg_section_t * | bg_plugin_registry_get_section (bg_plugin_registry_t *reg, const char *plugin_name) |
Get the config section belonging to a plugin. | |
void | bg_plugin_registry_set_parameter_info (bg_plugin_registry_t *reg, uint32_t type_mask, uint32_t flag_mask, bg_parameter_info_t *ret) |
Set a parameter info for selecting and configuring plugins. | |
void | bg_plugin_registry_set_parameter_info_input (bg_plugin_registry_t *reg, uint32_t type_mask, uint32_t flag_mask, bg_parameter_info_t *ret) |
Set a parameter info for selecting and configuring input plugins. | |
void | bg_plugin_registry_set_parameter_input (void *data, const char *name, const bg_parameter_value_t *val) |
Set a parameter of an input plugin. | |
bg_parameter_info_t * | bg_plugin_registry_create_encoder_parameters (bg_plugin_registry_t *reg, uint32_t stream_type_mask, uint32_t flag_mask) |
Create a parameter array for encoders. | |
const char * | bg_encoder_section_get_plugin (bg_plugin_registry_t *plugin_reg, bg_cfg_section_t *s, bg_stream_type_t stream_type, int stream_mask) |
Get the name for an encoding plugin. | |
void | bg_encoder_section_get_plugin_config (bg_plugin_registry_t *plugin_reg, bg_cfg_section_t *s, bg_stream_type_t stream_type, int stream_mask, bg_cfg_section_t **section_ret, const bg_parameter_info_t **params_ret) |
Get the plugin configuration for an encoding plugin. | |
void | bg_encoder_section_get_stream_config (bg_plugin_registry_t *plugin_reg, bg_cfg_section_t *s, bg_stream_type_t stream_type, int stream_mask, bg_cfg_section_t **section_ret, const bg_parameter_info_t **params_ret) |
Get the stream configuration for an encoding plugin. | |
bg_cfg_section_t * | bg_encoder_section_get_from_registry (bg_plugin_registry_t *plugin_reg, const bg_parameter_info_t *parameters, uint32_t type_mask, uint32_t flag_mask) |
Get an encoder configuration section from a registry. | |
void | bg_encoder_section_store_in_registry (bg_plugin_registry_t *plugin_reg, bg_cfg_section_t *s, const bg_parameter_info_t *parameters, uint32_t type_mask, uint32_t flag_mask) |
Store an encoder configuration in a registry. | |
void | bg_plugin_registry_add_device (bg_plugin_registry_t *reg, const char *plugin_name, const char *device, const char *name) |
Add a device to a plugin. | |
void | bg_plugin_registry_set_device_name (bg_plugin_registry_t *reg, const char *plugin_name, const char *device, const char *name) |
Change the name of a device. | |
void | bg_plugin_registry_find_devices (bg_plugin_registry_t *reg, const char *plugin_name) |
Let a plugin rescan for devices. | |
void | bg_plugin_registry_remove_device (bg_plugin_registry_t *reg, const char *plugin_name, const char *device, const char *name) |
Remove a device. | |
gavl_video_frame_t * | bg_plugin_registry_load_image (bg_plugin_registry_t *reg, const char *filename, gavl_video_format_t *format, bg_metadata_t *m) |
Load an image. | |
void | bg_plugin_registry_save_image (bg_plugin_registry_t *reg, const char *filename, gavl_video_frame_t *frame, const gavl_video_format_t *format, const bg_metadata_t *m) |
Save an image. | |
bg_plugin_handle_t * | bg_plugin_load (bg_plugin_registry_t *reg, const bg_plugin_info_t *info) |
Load a plugin. | |
bg_plugin_handle_t * | bg_ov_plugin_load (bg_plugin_registry_t *reg, const bg_plugin_info_t *info, const char *window_id) |
Load a video output plugin. | |
void | bg_plugin_lock (bg_plugin_handle_t *h) |
Lock a plugin. | |
void | bg_plugin_unlock (bg_plugin_handle_t *h) |
Unlock a plugin. | |
void | bg_plugin_ref (bg_plugin_handle_t *h) |
Increase the reference count. | |
void | bg_plugin_unref (bg_plugin_handle_t *h) |
Decrease the reference count. | |
void | bg_plugin_unref_nolock (bg_plugin_handle_t *h) |
Decrease the reference count without locking. | |
bg_plugin_info_t * | bg_plugin_info_create (const bg_plugin_common_t *plugin, void *plugin_priv, const char *module_filename) |
Create a plugin info from a plugin. | |
bg_plugin_handle_t * | bg_plugin_handle_create () |
Create an empty plugin handle. |
Database of all installed plugins.
The plugin registry keeps informations about all installed plugins. Furthermore, it manages default plugins and some other settings. Available plugins are cached in the file $HOME/.gmerlin/plugins.xml, which is used by all applications. Application specific data are stored in a bg_cfg_section_t.
It allows you to search for plugins according to certain criteria. You get detailed information about plugins in bg_plugin_info_t structs.
typedef struct bg_plugin_info_s bg_plugin_info_t |
Typedef for plugin info.
typedef struct bg_plugin_registry_s bg_plugin_registry_t |
Opaque handle for a plugin registry.
You don't want to know, what's inside here.
typedef struct bg_plugin_handle_s bg_plugin_handle_t |
Typedef for plugin handle.
enum bg_plugin_api_t |
enum bg_stream_type_t |
Identifiers for stream types.
bg_plugin_registry_t* bg_plugin_registry_create | ( | bg_cfg_section_t * | section | ) |
Create a plugin registry.
section | A configuration section |
bg_plugin_registry_t* bg_plugin_registry_create_with_options | ( | bg_cfg_section_t * | section, | |
const bg_plugin_registry_options_t * | opt | |||
) |
Create a plugin registry with options.
section | A configuration section
|
void bg_plugin_registry_scan_devices | ( | bg_plugin_registry_t * | plugin_reg, | |
uint32_t | type_mask, | |||
uint32_t | flag_mask | |||
) |
Scan for pluggable devices.
plugin_reg | A plugin registry
|
void bg_plugin_registry_destroy | ( | bg_plugin_registry_t * | reg | ) |
Destroy a plugin registry.
reg | A plugin registry |
int bg_plugin_registry_get_num_plugins | ( | bg_plugin_registry_t * | reg, | |
uint32_t | type_mask, | |||
uint32_t | flag_mask | |||
) |
Count plugins.
reg | A plugin registry
|
const bg_plugin_info_t* bg_plugin_find_by_index | ( | bg_plugin_registry_t * | reg, | |
int | index, | |||
uint32_t | type_mask, | |||
uint32_t | flag_mask | |||
) |
Find a plugin by index.
reg | A plugin registry
|
const bg_plugin_info_t* bg_plugin_find_by_name | ( | bg_plugin_registry_t * | reg, | |
const char * | name | |||
) |
Find a plugin by it's unique short name.
reg | A plugin registry
|
const bg_plugin_info_t* bg_plugin_find_by_filename | ( | bg_plugin_registry_t * | reg, | |
const char * | filename, | |||
int | type_mask | |||
) |
Find a plugin by the file extension.
reg | A plugin registry
|
const bg_plugin_info_t* bg_plugin_find_by_protocol | ( | bg_plugin_registry_t * | reg, | |
const char * | protocol | |||
) |
Find an input plugin for a network protocol.
reg | A plugin registry
|
char** bg_plugin_registry_get_plugins | ( | bg_plugin_registry_t * | reg, | |
uint32_t | type_mask, | |||
uint32_t | flag_mask | |||
) |
Get a list of plugins.
reg | A plugin registry
|
void bg_plugin_registry_free_plugins | ( | char ** | plugins | ) |
Free a plugin list.
plugins | List returned by bg_plugin_registry_get_plugins |
int bg_input_plugin_load | ( | bg_plugin_registry_t * | reg, | |
const char * | location, | |||
const bg_plugin_info_t * | info, | |||
bg_plugin_handle_t ** | ret, | |||
bg_input_callbacks_t * | callbacks, | |||
int | prefer_edl | |||
) |
Load and open an input plugin.
reg | A plugin registry
|
int bg_input_plugin_load_edl | ( | bg_plugin_registry_t * | reg, | |
const bg_edl_t * | edl, | |||
const bg_plugin_info_t * | info, | |||
bg_plugin_handle_t ** | ret, | |||
bg_input_callbacks_t * | callbacks | |||
) |
Load and open an edl decoder.
reg | A plugin registry
|
void bg_plugin_registry_set_extensions | ( | bg_plugin_registry_t * | reg, | |
const char * | plugin_name, | |||
const char * | extensions | |||
) |
Set file extensions for a plugin.
reg | A plugin registry
|
void bg_plugin_registry_set_protocols | ( | bg_plugin_registry_t * | reg, | |
const char * | plugin_name, | |||
const char * | protocols | |||
) |
Set protocols for a plugin.
reg | A plugin registry
|
void bg_plugin_registry_set_priority | ( | bg_plugin_registry_t * | reg, | |
const char * | plugin_name, | |||
int | priority | |||
) |
Set priority for a plugin.
reg | A plugin registry
|
bg_cfg_section_t* bg_plugin_registry_get_section | ( | bg_plugin_registry_t * | reg, | |
const char * | plugin_name | |||
) |
Get the config section belonging to a plugin.
reg | A plugin registry
|
void bg_plugin_registry_set_parameter_info | ( | bg_plugin_registry_t * | reg, | |
uint32_t | type_mask, | |||
uint32_t | flag_mask, | |||
bg_parameter_info_t * | ret | |||
) |
Set a parameter info for selecting and configuring plugins.
reg | A plugin registry
|
void bg_plugin_registry_set_parameter_info_input | ( | bg_plugin_registry_t * | reg, | |
uint32_t | type_mask, | |||
uint32_t | flag_mask, | |||
bg_parameter_info_t * | ret | |||
) |
Set a parameter info for selecting and configuring input plugins.
reg | A plugin registry
|
void bg_plugin_registry_set_parameter_input | ( | void * | data, | |
const char * | name, | |||
const bg_parameter_value_t * | val | |||
) |
Set a parameter of an input plugin.
data | A plugin registry cast to void
|
bg_parameter_info_t* bg_plugin_registry_create_encoder_parameters | ( | bg_plugin_registry_t * | reg, | |
uint32_t | stream_type_mask, | |||
uint32_t | flag_mask | |||
) |
Create a parameter array for encoders.
reg | A plugin registry
|
const char* bg_encoder_section_get_plugin | ( | bg_plugin_registry_t * | plugin_reg, | |
bg_cfg_section_t * | s, | |||
bg_stream_type_t | stream_type, | |||
int | stream_mask | |||
) |
Get the name for an encoding plugin.
plugin_ref | A plugin registry
|
void bg_encoder_section_get_plugin_config | ( | bg_plugin_registry_t * | plugin_reg, | |
bg_cfg_section_t * | s, | |||
bg_stream_type_t | stream_type, | |||
int | stream_mask, | |||
bg_cfg_section_t ** | section_ret, | |||
const bg_parameter_info_t ** | params_ret | |||
) |
Get the plugin configuration for an encoding plugin.
plugin_ref | A plugin registry
|
void bg_encoder_section_get_stream_config | ( | bg_plugin_registry_t * | plugin_reg, | |
bg_cfg_section_t * | s, | |||
bg_stream_type_t | stream_type, | |||
int | stream_mask, | |||
bg_cfg_section_t ** | section_ret, | |||
const bg_parameter_info_t ** | params_ret | |||
) |
Get the stream configuration for an encoding plugin.
plugin_ref | A plugin registry
|
bg_cfg_section_t* bg_encoder_section_get_from_registry | ( | bg_plugin_registry_t * | plugin_reg, | |
const bg_parameter_info_t * | parameters, | |||
uint32_t | type_mask, | |||
uint32_t | flag_mask | |||
) |
Get an encoder configuration section from a registry.
plugin_ref | A plugin registry
|
void bg_encoder_section_store_in_registry | ( | bg_plugin_registry_t * | plugin_reg, | |
bg_cfg_section_t * | s, | |||
const bg_parameter_info_t * | parameters, | |||
uint32_t | type_mask, | |||
uint32_t | flag_mask | |||
) |
Store an encoder configuration in a registry.
plugin_ref | A plugin registry
|
void bg_plugin_registry_add_device | ( | bg_plugin_registry_t * | reg, | |
const char * | plugin_name, | |||
const char * | device, | |||
const char * | name | |||
) |
Add a device to a plugin.
reg | A plugin registry
|
void bg_plugin_registry_set_device_name | ( | bg_plugin_registry_t * | reg, | |
const char * | plugin_name, | |||
const char * | device, | |||
const char * | name | |||
) |
Change the name of a device.
reg | A plugin registry
|
void bg_plugin_registry_find_devices | ( | bg_plugin_registry_t * | reg, | |
const char * | plugin_name | |||
) |
Let a plugin rescan for devices.
reg | A plugin registry
|
void bg_plugin_registry_remove_device | ( | bg_plugin_registry_t * | reg, | |
const char * | plugin_name, | |||
const char * | device, | |||
const char * | name | |||
) |
Remove a device.
reg | A plugin registry
|
gavl_video_frame_t* bg_plugin_registry_load_image | ( | bg_plugin_registry_t * | reg, | |
const char * | filename, | |||
gavl_video_format_t * | format, | |||
bg_metadata_t * | m | |||
) |
Load an image.
reg | A plugin registry
|
void bg_plugin_registry_save_image | ( | bg_plugin_registry_t * | reg, | |
const char * | filename, | |||
gavl_video_frame_t * | frame, | |||
const gavl_video_format_t * | format, | |||
const bg_metadata_t * | m | |||
) |
Save an image.
reg | A plugin registry
|
bg_plugin_handle_t* bg_plugin_load | ( | bg_plugin_registry_t * | reg, | |
const bg_plugin_info_t * | info | |||
) |
Load a plugin.
reg | A plugin registry
|
bg_plugin_handle_t* bg_ov_plugin_load | ( | bg_plugin_registry_t * | reg, | |
const bg_plugin_info_t * | info, | |||
const char * | window_id | |||
) |
Load a video output plugin.
reg | A plugin registry
|
void bg_plugin_lock | ( | bg_plugin_handle_t * | h | ) |
Lock a plugin.
h | A plugin handle |
void bg_plugin_unlock | ( | bg_plugin_handle_t * | h | ) |
Unlock a plugin.
h | A plugin handle |
void bg_plugin_ref | ( | bg_plugin_handle_t * | h | ) |
Increase the reference count.
h | A plugin handle |
void bg_plugin_unref | ( | bg_plugin_handle_t * | h | ) |
Decrease the reference count.
h | A plugin handle |
void bg_plugin_unref_nolock | ( | bg_plugin_handle_t * | h | ) |
Decrease the reference count without locking.
h | A plugin handle |
bg_plugin_info_t* bg_plugin_info_create | ( | const bg_plugin_common_t * | plugin, | |
void * | plugin_priv, | |||
const char * | module_filename | |||
) |
Create a plugin info from a plugin.
plugin | A plugin
|
bg_plugin_handle_t* bg_plugin_handle_create | ( | ) |
Create an empty plugin handle.