mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
interfaces: make events return void
Events are dispatched with hooks and have no return value. Make it possible to get the last resource and proxy sender value for where we need it.
This commit is contained in:
parent
0390969228
commit
09c4683ef1
29 changed files with 269 additions and 330 deletions
|
|
@ -126,10 +126,10 @@ struct spa_node_events {
|
|||
uint32_t version; /**< version of this structure */
|
||||
|
||||
/** Emited when info changes */
|
||||
int (*info) (void *data, const struct spa_node_info *info);
|
||||
void (*info) (void *data, const struct spa_node_info *info);
|
||||
|
||||
/** Emited when port info changes, NULL when port is removed */
|
||||
int (*port_info) (void *data,
|
||||
void (*port_info) (void *data,
|
||||
enum spa_direction direction, uint32_t port,
|
||||
const struct spa_port_info *info);
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ struct spa_node_events {
|
|||
* the method call. Users should match the seq number from
|
||||
* request to the reply.
|
||||
*/
|
||||
int (*result) (void *data, int seq, int res, const void *result);
|
||||
void (*result) (void *data, int seq, int res, const void *result);
|
||||
|
||||
/**
|
||||
* \param node a spa_node
|
||||
|
|
@ -158,7 +158,7 @@ struct spa_node_events {
|
|||
* This will be called when an out-of-bound event is notified
|
||||
* on \a node.
|
||||
*/
|
||||
int (*event) (void *data, struct spa_event *event);
|
||||
void (*event) (void *data, struct spa_event *event);
|
||||
};
|
||||
|
||||
#define spa_node_emit(hooks,method,version,...) \
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ struct spa_result_node_params_data {
|
|||
struct spa_result_node_params data;
|
||||
};
|
||||
|
||||
static inline int spa_result_func_node_params(void *data,
|
||||
static inline void spa_result_func_node_params(void *data,
|
||||
int seq, int res, const void *result)
|
||||
{
|
||||
struct spa_result_node_params_data *d =
|
||||
|
|
@ -47,7 +47,6 @@ static inline int spa_result_func_node_params(void *data,
|
|||
spa_pod_builder_raw_padded(d->builder, r->param, SPA_POD_SIZE(r->param));
|
||||
d->data.next = r->next;
|
||||
d->data.param = SPA_MEMBER(d->builder->data, offset, struct spa_pod);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int spa_node_enum_params_sync(struct spa_node *node,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue