Go to the documentation of this file.
26 #ifndef PIPEWIRE_IMPL_MODULE_H
27 #define PIPEWIRE_IMPL_MODULE_H
33 #include <spa/utils/hook.h>
37 #define PIPEWIRE_SYMBOL_MODULE_INIT "pipewire__module_init"
38 #define PIPEWIRE_MODULE_PREFIX "libpipewire-"
61 #define PW_VERSION_IMPL_MODULE_EVENTS 0
99 struct spa_hook *listener,
#define PW_VERSION_MODULE
Definition: module.h:39
static uint32_t int int res
Definition: core.h:326
void(* registered)(void *data)
The module is registered.
Definition: impl-module.h:73
#define pw_log_error(...)
SPA_EXPORT void pw_global_destroy(struct pw_global *global)
Destroy a global.
Definition: global.c:377
SPA_EXPORT char ** pw_split_strv(const char *str, const char *delimiter, int max_tokens, int *n_tokens)
Split a string based on delimiters.
Definition: utils.c:71
#define PW_KEY_OBJECT_ID
a global object id
Definition: keys.h:60
void(* free)(void *data)
The module is freed.
Definition: impl-module.h:67
Module events added with pw_impl_module_add_listener.
Definition: impl-module.h:60
int(* pw_impl_module_init_func_t)(struct pw_impl_module *module, const char *args)
Module init function signature.
Definition: impl-module.h:57
#define PW_TYPE_INTERFACE_Module
Definition: module.h:37
void(* initialized)(void *data)
The module is initialized.
Definition: impl-module.h:69
Global events, use pw_global_add_listener.
Definition: global.h:65
PipeWire client object class.
void(* destroy)(void *data)
The module is destroyed.
Definition: impl-module.h:65
void pw_global_add_listener(struct pw_global *global, struct spa_hook *listener, const struct pw_global_events *events, void *data)
Add an event listener on the global.
Definition: global.c:262
A global object visible to remote clients.
void pw_impl_module_add_listener(struct pw_impl_module *module, struct spa_hook *listener, const struct pw_impl_module_events *events, void *data)
Add an event listener to a module.
Definition: impl-module.c:382
struct spa_dict dict
dictionary of key/values
Definition: properties.h:46
SPA_EXPORT const struct pw_properties * pw_impl_module_get_properties(struct pw_impl_module *module)
Get the node properties.
Definition: impl-module.c:346
SPA_EXPORT int pw_impl_module_update_properties(struct pw_impl_module *module, const struct spa_dict *dict)
Update the module properties.
Definition: impl-module.c:352
SPA_EXPORT struct pw_context * pw_impl_module_get_context(struct pw_impl_module *module)
Get the context of a module.
Definition: impl-module.c:334
SPA_EXPORT int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...)
Set a property value by format.
Definition: properties.c:433
SPA_EXPORT struct pw_impl_module * pw_context_load_module(struct pw_context *context, const char *name, const char *args, struct pw_properties *properties)
Load a module.
Definition: impl-module.c:157
#define pw_log_debug(...)
struct pw_global * pw_impl_module_get_global(struct pw_impl_module *module)
Get the global of a module.
Definition: impl-module.c:340
SPA_EXPORT int pw_properties_update(struct pw_properties *props, const struct spa_dict *dict)
Update properties.
Definition: properties.c:263
bool pw_in_valgrind(void)
Definition: pipewire.c:566
The module information.
Definition: module.h:43
int pw_global_add_resource(struct pw_global *global, struct pw_resource *resource)
Add a resource to a global.
Definition: global.c:237
SPA_EXPORT struct pw_global * pw_impl_module_get_global(struct pw_impl_module *module)
Get the global of a module.
Definition: impl-module.c:340
static uint32_t int int const char va_list args
Definition: core.h:327
const struct pw_module_info * pw_impl_module_get_info(struct pw_impl_module *module)
Get the module info.
Definition: impl-module.c:376
SPA_EXPORT int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:400
#define PW_MODULE_CHANGE_MASK_PROPS
Definition: module.h:48
#define PW_KEY_MODULE_NAME
the name of the module
Definition: keys.h:208
#define PW_VERSION_GLOBAL_EVENTS
Definition: global.h:66
#define PW_MODULE_CHANGE_MASK_ALL
Definition: module.h:49
struct pw_resource * pw_resource_new(struct pw_impl_client *client, uint32_t id, uint32_t permissions, const char *type, uint32_t version, size_t user_data_size)
Make a new resource for client.
Definition: resource.c:43
SPA_EXPORT struct pw_global * pw_global_new(struct pw_context *context, const char *type, uint32_t version, struct pw_properties *properties, pw_global_bind_func_t func, void *object)
Create a new global.
Definition: global.c:67
struct pw_control this
Definition: control.c:34
uint32_t version
Definition: impl-module.h:62
SPA_EXPORT struct pw_properties * pw_properties_new(const char *key,...)
Make a new properties object.
Definition: properties.c:98
const struct pw_properties * pw_impl_module_get_properties(struct pw_impl_module *module)
Get the node properties.
Definition: impl-module.c:346
SPA_EXPORT void pw_impl_module_destroy(struct pw_impl_module *module)
Destroy a module.
Definition: impl-module.c:304
SPA_EXPORT void pw_free_strv(char **str)
Free a NULL terminated array of strings.
Definition: utils.c:105
SPA_EXPORT int pw_global_register(struct pw_global *global)
register a global to the context registry
Definition: global.c:128
SPA_EXPORT void pw_impl_module_add_listener(struct pw_impl_module *module, struct spa_hook *listener, const struct pw_impl_module_events *events, void *data)
Add an event listener to a module.
Definition: impl-module.c:382
#define NAME
Definition: impl-module.c:39
struct pw_context * pw_impl_module_get_context(struct pw_impl_module *module)
Get the context of a module.
Definition: impl-module.c:334
SPA_EXPORT const struct pw_module_info * pw_impl_module_get_info(struct pw_impl_module *module)
Get the module info.
Definition: impl-module.c:376
A collection of key/value pairs.
Definition: properties.h:45
SPA_EXPORT void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:335
#define PIPEWIRE_SYMBOL_MODULE_INIT
Definition: impl-module.h:37
int pw_impl_module_update_properties(struct pw_impl_module *module, const struct spa_dict *dict)
Update the module properties.
Definition: impl-module.c:352