mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-09 05:34:03 -04:00
module: load and register in one go
Load and register the module in one go because we need to have the global set when calling the init function so that factories and nodes can use this as the parent global. Set the name in the global properties.
This commit is contained in:
parent
1ed63e7ba0
commit
5df5afd0a9
7 changed files with 50 additions and 45 deletions
|
|
@ -58,19 +58,20 @@ struct pw_module_events {
|
|||
#define PW_VERSION_MODULE_EVENTS 0
|
||||
uint32_t version;
|
||||
|
||||
/** The module id destroyed */
|
||||
/** The module is destroyed */
|
||||
void (*destroy) (void *data);
|
||||
};
|
||||
|
||||
/** Load a module by name and arguments and register it */
|
||||
struct pw_module *
|
||||
pw_module_load(struct pw_core *core, const char *name, const char *args);
|
||||
/** The name of the module */
|
||||
#define PW_MODULE_PROP_NAME "pipewire.module.name"
|
||||
|
||||
/** Finish module configuration and register */
|
||||
int pw_module_register(struct pw_module *module, /**< the module to register */
|
||||
struct pw_client *owner, /**< optional owner */
|
||||
struct pw_global *parent, /**< parent global */
|
||||
struct pw_properties *properties /**< extra global properties */);
|
||||
struct pw_module *
|
||||
pw_module_load(struct pw_core *core,
|
||||
const char *name, /**< name of the module */
|
||||
const char *args /**< arguments of the module */,
|
||||
struct pw_client *owner, /**< optional owner */
|
||||
struct pw_global *parent, /**< parent global */
|
||||
struct pw_properties *properties /**< extra global properties */);
|
||||
|
||||
/** Get the core of a module */
|
||||
struct pw_core * pw_module_get_core(struct pw_module *module);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue