20 #ifndef __PIPEWIRE_CORE_H__ 21 #define __PIPEWIRE_CORE_H__ 28 #include <spa/format.h> 76 #define PW_PERM_R 0400 77 #define PW_PERM_W 0200 78 #define PW_PERM_X 0100 80 #define PW_PERM_RWX (PW_PERM_R|PW_PERM_W|PW_PERM_X) 87 #define PW_PERM_IS_R(p) (((p)&PW_PERM_R) == PW_PERM_R) 88 #define PW_PERM_IS_W(p) (((p)&PW_PERM_W) == PW_PERM_W) 89 #define PW_PERM_IS_X(p) (((p)&PW_PERM_X) == PW_PERM_X) 93 #define PW_VERSION_CORE_EVENTS 0 99 void (*
free) (
void *data);
109 #define PW_CORE_PROP_NAME "pipewire.core.name" 111 #define PW_CORE_PROP_VERSION "pipewire.core.version" 113 #define PW_CORE_PROP_DAEMON "pipewire.daemon" 123 struct spa_hook *listener,
156 bool (*callback) (
void *data,
struct pw_global *global),
168 uint32_t n_format_filters,
169 struct spa_format **format_filters,
178 uint32_t n_format_filters,
179 struct spa_format **format_filters,
const struct pw_properties * pw_core_get_properties(struct pw_core *core)
Get the core properties.
Definition: core.c:553
A collection of key/value pairs.
Definition: properties.h:38
core events emited by the core object added with pw_core_add_listener
Definition: core.h:93
struct pw_port * pw_core_find_port(struct pw_core *core, struct pw_port *other_port, uint32_t id, struct pw_properties *props, uint32_t n_format_filters, struct spa_format **format_filters, char **error)
Find a ports compatible with other_port and the format filters.
PipeWire loop object provides an implementation of the spa loop interfaces.
Definition: loop.h:37
const struct pw_core_info * pw_core_get_info(struct pw_core *core)
Get the core info object.
Definition: core.c:511
struct spa_dict dict
Definition: properties.h:39
void(* destroy)(void *data)
The core is being destroyed.
Definition: core.h:98
void pw_core_set_permission_callback(struct pw_core *core, pw_permission_func_t callback, void *data)
Set a callback that will be called to check the permissions of a global object for a client...
Definition: core.c:529
const struct spa_support * pw_core_get_support(struct pw_core *core, uint32_t *n_support)
Get the core support objects.
Definition: core.c:542
uint32_t version
Definition: core.h:95
struct pw_global * pw_core_find_global(struct pw_core *core, uint32_t id)
Find a core global by id.
Definition: core.c:598
The core information.
Definition: introspect.h:76
bool pw_core_for_each_global(struct pw_core *core, bool(*callback)(void *data, struct pw_global *global), void *data)
iterate the globals
Definition: core.c:586
uint32_t core
Definition: type.h:51
void(* global_removed)(void *data, struct pw_global *global)
a global object was removed
Definition: core.h:106
void(* free)(void *data)
The core is being freed.
Definition: core.h:100
PipeWire factory interface.
struct pw_global * pw_core_get_global(struct pw_core *core)
Get the core global object.
Definition: core.c:516
struct pw_core * pw_core_new(struct pw_loop *main_loop, struct pw_properties *props)
Make a new core object for a given main_loop.
PipeWire type support struct.
Definition: type.h:48
void(* info_changed)(void *data, struct pw_core_info *info)
The core info changed, use pw_core_get_info() to get the updated info.
Definition: core.h:102
struct spa_format * pw_core_find_format(struct pw_core *core, struct pw_port *output, struct pw_port *input, struct pw_properties *props, uint32_t n_format_filters, struct spa_format **format_filters, char **error)
Find a good format between 2 ports.
void pw_core_destroy(struct pw_core *core)
destroy a core object, all resources except the main_loop will be destroyed
void pw_core_update_properties(struct pw_core *core, const struct spa_dict *dict)
Update the core properties.
PipeWire client object class.
struct pw_type * pw_core_get_type(struct pw_core *core)
Get the type object of a core.
Definition: core.c:537
A global object visible to remote clients.
struct pw_loop * pw_core_get_main_loop(struct pw_core *core)
get the core main loop
Definition: core.c:548
struct pw_factory * pw_core_find_factory(struct pw_core *core, const char *name)
Find a factory by name.
void pw_core_add_listener(struct pw_core *core, struct spa_hook *listener, const struct pw_core_events *events, void *data)
Add a new event listener to a core.
Definition: core.c:521
uint32_t(* pw_permission_func_t)(struct pw_global *global, struct pw_client *client, void *data)
the permission function.
Definition: core.h:85
void(* global_added)(void *data, struct pw_global *global)
a new global object was added
Definition: core.h:104