Go to the documentation of this file.
25 #ifndef PIPEWIRE_IMPL_METADATA_H
26 #define PIPEWIRE_IMPL_METADATA_H
41 struct pw_impl_metadata;
49 #include "pipewire/extensions/metadata.h"
53 #define PW_VERSION_IMPL_METADATA_EVENTS 0
71 size_t user_data_size);
84 struct pw_metadata *
impl);
99 uint32_t subject,
const char *key,
const char *type,
103 uint32_t subject,
const char *key,
const char *type,
void spa_hook_list_join(struct spa_hook_list *list, struct spa_hook_list *save)
Definition: hook.h:366
#define spa_return_val_if_fail(expr, val)
Definition: defs.h:251
#define spa_zero(x)
Definition: defs.h:303
int pw_global_register(struct pw_global *global)
Register a global object to the context registry.
Definition: global.c:125
#define PW_KEY_MODULE_ID
module properties
Definition: src/pipewire/keys.h:249
Definition: impl-core.c:74
user data to add to an object
Definition: filter.c:75
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 object.
Definition: global.c:66
int pw_global_add_resource(struct pw_global *global, struct pw_resource *resource)
Add a resource to a global.
Definition: global.c:230
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
struct spa_hook resource_listener
Definition: impl-core.c:76
#define SPA_EXPORT
Definition: defs.h:208
Global events, use pw_global_add_listener.
Definition: global.h:68
#define pw_array_consume(pos, array)
Definition: array.h:77
#define PW_PERM_R
object can be seen and events can be received
Definition: permission.h:47
void spa_hook_list_append(struct spa_hook_list *list, struct spa_hook *hook, const void *funcs, void *data)
Append a hook.
Definition: hook.h:316
struct spa_hook metadata_listener
Definition: impl-metadata.c:258
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:159
#define pw_array_for_each(pos, array)
Definition: array.h:72
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition: defs.h:205
#define pw_array_remove(a, p)
Definition: array.h:82
#define SPA_INTERFACE_INIT(_type, _version, _funcs, _data)
Initialize a spa_interface.
Definition: hook.h:165
#define SPA_CONTAINER_OF(p, t, m)
Definition: defs.h:170
void spa_hook_list_isolate(struct spa_hook_list *list, struct spa_hook_list *save, struct spa_hook *hook, const void *funcs, void *data)
Definition: hook.h:352
Definition: impl-metadata.c:49
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:255
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
void pw_resource_add_object_listener(struct pw_resource *resource, struct spa_hook *listener, const void *funcs, void *data)
Set the resource implementation.
Definition: resource.c:174
struct spa_hook object_listener
Definition: impl-core.c:77
struct metadata def
Definition: impl-metadata.c:249
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
void pw_resource_errorf(struct pw_resource *resource, int res, const char *error,...) 1(3
#define PW_VERSION_RESOURCE_EVENTS
Definition: resource.h:61
void pw_resource_add_listener(struct pw_resource *resource, struct spa_hook *listener, const struct pw_resource_events *events, void *data)
Add an event listener.
Definition: resource.c:165
char * key
Definition: impl-metadata.c:51
int pw_global_update_keys(struct pw_global *global, const struct spa_dict *dict, const char *const keys[])
Update the global properties, must be done when unregistered.
Definition: global.c:209
#define spa_strerror(err)
Definition: result.h:51
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
struct pw_impl_client * pw_resource_get_client(struct pw_resource *resource)
Get the client owning this resource.
Definition: resource.c:127
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
Definition: module-protocol-native.c:103
void pw_global_destroy(struct pw_global *global)
Destroy a global.
Definition: global.c:369
#define PW_VERSION_GLOBAL_EVENTS
Definition: global.h:69
int pw_impl_client_check_permissions(struct pw_impl_client *client, uint32_t global_id, uint32_t permissions)
check if a client has permissions for global_id, Since 0.3.9
Definition: impl-client.c:726
int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:435
struct result_device_params_data data
Definition: impl-device.c:76
A list of hooks.
Definition: hook.h:284
uint32_t subject
Definition: impl-metadata.c:50
char * value
Definition: impl-metadata.c:53
struct pw_impl_metadata * impl
Definition: impl-metadata.c:253
struct pw_control this
Definition: control.c:34
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
void * pw_resource_get_user_data(struct pw_resource *resource)
Get the user data for the resource, the size was given in pw_resource_new.
Definition: resource.c:159
#define pw_log_info(...)
Definition: src/pipewire/log.h:88
struct pw_resource * resource
Definition: impl-core.c:75
void spa_hook_list_init(struct spa_hook_list *list)
Initialize a hook list to the empty list.
Definition: hook.h:305
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
Resource events.
Definition: resource.h:60
char * type
Definition: impl-metadata.c:52
uint32_t version
Definition: resource.h:62
struct pw_impl_metadata * metadata
Definition: settings.c:44
Definition: properties.h:49
void spa_hook_list_clean(struct spa_hook_list *list)
Remove all hooks from the list.
Definition: hook.h:344
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
#define pw_log_error(...)
Definition: src/pipewire/log.h:86
#define spa_list_append(list, item)
Definition: list.h:81