PipeWire
0.3.15
|
Go to the source code of this file.
Data Structures | |
struct | pw_proxy_events |
Proxy events, use pw_proxy_add_listener. More... | |
Macros | |
#define | PW_VERSION_PROXY_EVENTS 0 |
#define | pw_proxy_notify(p, type, event, version, ...) |
#define | pw_proxy_call(p, type, method, version, ...) |
#define | pw_proxy_call_res(p, type, method, version, ...) |
Functions | |
struct pw_proxy * | pw_proxy_new (struct pw_proxy *factory, const char *type, uint32_t version, size_t user_data_size) |
Make a new proxy object. More... | |
void | pw_proxy_add_listener (struct pw_proxy *proxy, struct spa_hook *listener, const struct pw_proxy_events *events, void *data) |
Add an event listener to proxy. More... | |
void | pw_proxy_add_object_listener (struct pw_proxy *proxy, struct spa_hook *listener, const void *funcs, void *data) |
Add a listener for the events received from the remote object. More... | |
void | pw_proxy_destroy (struct pw_proxy *proxy) |
destroy a proxy More... | |
void * | pw_proxy_get_user_data (struct pw_proxy *proxy) |
Get the user_data. More... | |
uint32_t | pw_proxy_get_id (struct pw_proxy *proxy) |
Get the local id of the proxy. More... | |
const char * | pw_proxy_get_type (struct pw_proxy *proxy, uint32_t *version) |
Get the type and version of the proxy. More... | |
struct pw_protocol * | pw_proxy_get_protocol (struct pw_proxy *proxy) |
Get the protocol used for the proxy. More... | |
int | pw_proxy_sync (struct pw_proxy *proxy, int seq) |
Generate an sync method for a proxy. More... | |
int | pw_proxy_set_bound_id (struct pw_proxy *proxy, uint32_t global_id) |
Set the global id this proxy is bound to. More... | |
uint32_t | pw_proxy_get_bound_id (struct pw_proxy *proxy) |
Get the global id bound to this proxy of SPA_ID_INVALID when not bound to a global. More... | |
int | pw_proxy_error (struct pw_proxy *proxy, int res, const char *error) |
Generate an error for a proxy. More... | |
int | pw_proxy_errorf (struct pw_proxy *proxy, int res, const char *error,...) SPA_PRINTF_FUNC(3 |
int struct spa_hook_list * | pw_proxy_get_object_listeners (struct pw_proxy *proxy) |
Get the listener of proxy. More... | |
const struct pw_protocol_marshal * | pw_proxy_get_marshal (struct pw_proxy *proxy) |
Get the marshal functions for the proxy. More... | |
int | pw_proxy_install_marshal (struct pw_proxy *proxy, bool implementor) |
Install a marshal function on a proxy. More... | |
#define pw_proxy_call | ( | p, | |
type, | |||
method, | |||
version, | |||
... | |||
) |
#define pw_proxy_call_res | ( | p, | |
type, | |||
method, | |||
version, | |||
... | |||
) |
#define pw_proxy_notify | ( | p, | |
type, | |||
event, | |||
version, | |||
... | |||
) |
#define PW_VERSION_PROXY_EVENTS 0 |
void pw_proxy_add_listener | ( | struct pw_proxy * | proxy, |
struct spa_hook * | listener, | ||
const struct pw_proxy_events * | events, | ||
void * | data | ||
) |
Add an event listener to proxy.
void pw_proxy_add_object_listener | ( | struct pw_proxy * | proxy, |
struct spa_hook * | listener, | ||
const void * | funcs, | ||
void * | data | ||
) |
Add a listener for the events received from the remote object.
The events depend on the type of the remote object type.
proxy | the proxy |
listener | listener |
funcs | proxied functions |
data | data passed to events |
void pw_proxy_destroy | ( | struct pw_proxy * | proxy | ) |
destroy a proxy
int pw_proxy_error | ( | struct pw_proxy * | proxy, |
int | res, | ||
const char * | error | ||
) |
Generate an error for a proxy.
References pw_core_error(), r, and res.
Referenced by pw_filter_set_error(), and pw_stream_set_error().
int pw_proxy_errorf | ( | struct pw_proxy * | proxy, |
int | res, | ||
const char * | error, | ||
... | |||
) |
uint32_t pw_proxy_get_bound_id | ( | struct pw_proxy * | proxy | ) |
Get the global id bound to this proxy of SPA_ID_INVALID when not bound to a global.
uint32_t pw_proxy_get_id | ( | struct pw_proxy * | proxy | ) |
Get the local id of the proxy.
const struct pw_protocol_marshal* pw_proxy_get_marshal | ( | struct pw_proxy * | proxy | ) |
Get the marshal functions for the proxy.
int struct spa_hook_list* pw_proxy_get_object_listeners | ( | struct pw_proxy * | proxy | ) |
Get the listener of proxy.
struct pw_protocol* pw_proxy_get_protocol | ( | struct pw_proxy * | proxy | ) |
Get the protocol used for the proxy.
const char* pw_proxy_get_type | ( | struct pw_proxy * | proxy, |
uint32_t * | version | ||
) |
Get the type and version of the proxy.
References pw_protocol_marshal::version.
void* pw_proxy_get_user_data | ( | struct pw_proxy * | proxy | ) |
Get the user_data.
The size was given in pw_proxy_new
int pw_proxy_install_marshal | ( | struct pw_proxy * | proxy, |
bool | implementor | ||
) |
Install a marshal function on a proxy.
References pw_protocol_get_marshal(), PW_PROTOCOL_MARSHAL_FLAG_IMPL, pw_protocol_marshal::type, and pw_protocol_marshal::version.
Referenced by pw_proxy_init().
struct pw_proxy* pw_proxy_new | ( | struct pw_proxy * | factory, |
const char * | type, | ||
uint32_t | version, | ||
size_t | user_data_size | ||
) |
Make a new proxy object.
The id can be used to bind to a remote object and can be retrieved with pw_proxy_get_id .
factory | factory |
type | interface type |
version | interface version |
user_data_size | size of user data |
int pw_proxy_set_bound_id | ( | struct pw_proxy * | proxy, |
uint32_t | global_id | ||
) |
Set the global id this proxy is bound to.
This is usually used internally and will also emit the bound event
References NAME, and pw_log::pw_log_debug.
int pw_proxy_sync | ( | struct pw_proxy * | proxy, |
int | seq | ||
) |
Generate an sync method for a proxy.
This will generate a done event with the same seq number of the reply.
References NAME, pw_core_sync, pw_log::pw_log_debug, res, and seq.