diff --git a/doc/tutorial3.dox b/doc/tutorial3.dox index 17dcc18c9..c49bcf4c4 100644 --- a/doc/tutorial3.dox +++ b/doc/tutorial3.dox @@ -28,7 +28,7 @@ tutorial. This is the event handler: \code{.c} int pending, done = 0; - void core_event_done(void *object, uint32_t id, int seq) { + void core_event_done(void *data, uint32_t id, int seq) { if (id == PW_ID_CORE && seq == pending) { done = 1; pw_main_loop_quit(loop); diff --git a/pipewire-alsa/alsa-plugins/ctl_pipewire.c b/pipewire-alsa/alsa-plugins/ctl_pipewire.c index 801b71f1e..fd5dcc05a 100644 --- a/pipewire-alsa/alsa-plugins/ctl_pipewire.c +++ b/pipewire-alsa/alsa-plugins/ctl_pipewire.c @@ -784,9 +784,9 @@ static const snd_ctl_ext_callback_t pipewire_ext_callback = { }; /** device */ -static void device_event_info(void *object, const struct pw_device_info *info) +static void device_event_info(void *data, const struct pw_device_info *info) { - struct global *g = object; + struct global *g = data; snd_ctl_pipewire_t *ctl = g->ctl; uint32_t n; @@ -864,11 +864,11 @@ static struct global *find_node_for_route(snd_ctl_pipewire_t *ctl, uint32_t card return NULL; } -static void device_event_param(void *object, int seq, +static void device_event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct global *g = object; + struct global *g = data; snd_ctl_pipewire_t *ctl = g->ctl; pw_log_debug("param %d", id); @@ -922,9 +922,9 @@ static const struct global_info device_info = { }; /** node */ -static void node_event_info(void *object, const struct pw_node_info *info) +static void node_event_info(void *data, const struct pw_node_info *info) { - struct global *g = object; + struct global *g = data; snd_ctl_pipewire_t *ctl = g->ctl; const char *str; uint32_t i; @@ -970,11 +970,11 @@ static void node_event_info(void *object, const struct pw_node_info *info) } -static void node_event_param(void *object, int seq, +static void node_event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct global *g = object; + struct global *g = data; pw_log_debug("update param %d %d", g->id, id); switch (id) { @@ -1023,13 +1023,13 @@ static int json_object_find(const char *obj, const char *key, char *value, size_ return -ENOENT; } -static int metadata_property(void *object, +static int metadata_property(void *data, uint32_t subject, const char *key, const char *type, const char *value) { - struct global *g = object; + struct global *g = data; snd_ctl_pipewire_t *ctl = g->ctl; if (subject == PW_ID_CORE) { diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c index 0846a2f22..bfe53dd5d 100644 --- a/pipewire-jack/src/pipewire-jack.c +++ b/pipewire-jack/src/pipewire-jack.c @@ -1515,11 +1515,11 @@ static void clean_transport(struct client *c) c->has_transport = false; } -static int client_node_transport(void *object, +static int client_node_transport(void *data, int readfd, int writefd, uint32_t mem_id, uint32_t offset, uint32_t size) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; clean_transport(c); @@ -1547,11 +1547,11 @@ static int client_node_transport(void *object, return 0; } -static int client_node_set_param(void *object, +static int client_node_set_param(void *data, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; pw_proxy_error((struct pw_proxy*)c->node, -ENOTSUP, "not supported"); return -ENOTSUP; } @@ -1639,13 +1639,13 @@ static int update_driver_activation(struct client *c) return 0; } -static int client_node_set_io(void *object, +static int client_node_set_io(void *data, uint32_t id, uint32_t mem_id, uint32_t offset, uint32_t size) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; struct pw_memmap *old, *mm; void *ptr; uint32_t tag[5] = { c->node_id, id, }; @@ -1680,14 +1680,14 @@ static int client_node_set_io(void *object, return 0; } -static int client_node_event(void *object, const struct spa_event *event) +static int client_node_event(void *data, const struct spa_event *event) { return -ENOTSUP; } -static int client_node_command(void *object, const struct spa_command *command) +static int client_node_command(void *data, const struct spa_command *command) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; pw_log_debug("%p: got command %d", c, SPA_COMMAND_TYPE(command)); @@ -1720,20 +1720,20 @@ static int client_node_command(void *object, const struct spa_command *command) return 0; } -static int client_node_add_port(void *object, +static int client_node_add_port(void *data, enum spa_direction direction, uint32_t port_id, const struct spa_dict *props) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; pw_proxy_error((struct pw_proxy*)c->node, -ENOTSUP, "add port not supported"); return -ENOTSUP; } -static int client_node_remove_port(void *object, +static int client_node_remove_port(void *data, enum spa_direction direction, uint32_t port_id) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; pw_proxy_error((struct pw_proxy*)c->node, -ENOTSUP, "remove port not supported"); return -ENOTSUP; } @@ -2071,13 +2071,13 @@ static int port_set_latency(struct client *c, struct port *p, } /* called from thread-loop */ -static int client_node_port_set_param(void *object, +static int client_node_port_set_param(void *data, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; struct port *p = GET_PORT(c, direction, port_id); if (p == NULL || !p->valid) @@ -2121,7 +2121,7 @@ static inline void *init_buffer(struct port *p) return data; } -static int client_node_port_use_buffers(void *object, +static int client_node_port_use_buffers(void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, @@ -2129,7 +2129,7 @@ static int client_node_port_use_buffers(void *object, uint32_t n_buffers, struct pw_client_node_buffer *buffers) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; struct port *p = GET_PORT(c, direction, port_id); struct buffer *b; uint32_t i, j, fl; @@ -2268,7 +2268,7 @@ static int client_node_port_use_buffers(void *object, return res; } -static int client_node_port_set_io(void *object, +static int client_node_port_set_io(void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, @@ -2277,7 +2277,7 @@ static int client_node_port_set_io(void *object, uint32_t offset, uint32_t size) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; struct port *p = GET_PORT(c, direction, port_id); struct pw_memmap *mm, *old; struct mix *mix; @@ -2340,14 +2340,14 @@ do_activate_link(struct spa_loop *loop, return 0; } -static int client_node_set_activation(void *object, +static int client_node_set_activation(void *data, uint32_t node_id, int signalfd, uint32_t mem_id, uint32_t offset, uint32_t size) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; struct pw_memmap *mm; struct link *link; void *ptr; @@ -2412,14 +2412,14 @@ static int client_node_set_activation(void *object, return res; } -static int client_node_port_set_mix_info(void *object, +static int client_node_port_set_mix_info(void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t peer_id, const struct spa_dict *props) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; struct port *p = GET_PORT(c, direction, port_id); struct mix *mix; struct object *l; @@ -2617,10 +2617,10 @@ static int json_object_find(const char *obj, const char *key, char *value, size_ return -ENOENT; } -static int metadata_property(void *object, uint32_t id, +static int metadata_property(void *data, uint32_t id, const char *key, const char *type, const char *value) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; struct object *o; jack_uuid_t uuid; @@ -2712,11 +2712,11 @@ static const struct pw_proxy_events proxy_events = { .destroy = proxy_destroy, }; -static void port_param(void *object, int seq, +static void port_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct object *o = object; + struct object *o = data; switch (id) { case SPA_PARAM_Latency: @@ -3073,9 +3073,9 @@ static void registry_event_global(void *data, uint32_t id, return; } -static void registry_event_global_remove(void *object, uint32_t id) +static void registry_event_global_remove(void *data, uint32_t id) { - struct client *c = (struct client *) object; + struct client *c = (struct client *) data; struct object *o; bool graph_changed = false; diff --git a/spa/include/spa/support/thread.h b/spa/include/spa/support/thread.h index 1bff45080..adc149bfa 100644 --- a/spa/include/spa/support/thread.h +++ b/spa/include/spa/support/thread.h @@ -61,19 +61,19 @@ struct spa_thread_utils_methods { uint32_t version; /** create a new thread that runs \a start with \a arg */ - struct spa_thread * (*create) (void *data, const struct spa_dict *props, + struct spa_thread * (*create) (void *object, const struct spa_dict *props, void *(*start)(void*), void *arg); /** stop and join a thread */ - int (*join)(void *data, struct spa_thread *thread, void **retval); + int (*join)(void *object, struct spa_thread *thread, void **retval); /** get realtime priority range for threads created with \a props */ - int (*get_rt_range) (void *data, const struct spa_dict *props, int *min, int *max); + int (*get_rt_range) (void *object, const struct spa_dict *props, int *min, int *max); /** acquire realtime priority, a priority of -1 refers to the priority * configured in the realtime module */ - int (*acquire_rt) (void *data, struct spa_thread *thread, int priority); + int (*acquire_rt) (void *object, struct spa_thread *thread, int priority); /** drop realtime priority */ - int (*drop_rt) (void *data, struct spa_thread *thread); + int (*drop_rt) (void *object, struct spa_thread *thread); }; /** \copydoc spa_thread_utils_methods.create diff --git a/src/examples/export-spa.c b/src/examples/export-spa.c index ba2f29990..864555d1f 100644 --- a/src/examples/export-spa.c +++ b/src/examples/export-spa.c @@ -56,9 +56,9 @@ struct data { uint32_t id; }; -static void proxy_event_bound(void *object, uint32_t global_id) +static void proxy_event_bound(void *_data, uint32_t global_id) { - struct data *data = object; + struct data *data = _data; if (data->id != global_id) { printf("node id: %u\n", global_id); data->id = global_id; diff --git a/src/gst/gstpipewirecore.c b/src/gst/gstpipewirecore.c index acfe17c47..6910f4e36 100644 --- a/src/gst/gstpipewirecore.c +++ b/src/gst/gstpipewirecore.c @@ -48,9 +48,9 @@ on_core_error(void *data, uint32_t id, int seq, int res, const char *message) pw_thread_loop_signal(core->loop, FALSE); } -static void on_core_done (void *object, uint32_t id, int seq) +static void on_core_done (void *data, uint32_t id, int seq) { - GstPipeWireCore * core = object; + GstPipeWireCore * core = data; if (id == PW_ID_CORE) { core->last_seq = seq; pw_thread_loop_signal (core->loop, FALSE); diff --git a/src/modules/module-client-device/protocol-native.c b/src/modules/module-client-device/protocol-native.c index e8e9a28f4..2734aacee 100644 --- a/src/modules/module-client-device/protocol-native.c +++ b/src/modules/module-client-device/protocol-native.c @@ -218,10 +218,10 @@ static int device_demarshal_set_param(void *object, const struct pw_protocol_nat return 0; } -static void device_marshal_info(void *object, +static void device_marshal_info(void *data, const struct spa_device_info *info) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; struct spa_pod_frame f[2]; uint32_t i, n_items; @@ -262,10 +262,10 @@ static void device_marshal_info(void *object, pw_protocol_native_end_proxy(proxy, b); } -static int device_demarshal_info(void *object, +static int device_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; struct spa_pod *ipod; struct spa_device_info info = SPA_DEVICE_INFO_INIT(), *infop; @@ -306,10 +306,10 @@ static int device_demarshal_info(void *object, return 0; } -static void device_marshal_result(void *object, +static void device_marshal_result(void *data, int seq, int res, uint32_t type, const void *result) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; struct spa_pod_frame f[2]; @@ -342,10 +342,10 @@ static void device_marshal_result(void *object, pw_protocol_native_end_proxy(proxy, b); } -static int device_demarshal_result(void *object, +static int device_demarshal_result(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; struct spa_pod_frame f[1]; int seq, res; @@ -384,9 +384,9 @@ static int device_demarshal_result(void *object, return 0; } -static void device_marshal_event(void *object, const struct spa_event *event) +static void device_marshal_event(void *data, const struct spa_event *event) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, SPA_DEVICE_EVENT_EVENT, NULL); @@ -397,10 +397,10 @@ static void device_marshal_event(void *object, const struct spa_event *event) pw_protocol_native_end_proxy(proxy, b); } -static int device_demarshal_event(void *object, +static int device_demarshal_event(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; struct spa_event *event; @@ -413,10 +413,10 @@ static int device_demarshal_event(void *object, return 0; } -static void device_marshal_object_info(void *object, uint32_t id, +static void device_marshal_object_info(void *data, uint32_t id, const struct spa_device_object_info *info) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; struct spa_pod_frame f[2]; uint32_t i, n_items; @@ -452,10 +452,10 @@ static void device_marshal_object_info(void *object, uint32_t id, pw_protocol_native_end_proxy(proxy, b); } -static int device_demarshal_object_info(void *object, +static int device_demarshal_object_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; struct spa_device_object_info info = SPA_DEVICE_OBJECT_INFO_INIT(), *infop; struct spa_pod *ipod; diff --git a/src/modules/module-client-node/protocol-native.c b/src/modules/module-client-node/protocol-native.c index cfbe559a5..0b640b251 100644 --- a/src/modules/module-client-node/protocol-native.c +++ b/src/modules/module-client-node/protocol-native.c @@ -374,9 +374,9 @@ client_node_marshal_port_buffers(void *object, return pw_protocol_native_end_proxy(proxy, b); } -static int client_node_demarshal_transport(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_transport(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t mem_id, offset, sz; int64_t ridx, widx; @@ -403,9 +403,9 @@ static int client_node_demarshal_transport(void *object, const struct pw_protoco return 0; } -static int client_node_demarshal_set_param(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_set_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, flags; const struct spa_pod *param = NULL; @@ -421,9 +421,9 @@ static int client_node_demarshal_set_param(void *object, const struct pw_protoco return 0; } -static int client_node_demarshal_event_event(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_event_event(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; const struct spa_event *event; @@ -436,9 +436,9 @@ static int client_node_demarshal_event_event(void *object, const struct pw_proto return 0; } -static int client_node_demarshal_command(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_command(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; const struct spa_command *command; @@ -451,9 +451,9 @@ static int client_node_demarshal_command(void *object, const struct pw_protocol_ return 0; } -static int client_node_demarshal_add_port(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_add_port(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; int32_t direction, port_id; @@ -475,9 +475,9 @@ static int client_node_demarshal_add_port(void *object, const struct pw_protocol return 0; } -static int client_node_demarshal_remove_port(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_remove_port(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; int32_t direction, port_id; @@ -491,9 +491,9 @@ static int client_node_demarshal_remove_port(void *object, const struct pw_proto return 0; } -static int client_node_demarshal_port_set_param(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_port_set_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t direction, port_id, id, flags; const struct spa_pod *param = NULL; @@ -512,9 +512,9 @@ static int client_node_demarshal_port_set_param(void *object, const struct pw_pr return 0; } -static int client_node_demarshal_port_use_buffers(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_port_use_buffers(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f; uint32_t direction, port_id, mix_id, flags, n_buffers, data_id; @@ -588,9 +588,9 @@ static int client_node_demarshal_port_use_buffers(void *object, const struct pw_ return 0; } -static int client_node_demarshal_port_set_io(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_port_set_io(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t direction, port_id, mix_id, id, memid, off, sz; @@ -612,9 +612,9 @@ static int client_node_demarshal_port_set_io(void *object, const struct pw_proto return 0; } -static int client_node_demarshal_set_activation(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_set_activation(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t node_id, memid, off, sz; int64_t sigidx; @@ -639,9 +639,9 @@ static int client_node_demarshal_set_activation(void *object, const struct pw_pr return 0; } -static int client_node_demarshal_port_set_mix_info(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_port_set_mix_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t direction, port_id, mix_id, peer_id; struct spa_pod_frame f[2]; @@ -664,9 +664,9 @@ static int client_node_demarshal_port_set_mix_info(void *object, const struct pw return 0; } -static int client_node_demarshal_set_io(void *object, const struct pw_protocol_native_message *msg) +static int client_node_demarshal_set_io(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, memid, off, sz; @@ -683,11 +683,11 @@ static int client_node_demarshal_set_io(void *object, const struct pw_protocol_n return 0; } -static int client_node_marshal_transport(void *object, int readfd, int writefd, +static int client_node_marshal_transport(void *data, int readfd, int writefd, uint32_t mem_id, uint32_t offset, uint32_t size) { struct pw_protocol_native_message *msg; - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_TRANSPORT, &msg); @@ -703,10 +703,10 @@ static int client_node_marshal_transport(void *object, int readfd, int writefd, } static int -client_node_marshal_set_param(void *object, uint32_t id, uint32_t flags, +client_node_marshal_set_param(void *data, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_SET_PARAM, NULL); @@ -719,9 +719,9 @@ client_node_marshal_set_param(void *object, uint32_t id, uint32_t flags, return pw_protocol_native_end_resource(resource, b); } -static int client_node_marshal_event_event(void *object, const struct spa_event *event) +static int client_node_marshal_event_event(void *data, const struct spa_event *event) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_EVENT, NULL); @@ -733,9 +733,9 @@ static int client_node_marshal_event_event(void *object, const struct spa_event } static int -client_node_marshal_command(void *object, const struct spa_command *command) +client_node_marshal_command(void *data, const struct spa_command *command) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_COMMAND, NULL); @@ -747,11 +747,11 @@ client_node_marshal_command(void *object, const struct spa_command *command) } static int -client_node_marshal_add_port(void *object, +client_node_marshal_add_port(void *data, enum spa_direction direction, uint32_t port_id, const struct spa_dict *props) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -768,10 +768,10 @@ client_node_marshal_add_port(void *object, } static int -client_node_marshal_remove_port(void *object, +client_node_marshal_remove_port(void *data, enum spa_direction direction, uint32_t port_id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_REMOVE_PORT, NULL); @@ -784,14 +784,14 @@ client_node_marshal_remove_port(void *object, } static int -client_node_marshal_port_set_param(void *object, +client_node_marshal_port_set_param(void *data, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_PORT_SET_PARAM, NULL); @@ -807,14 +807,14 @@ client_node_marshal_port_set_param(void *object, } static int -client_node_marshal_port_use_buffers(void *object, +client_node_marshal_port_use_buffers(void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t flags, uint32_t n_buffers, struct pw_client_node_buffer *buffers) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; uint32_t i, j; @@ -862,7 +862,7 @@ client_node_marshal_port_use_buffers(void *object, } static int -client_node_marshal_port_set_io(void *object, +client_node_marshal_port_set_io(void *data, uint32_t direction, uint32_t port_id, uint32_t mix_id, @@ -871,7 +871,7 @@ client_node_marshal_port_set_io(void *object, uint32_t offset, uint32_t size) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_PORT_SET_IO, NULL); @@ -889,7 +889,7 @@ client_node_marshal_port_set_io(void *object, } static int -client_node_marshal_set_activation(void *object, +client_node_marshal_set_activation(void *data, uint32_t node_id, int signalfd, uint32_t memid, @@ -897,7 +897,7 @@ client_node_marshal_set_activation(void *object, uint32_t size) { struct pw_protocol_native_message *msg; - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_SET_ACTIVATION, &msg); @@ -913,13 +913,13 @@ client_node_marshal_set_activation(void *object, } static int -client_node_marshal_set_io(void *object, +client_node_marshal_set_io(void *data, uint32_t id, uint32_t memid, uint32_t offset, uint32_t size) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE_EVENT_SET_IO, NULL); @@ -932,14 +932,14 @@ client_node_marshal_set_io(void *object, } static int -client_node_marshal_port_set_mix_info(void *object, +client_node_marshal_port_set_mix_info(void *data, uint32_t direction, uint32_t port_id, uint32_t mix_id, uint32_t peer_id, const struct spa_dict *props) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; diff --git a/src/modules/module-client-node/remote-node.c b/src/modules/module-client-node/remote-node.c index 342749131..fcce40de8 100644 --- a/src/modules/module-client-node/remote-node.c +++ b/src/modules/module-client-node/remote-node.c @@ -259,10 +259,10 @@ static struct mix *ensure_mix(struct node_data *data, } -static int client_node_transport(void *object, +static int client_node_transport(void *_data, int readfd, int writefd, uint32_t mem_id, uint32_t offset, uint32_t size) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; clean_transport(data); @@ -416,10 +416,10 @@ static int add_port_update(struct node_data *data, struct pw_impl_port *port, ui } static int -client_node_set_param(void *object, uint32_t id, uint32_t flags, +client_node_set_param(void *_data, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; int res; @@ -440,13 +440,13 @@ client_node_set_param(void *object, uint32_t id, uint32_t flags, } static int -client_node_set_io(void *object, +client_node_set_io(void *_data, uint32_t id, uint32_t memid, uint32_t offset, uint32_t size) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; struct pw_memmap *old, *mm; void *ptr; @@ -483,15 +483,15 @@ exit: return res; } -static int client_node_event(void *object, const struct spa_event *event) +static int client_node_event(void *data, const struct spa_event *event) { pw_log_warn("unhandled node event %d", SPA_EVENT_TYPE(event)); return -ENOTSUP; } -static int client_node_command(void *object, const struct spa_command *command) +static int client_node_command(void *_data, const struct spa_command *command) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; int res; @@ -533,10 +533,10 @@ static int client_node_command(void *object, const struct spa_command *command) } static int -client_node_add_port(void *object, enum spa_direction direction, uint32_t port_id, +client_node_add_port(void *_data, enum spa_direction direction, uint32_t port_id, const struct spa_dict *props) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; pw_log_warn("add port not supported"); pw_proxy_error(proxy, -ENOTSUP, "add port not supported"); @@ -544,9 +544,9 @@ client_node_add_port(void *object, enum spa_direction direction, uint32_t port_i } static int -client_node_remove_port(void *object, enum spa_direction direction, uint32_t port_id) +client_node_remove_port(void *_data, enum spa_direction direction, uint32_t port_id) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; pw_log_warn("remove port not supported"); pw_proxy_error(proxy, -ENOTSUP, "remove port not supported"); @@ -579,12 +579,12 @@ static int clear_buffers(struct node_data *data, struct mix *mix) } static int -client_node_port_set_param(void *object, +client_node_port_set_param(void *_data, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; struct pw_impl_port *port; int res; @@ -620,12 +620,12 @@ error_exit: } static int -client_node_port_use_buffers(void *object, +client_node_port_use_buffers(void *_data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, uint32_t flags, uint32_t n_buffers, struct pw_client_node_buffer *buffers) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; struct buffer *bid; uint32_t i, j; @@ -769,7 +769,7 @@ error_exit: } static int -client_node_port_set_io(void *object, +client_node_port_set_io(void *_data, uint32_t direction, uint32_t port_id, uint32_t mix_id, @@ -778,7 +778,7 @@ client_node_port_set_io(void *object, uint32_t offset, uint32_t size) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; struct mix *mix; struct pw_memmap *mm, *old; @@ -869,14 +869,14 @@ do_activate_link(struct spa_loop *loop, } static int -client_node_set_activation(void *object, +client_node_set_activation(void *_data, uint32_t node_id, int signalfd, uint32_t memid, uint32_t offset, uint32_t size) { - struct node_data *data = object; + struct node_data *data = _data; struct pw_proxy *proxy = (struct pw_proxy*)data->client_node; struct pw_impl_node *node = data->node; struct pw_memmap *mm; diff --git a/src/modules/module-client-node/v0/ext-client-node.h b/src/modules/module-client-node/v0/ext-client-node.h index 18af98cff..564df77b6 100644 --- a/src/modules/module-client-node/v0/ext-client-node.h +++ b/src/modules/module-client-node/v0/ext-client-node.h @@ -259,7 +259,7 @@ struct pw_client_node0_events { * \param memfd the fd of the memory * \param flags flags for the \a memfd */ - void (*add_mem) (void *object, + void (*add_mem) (void *data, uint32_t mem_id, uint32_t type, int memfd, @@ -275,7 +275,7 @@ struct pw_client_node0_events { * \param writefd fd for signal data can be written * \param transport the shared transport area */ - void (*transport) (void *object, + void (*transport) (void *data, uint32_t node_id, int readfd, int writefd, @@ -291,20 +291,20 @@ struct pw_client_node0_events { * \param flags parameter flags * \param param the param to set */ - void (*set_param) (void *object, uint32_t seq, + void (*set_param) (void *data, uint32_t seq, uint32_t id, uint32_t flags, const struct spa_pod *param); /** * Receive an event from the client node * \param event the received event */ - void (*event) (void *object, const struct spa_event *event); + void (*event) (void *data, const struct spa_event *event); /** * Notify of a new node command * * \param seq a sequence number * \param command the command */ - void (*command) (void *object, uint32_t seq, const struct spa_command *command); + void (*command) (void *data, uint32_t seq, const struct spa_command *command); /** * A new port was added to the node * @@ -315,7 +315,7 @@ struct pw_client_node0_events { * \param direction the direction of the port * \param port_id the new port id */ - void (*add_port) (void *object, + void (*add_port) (void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id); @@ -326,7 +326,7 @@ struct pw_client_node0_events { * \param direction a port direction * \param port_id the remove port id */ - void (*remove_port) (void *object, + void (*remove_port) (void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id); @@ -340,7 +340,7 @@ struct pw_client_node0_events { * \param flags flags used when setting the param * \param param the new param */ - void (*port_set_param) (void *object, + void (*port_set_param) (void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id, @@ -355,7 +355,7 @@ struct pw_client_node0_events { * \param n_buffer the number of buffers * \param buffers and array of buffer descriptions */ - void (*port_use_buffers) (void *object, + void (*port_use_buffers) (void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id, @@ -368,7 +368,7 @@ struct pw_client_node0_events { * \param port_id the port id * \param command the command */ - void (*port_command) (void *object, + void (*port_command) (void *data, enum spa_direction direction, uint32_t port_id, const struct spa_command *command); @@ -384,7 +384,7 @@ struct pw_client_node0_events { * \param offset offset of io area in memory * \param size size of the io area */ - void (*port_set_io) (void *object, + void (*port_set_io) (void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id, diff --git a/src/modules/module-client-node/v0/protocol-native.c b/src/modules/module-client-node/v0/protocol-native.c index 0347c6a37..86d8fe94d 100644 --- a/src/modules/module-client-node/v0/protocol-native.c +++ b/src/modules/module-client-node/v0/protocol-native.c @@ -47,12 +47,12 @@ extern uint32_t pw_protocol_native0_type_to_v2(struct pw_impl_client *client, const struct spa_type_info *info, uint32_t type); static void -client_node_marshal_add_mem(void *object, +client_node_marshal_add_mem(void *data, uint32_t mem_id, uint32_t type, int memfd, uint32_t flags) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; const char *typename; @@ -80,10 +80,10 @@ client_node_marshal_add_mem(void *object, pw_protocol_native_end_resource(resource, b); } -static void client_node_marshal_transport(void *object, uint32_t node_id, int readfd, int writefd, +static void client_node_marshal_transport(void *data, uint32_t node_id, int readfd, int writefd, struct pw_client_node0_transport *transport) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct pw_client_node0_transport_info info; @@ -103,10 +103,10 @@ static void client_node_marshal_transport(void *object, uint32_t node_id, int re } static void -client_node_marshal_set_param(void *object, uint32_t seq, uint32_t id, uint32_t flags, +client_node_marshal_set_param(void *data, uint32_t seq, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_SET_PARAM, NULL); @@ -120,9 +120,9 @@ client_node_marshal_set_param(void *object, uint32_t seq, uint32_t id, uint32_t pw_protocol_native_end_resource(resource, b); } -static void client_node_marshal_event_event(void *object, const struct spa_event *event) +static void client_node_marshal_event_event(void *data, const struct spa_event *event) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_EVENT, NULL); @@ -133,9 +133,9 @@ static void client_node_marshal_event_event(void *object, const struct spa_event } static void -client_node_marshal_command(void *object, uint32_t seq, const struct spa_command *command) +client_node_marshal_command(void *data, uint32_t seq, const struct spa_command *command) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; struct spa_pod_frame f; @@ -154,10 +154,10 @@ client_node_marshal_command(void *object, uint32_t seq, const struct spa_command } static void -client_node_marshal_add_port(void *object, +client_node_marshal_add_port(void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_ADD_PORT, NULL); @@ -171,10 +171,10 @@ client_node_marshal_add_port(void *object, } static void -client_node_marshal_remove_port(void *object, +client_node_marshal_remove_port(void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_REMOVE_PORT, NULL); @@ -188,7 +188,7 @@ client_node_marshal_remove_port(void *object, } static void -client_node_marshal_port_set_param(void *object, +client_node_marshal_port_set_param(void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id, @@ -196,7 +196,7 @@ client_node_marshal_port_set_param(void *object, uint32_t flags, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; struct spa_pod_frame f; @@ -229,13 +229,13 @@ client_node_marshal_port_set_param(void *object, } static void -client_node_marshal_port_use_buffers(void *object, +client_node_marshal_port_use_buffers(void *data, uint32_t seq, enum spa_direction direction, uint32_t port_id, uint32_t n_buffers, struct pw_client_node0_buffer *buffers) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; struct spa_pod_frame f; @@ -283,12 +283,12 @@ client_node_marshal_port_use_buffers(void *object, } static void -client_node_marshal_port_command(void *object, +client_node_marshal_port_command(void *data, uint32_t direction, uint32_t port_id, const struct spa_command *command) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; struct spa_pod_frame f; @@ -306,7 +306,7 @@ client_node_marshal_port_command(void *object, } static void -client_node_marshal_port_set_io(void *object, +client_node_marshal_port_set_io(void *data, uint32_t seq, uint32_t direction, uint32_t port_id, @@ -315,7 +315,7 @@ client_node_marshal_port_set_io(void *object, uint32_t offset, uint32_t size) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CLIENT_NODE0_EVENT_PORT_SET_IO, NULL); diff --git a/src/modules/module-metadata/metadata.c b/src/modules/module-metadata/metadata.c index ebddd7072..d863bea8f 100644 --- a/src/modules/module-metadata/metadata.c +++ b/src/modules/module-metadata/metadata.c @@ -59,13 +59,13 @@ struct resource_data { #define pw_metadata_resource_property(r,...) \ pw_metadata_resource(r,property,0,__VA_ARGS__) -static int metadata_property(void *object, +static int metadata_property(void *data, uint32_t subject, const char *key, const char *type, const char *value) { - struct resource_data *d = object; + struct resource_data *d = data; struct pw_resource *resource = d->resource; struct pw_impl_client *client = pw_resource_get_client(resource); struct impl *impl = d->impl; @@ -166,10 +166,10 @@ static const struct pw_resource_events impl_resource_events = { }; static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct impl *impl = _data; + struct impl *impl = object; struct pw_resource *resource; struct resource_data *data; diff --git a/src/modules/module-profiler.c b/src/modules/module-profiler.c index c14b7dd5e..0678d35e8 100644 --- a/src/modules/module-profiler.c +++ b/src/modules/module-profiler.c @@ -312,10 +312,10 @@ do_start(struct spa_loop *loop, return 0; } static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct impl *impl = _data; + struct impl *impl = object; struct pw_global *global = impl->global; struct pw_resource *resource; struct resource_data *data; diff --git a/src/modules/module-protocol-native/protocol-native.c b/src/modules/module-protocol-native/protocol-native.c index 2213be410..b2a1dc56b 100644 --- a/src/modules/module-protocol-native/protocol-native.c +++ b/src/modules/module-protocol-native/protocol-native.c @@ -308,9 +308,9 @@ core_method_marshal_destroy(void *object, void *p) return pw_protocol_native_end_proxy(proxy, b); } -static int core_event_demarshal_info(void *object, const struct pw_protocol_native_message *msg) +static int core_event_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_dict props = SPA_DICT_INIT(NULL, 0); struct pw_core_info info = { .props = &props }; struct spa_pod_frame f[2]; @@ -335,9 +335,9 @@ static int core_event_demarshal_info(void *object, const struct pw_protocol_nati return pw_proxy_notify(proxy, struct pw_core_events, info, 0, &info); } -static int core_event_demarshal_done(void *object, const struct pw_protocol_native_message *msg) +static int core_event_demarshal_done(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, seq; @@ -353,9 +353,9 @@ static int core_event_demarshal_done(void *object, const struct pw_protocol_nati return pw_proxy_notify(proxy, struct pw_core_events, done, 0, id, seq); } -static int core_event_demarshal_ping(void *object, const struct pw_protocol_native_message *msg) +static int core_event_demarshal_ping(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, seq; @@ -368,9 +368,9 @@ static int core_event_demarshal_ping(void *object, const struct pw_protocol_nati return pw_proxy_notify(proxy, struct pw_core_events, ping, 0, id, seq); } -static int core_event_demarshal_error(void *object, const struct pw_protocol_native_message *msg) +static int core_event_demarshal_error(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, res; int seq; @@ -387,9 +387,9 @@ static int core_event_demarshal_error(void *object, const struct pw_protocol_nat return pw_proxy_notify(proxy, struct pw_core_events, error, 0, id, seq, res, error); } -static int core_event_demarshal_remove_id(void *object, const struct pw_protocol_native_message *msg) +static int core_event_demarshal_remove_id(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id; @@ -400,9 +400,9 @@ static int core_event_demarshal_remove_id(void *object, const struct pw_protocol return pw_proxy_notify(proxy, struct pw_core_events, remove_id, 0, id); } -static int core_event_demarshal_bound_id(void *object, const struct pw_protocol_native_message *msg) +static int core_event_demarshal_bound_id(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, global_id; @@ -415,9 +415,9 @@ static int core_event_demarshal_bound_id(void *object, const struct pw_protocol_ return pw_proxy_notify(proxy, struct pw_core_events, bound_id, 0, id, global_id); } -static int core_event_demarshal_add_mem(void *object, const struct pw_protocol_native_message *msg) +static int core_event_demarshal_add_mem(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, type, flags; int64_t idx; @@ -436,9 +436,9 @@ static int core_event_demarshal_add_mem(void *object, const struct pw_protocol_n return pw_proxy_notify(proxy, struct pw_core_events, add_mem, 0, id, type, fd, flags); } -static int core_event_demarshal_remove_mem(void *object, const struct pw_protocol_native_message *msg) +static int core_event_demarshal_remove_mem(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id; @@ -450,9 +450,9 @@ static int core_event_demarshal_remove_mem(void *object, const struct pw_protoco return pw_proxy_notify(proxy, struct pw_core_events, remove_mem, 0, id); } -static void core_event_marshal_info(void *object, const struct pw_core_info *info) +static void core_event_marshal_info(void *data, const struct pw_core_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -474,9 +474,9 @@ static void core_event_marshal_info(void *object, const struct pw_core_info *inf pw_protocol_native_end_resource(resource, b); } -static void core_event_marshal_done(void *object, uint32_t id, int seq) +static void core_event_marshal_done(void *data, uint32_t id, int seq) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_DONE, NULL); @@ -488,9 +488,9 @@ static void core_event_marshal_done(void *object, uint32_t id, int seq) pw_protocol_native_end_resource(resource, b); } -static void core_event_marshal_ping(void *object, uint32_t id, int seq) +static void core_event_marshal_ping(void *data, uint32_t id, int seq) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct pw_protocol_native_message *msg; @@ -503,9 +503,9 @@ static void core_event_marshal_ping(void *object, uint32_t id, int seq) pw_protocol_native_end_resource(resource, b); } -static void core_event_marshal_error(void *object, uint32_t id, int seq, int res, const char *error) +static void core_event_marshal_error(void *data, uint32_t id, int seq, int res, const char *error) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_ERROR, NULL); @@ -519,9 +519,9 @@ static void core_event_marshal_error(void *object, uint32_t id, int seq, int res pw_protocol_native_end_resource(resource, b); } -static void core_event_marshal_remove_id(void *object, uint32_t id) +static void core_event_marshal_remove_id(void *data, uint32_t id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_REMOVE_ID, NULL); @@ -532,9 +532,9 @@ static void core_event_marshal_remove_id(void *object, uint32_t id) pw_protocol_native_end_resource(resource, b); } -static void core_event_marshal_bound_id(void *object, uint32_t id, uint32_t global_id) +static void core_event_marshal_bound_id(void *data, uint32_t id, uint32_t global_id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_BOUND_ID, NULL); @@ -546,9 +546,9 @@ static void core_event_marshal_bound_id(void *object, uint32_t id, uint32_t glob pw_protocol_native_end_resource(resource, b); } -static void core_event_marshal_add_mem(void *object, uint32_t id, uint32_t type, int fd, uint32_t flags) +static void core_event_marshal_add_mem(void *data, uint32_t id, uint32_t type, int fd, uint32_t flags) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_ADD_MEM, NULL); @@ -562,9 +562,9 @@ static void core_event_marshal_add_mem(void *object, uint32_t id, uint32_t type, pw_protocol_native_end_resource(resource, b); } -static void core_event_marshal_remove_mem(void *object, uint32_t id) +static void core_event_marshal_remove_mem(void *data, uint32_t id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_EVENT_REMOVE_MEM, NULL); @@ -718,10 +718,10 @@ static int registry_method_marshal_add_listener(void *object, return 0; } -static void registry_marshal_global(void *object, uint32_t id, uint32_t permissions, +static void registry_marshal_global(void *data, uint32_t id, uint32_t permissions, const char *type, uint32_t version, const struct spa_dict *props) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -740,9 +740,9 @@ static void registry_marshal_global(void *object, uint32_t id, uint32_t permissi pw_protocol_native_end_resource(resource, b); } -static void registry_marshal_global_remove(void *object, uint32_t id) +static void registry_marshal_global_remove(void *data, uint32_t id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_REGISTRY_EVENT_GLOBAL_REMOVE, NULL); @@ -794,9 +794,9 @@ static int module_method_marshal_add_listener(void *object, return 0; } -static void module_marshal_info(void *object, const struct pw_module_info *info) +static void module_marshal_info(void *data, const struct pw_module_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -816,9 +816,9 @@ static void module_marshal_info(void *object, const struct pw_module_info *info) pw_protocol_native_end_resource(resource, b); } -static int module_demarshal_info(void *object, const struct pw_protocol_native_message *msg) +static int module_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -849,9 +849,9 @@ static int device_method_marshal_add_listener(void *object, return 0; } -static void device_marshal_info(void *object, const struct pw_device_info *info) +static void device_marshal_info(void *data, const struct pw_device_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -869,9 +869,9 @@ static void device_marshal_info(void *object, const struct pw_device_info *info) pw_protocol_native_end_resource(resource, b); } -static int device_demarshal_info(void *object, const struct pw_protocol_native_message *msg) +static int device_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -890,10 +890,10 @@ static int device_demarshal_info(void *object, const struct pw_protocol_native_m return pw_proxy_notify(proxy, struct pw_device_events, info, 0, &info); } -static void device_marshal_param(void *object, int seq, uint32_t id, uint32_t index, uint32_t next, +static void device_marshal_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_DEVICE_EVENT_PARAM, NULL); @@ -908,9 +908,9 @@ static void device_marshal_param(void *object, int seq, uint32_t id, uint32_t in pw_protocol_native_end_resource(resource, b); } -static int device_demarshal_param(void *object, const struct pw_protocol_native_message *msg) +static int device_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -1043,9 +1043,9 @@ static int factory_method_marshal_add_listener(void *object, return 0; } -static void factory_marshal_info(void *object, const struct pw_factory_info *info) +static void factory_marshal_info(void *data, const struct pw_factory_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -1065,9 +1065,9 @@ static void factory_marshal_info(void *object, const struct pw_factory_info *inf pw_protocol_native_end_resource(resource, b); } -static int factory_demarshal_info(void *object, const struct pw_protocol_native_message *msg) +static int factory_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1098,9 +1098,9 @@ static int node_method_marshal_add_listener(void *object, return 0; } -static void node_marshal_info(void *object, const struct pw_node_info *info) +static void node_marshal_info(void *data, const struct pw_node_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -1124,9 +1124,9 @@ static void node_marshal_info(void *object, const struct pw_node_info *info) pw_protocol_native_end_resource(resource, b); } -static int node_demarshal_info(void *object, const struct pw_protocol_native_message *msg) +static int node_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1151,10 +1151,10 @@ static int node_demarshal_info(void *object, const struct pw_protocol_native_mes return pw_proxy_notify(proxy, struct pw_node_events, info, 0, &info); } -static void node_marshal_param(void *object, int seq, uint32_t id, +static void node_marshal_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_NODE_EVENT_PARAM, NULL); @@ -1169,9 +1169,9 @@ static void node_marshal_param(void *object, int seq, uint32_t id, pw_protocol_native_end_resource(resource, b); } -static int node_demarshal_param(void *object, const struct pw_protocol_native_message *msg) +static int node_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -1329,9 +1329,9 @@ static int port_method_marshal_add_listener(void *object, return 0; } -static void port_marshal_info(void *object, const struct pw_port_info *info) +static void port_marshal_info(void *data, const struct pw_port_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -1350,9 +1350,9 @@ static void port_marshal_info(void *object, const struct pw_port_info *info) pw_protocol_native_end_resource(resource, b); } -static int port_demarshal_info(void *object, const struct pw_protocol_native_message *msg) +static int port_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1372,10 +1372,10 @@ static int port_demarshal_info(void *object, const struct pw_protocol_native_mes return pw_proxy_notify(proxy, struct pw_port_events, info, 0, &info); } -static void port_marshal_param(void *object, int seq, uint32_t id, +static void port_marshal_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_PORT_EVENT_PARAM, NULL); @@ -1390,9 +1390,9 @@ static void port_marshal_param(void *object, int seq, uint32_t id, pw_protocol_native_end_resource(resource, b); } -static int port_demarshal_param(void *object, const struct pw_protocol_native_message *msg) +static int port_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -1493,9 +1493,9 @@ static int client_method_marshal_add_listener(void *object, return 0; } -static void client_marshal_info(void *object, const struct pw_client_info *info) +static void client_marshal_info(void *data, const struct pw_client_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -1512,9 +1512,9 @@ static void client_marshal_info(void *object, const struct pw_client_info *info) pw_protocol_native_end_resource(resource, b); } -static int client_demarshal_info(void *object, const struct pw_protocol_native_message *msg) +static int client_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1532,10 +1532,10 @@ static int client_demarshal_info(void *object, const struct pw_protocol_native_m return pw_proxy_notify(proxy, struct pw_client_events, info, 0, &info); } -static void client_marshal_permissions(void *object, uint32_t index, uint32_t n_permissions, +static void client_marshal_permissions(void *data, uint32_t index, uint32_t n_permissions, const struct pw_permission *permissions) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f[2]; uint32_t i, n = 0; @@ -1564,9 +1564,9 @@ static void client_marshal_permissions(void *object, uint32_t index, uint32_t n_ pw_protocol_native_end_resource(resource, b); } -static int client_demarshal_permissions(void *object, const struct pw_protocol_native_message *msg) +static int client_demarshal_permissions(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct pw_permission *permissions; struct spa_pod_parser prs; struct spa_pod_frame f[2]; @@ -1721,9 +1721,9 @@ static int link_method_marshal_add_listener(void *object, return 0; } -static void link_marshal_info(void *object, const struct pw_link_info *info) +static void link_marshal_info(void *data, const struct pw_link_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; @@ -1747,9 +1747,9 @@ static void link_marshal_info(void *object, const struct pw_link_info *info) pw_protocol_native_end_resource(resource, b); } -static int link_demarshal_info(void *object, const struct pw_protocol_native_message *msg) +static int link_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1774,9 +1774,9 @@ static int link_demarshal_info(void *object, const struct pw_protocol_native_mes return pw_proxy_notify(proxy, struct pw_link_events, info, 0, &info); } -static int registry_demarshal_global(void *object, const struct pw_protocol_native_message *msg) +static int registry_demarshal_global(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f[2]; uint32_t id, permissions, version; @@ -1798,9 +1798,9 @@ static int registry_demarshal_global(void *object, const struct pw_protocol_nati global, 0, id, permissions, type, version, &props); } -static int registry_demarshal_global_remove(void *object, const struct pw_protocol_native_message *msg) +static int registry_demarshal_global_remove(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id; diff --git a/src/modules/module-protocol-native/v0/interfaces.h b/src/modules/module-protocol-native/v0/interfaces.h index c73e96e23..dca9672b4 100644 --- a/src/modules/module-protocol-native/v0/interfaces.h +++ b/src/modules/module-protocol-native/v0/interfaces.h @@ -192,7 +192,7 @@ struct pw_core_v0_events { * \param types the types as a string * \param n_types the number of \a types */ - void (*update_types) (void *object, + void (*update_types) (void *data, uint32_t first_id, const char **types, uint32_t n_types); @@ -203,7 +203,7 @@ struct pw_core_v0_events { * same sequence number. * \param seq the sequence number passed to the sync method call */ - void (*done) (void *object, uint32_t seq); + void (*done) (void *data, uint32_t seq); /** * Fatal error event * @@ -216,7 +216,7 @@ struct pw_core_v0_events { * \param res error code * \param error error description */ - void (*error) (void *object, uint32_t id, int res, const char *error, ...); + void (*error) (void *data, uint32_t id, int res, const char *error, ...); /** * Remove an object ID * @@ -227,13 +227,13 @@ struct pw_core_v0_events { * safely reuse the object ID. * \param id deleted object ID */ - void (*remove_id) (void *object, uint32_t id); + void (*remove_id) (void *data, uint32_t id); /** * Notify new core info * * \param info new core info */ - void (*info) (void *object, struct pw_core_info *info); + void (*info) (void *data, struct pw_core_info *info); }; #define pw_core_resource_v0_update_types(r,...) pw_resource_notify(r,struct pw_core_v0_events,update_types,__VA_ARGS__) @@ -319,7 +319,7 @@ struct pw_registry_v0_events { * \param version the version of the interface * \param props extra properties of the global */ - void (*global) (void *object, uint32_t id, uint32_t parent_id, + void (*global) (void *data, uint32_t id, uint32_t parent_id, uint32_t permissions, uint32_t type, uint32_t version, const struct spa_dict *props); /** @@ -331,7 +331,7 @@ struct pw_registry_v0_events { * * \param id the id of the global that was removed */ - void (*global_remove) (void *object, uint32_t id); + void (*global_remove) (void *data, uint32_t id); }; #define pw_registry_resource_v0_global(r,...) pw_resource_notify(r,struct pw_registry_v0_events,global,__VA_ARGS__) @@ -352,7 +352,7 @@ struct pw_module_v0_events { * * \param info info about the module */ - void (*info) (void *object, struct pw_module_info *info); + void (*info) (void *data, struct pw_module_info *info); }; #define pw_module_resource_v0_info(r,...) pw_resource_notify(r,struct pw_module_v0_events,info,__VA_ARGS__) @@ -372,7 +372,7 @@ struct pw_node_v0_events { * * \param info info about the node */ - void (*info) (void *object, struct pw_node_info *info); + void (*info) (void *data, struct pw_node_info *info); /** * Notify a node param * @@ -383,7 +383,7 @@ struct pw_node_v0_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, + void (*param) (void *data, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; @@ -428,7 +428,7 @@ struct pw_port_v0_events { * * \param info info about the port */ - void (*info) (void *object, struct pw_port_info *info); + void (*info) (void *data, struct pw_port_info *info); /** * Notify a port param * @@ -439,7 +439,7 @@ struct pw_port_v0_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, + void (*param) (void *data, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; @@ -483,7 +483,7 @@ struct pw_factory_v0_events { * * \param info info about the factory */ - void (*info) (void *object, struct pw_factory_info *info); + void (*info) (void *data, struct pw_factory_info *info); }; #define pw_factory_resource_v0_info(r,...) pw_resource_notify(r,struct pw_factory_v0_events,info,__VA_ARGS__) @@ -502,7 +502,7 @@ struct pw_client_v0_events { * * \param info info about the client */ - void (*info) (void *object, struct pw_client_info *info); + void (*info) (void *data, struct pw_client_info *info); }; #define pw_client_resource_v0_info(r,...) pw_resource_notify(r,struct pw_client_v0_events,info,__VA_ARGS__) @@ -522,7 +522,7 @@ struct pw_link_v0_events { * * \param info info about the link */ - void (*info) (void *object, struct pw_link_info *info); + void (*info) (void *data, struct pw_link_info *info); }; #define pw_link_resource_v0_info(r,...) pw_resource_notify(r,struct pw_link_v0_events,info,__VA_ARGS__) diff --git a/src/modules/module-protocol-native/v0/protocol-native.c b/src/modules/module-protocol-native/v0/protocol-native.c index a0c002f58..bc05e9162 100644 --- a/src/modules/module-protocol-native/v0/protocol-native.c +++ b/src/modules/module-protocol-native/v0/protocol-native.c @@ -83,9 +83,9 @@ update_types_server(struct pw_resource *resource) } -static void core_marshal_info(void *object, const struct pw_core_info *info) +static void core_marshal_info(void *data, const struct pw_core_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct protocol_compat_v2 *compat_v2 = client->compat_v2; struct spa_pod_builder *b; @@ -138,9 +138,9 @@ static void core_marshal_info(void *object, const struct pw_core_info *info) pw_protocol_native_end_resource(resource, b); } -static void core_marshal_done(void *object, uint32_t id, int seq) +static void core_marshal_done(void *data, uint32_t id, int seq) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_DONE, NULL); @@ -150,9 +150,9 @@ static void core_marshal_done(void *object, uint32_t id, int seq) pw_protocol_native_end_resource(resource, b); } -static void core_marshal_error(void *object, uint32_t id, int seq, int res, const char *error) +static void core_marshal_error(void *data, uint32_t id, int seq, int res, const char *error) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_ERROR, NULL); @@ -165,9 +165,9 @@ static void core_marshal_error(void *object, uint32_t id, int seq, int res, cons pw_protocol_native_end_resource(resource, b); } -static void core_marshal_remove_id(void *object, uint32_t id) +static void core_marshal_remove_id(void *data, uint32_t id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_CORE_V0_EVENT_REMOVE_ID, NULL); @@ -798,10 +798,10 @@ static int core_demarshal_update_types_server(void *object, const struct pw_prot return 0; } -static void registry_marshal_global(void *object, uint32_t id, uint32_t permissions, +static void registry_marshal_global(void *data, uint32_t id, uint32_t permissions, const char *type, uint32_t version, const struct spa_dict *props) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; struct spa_pod_frame f; @@ -854,9 +854,9 @@ static void registry_marshal_global(void *object, uint32_t id, uint32_t permissi pw_protocol_native_end_resource(resource, b); } -static void registry_marshal_global_remove(void *object, uint32_t id) +static void registry_marshal_global_remove(void *data, uint32_t id) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, PW_REGISTRY_V0_EVENT_GLOBAL_REMOVE, NULL); @@ -889,9 +889,9 @@ static int registry_demarshal_bind(void *object, const struct pw_protocol_native return pw_resource_notify(resource, struct pw_registry_methods, bind, 0, id, type_name, version, new_id); } -static void module_marshal_info(void *object, const struct pw_module_info *info) +static void module_marshal_info(void *data, const struct pw_module_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; uint32_t i, n_items; @@ -919,9 +919,9 @@ static void module_marshal_info(void *object, const struct pw_module_info *info) pw_protocol_native_end_resource(resource, b); } -static void factory_marshal_info(void *object, const struct pw_factory_info *info) +static void factory_marshal_info(void *data, const struct pw_factory_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; struct spa_pod_frame f; @@ -956,9 +956,9 @@ static void factory_marshal_info(void *object, const struct pw_factory_info *inf pw_protocol_native_end_resource(resource, b); } -static void node_marshal_info(void *object, const struct pw_node_info *info) +static void node_marshal_info(void *data, const struct pw_node_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; uint32_t i, n_items; @@ -990,10 +990,10 @@ static void node_marshal_info(void *object, const struct pw_node_info *info) pw_protocol_native_end_resource(resource, b); } -static void node_marshal_param(void *object, int seq, uint32_t id, uint32_t index, uint32_t next, +static void node_marshal_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; struct spa_pod_frame f; @@ -1037,9 +1037,9 @@ static int node_demarshal_enum_params(void *object, const struct pw_protocol_nat 0, id, index, num, filter); } -static void port_marshal_info(void *object, const struct pw_port_info *info) +static void port_marshal_info(void *data, const struct pw_port_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; uint32_t i, n_items; @@ -1083,10 +1083,10 @@ static void port_marshal_info(void *object, const struct pw_port_info *info) pw_protocol_native_end_resource(resource, b); } -static void port_marshal_param(void *object, int seq, uint32_t id, uint32_t index, uint32_t next, +static void port_marshal_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct pw_impl_client *client = pw_resource_get_client(resource); struct spa_pod_builder *b; struct spa_pod_frame f; @@ -1130,9 +1130,9 @@ static int port_demarshal_enum_params(void *object, const struct pw_protocol_nat 0, id, index, num, filter); } -static void client_marshal_info(void *object, const struct pw_client_info *info) +static void client_marshal_info(void *data, const struct pw_client_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; uint32_t i, n_items; @@ -1157,15 +1157,15 @@ static void client_marshal_info(void *object, const struct pw_client_info *info) pw_protocol_native_end_resource(resource, b); } -static void client_marshal_permissions(void *object, uint32_t index, uint32_t n_permissions, +static void client_marshal_permissions(void *data, uint32_t index, uint32_t n_permissions, const struct pw_permission *permissions) { } -static void link_marshal_info(void *object, const struct pw_link_info *info) +static void link_marshal_info(void *data, const struct pw_link_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; struct spa_pod_frame f; uint32_t i, n_items; diff --git a/src/modules/module-protocol-pulse/manager.c b/src/modules/module-protocol-pulse/manager.c index dabefed7e..58905c519 100644 --- a/src/modules/module-protocol-pulse/manager.c +++ b/src/modules/module-protocol-pulse/manager.c @@ -215,9 +215,9 @@ static const struct object_info core_info = { }; /* client */ -static void client_event_info(void *object, const struct pw_client_info *info) +static void client_event_info(void *data, const struct pw_client_info *info) { - struct object *o = object; + struct object *o = data; int changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->this.id, info->change_mask); @@ -254,9 +254,9 @@ static const struct object_info client_info = { }; /* module */ -static void module_event_info(void *object, const struct pw_module_info *info) +static void module_event_info(void *data, const struct pw_module_info *info) { - struct object *o = object; + struct object *o = data; int changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->this.id, info->change_mask); @@ -293,9 +293,9 @@ static const struct object_info module_info = { }; /* device */ -static void device_event_info(void *object, const struct pw_device_info *info) +static void device_event_info(void *data, const struct pw_device_info *info) { - struct object *o = object; + struct object *o = data; uint32_t i, changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->this.id, info->change_mask); @@ -364,11 +364,11 @@ static struct object *find_device(struct manager *m, uint32_t card_id, uint32_t return NULL; } -static void device_event_param(void *object, int seq, +static void device_event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct object *o = object, *dev; + struct object *o = data, *dev; struct manager *m = o->manager; struct pw_manager_param *p; @@ -413,9 +413,9 @@ static const struct object_info device_info = { }; /* node */ -static void node_event_info(void *object, const struct pw_node_info *info) +static void node_event_info(void *data, const struct pw_node_info *info) { - struct object *o = object; + struct object *o = data; uint32_t i, changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->this.id, info->change_mask); @@ -459,11 +459,11 @@ static void node_event_info(void *object, const struct pw_node_info *info) } } -static void node_event_param(void *object, int seq, +static void node_event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct object *o = object; + struct object *o = data; add_param(&o->pending_list, seq, o->param_seq, id, param); } @@ -495,13 +495,13 @@ static const struct object_info link_info = { }; /* metadata */ -static int metadata_property(void *object, +static int metadata_property(void *data, uint32_t subject, const char *key, const char *type, const char *value) { - struct object *o = object; + struct object *o = data; struct manager *m = o->manager; manager_emit_metadata(m, &o->this, subject, key, type, value); return 0; @@ -639,9 +639,9 @@ static void registry_event_global(void *data, uint32_t id, core_sync(m); } -static void registry_event_global_remove(void *object, uint32_t id) +static void registry_event_global_remove(void *data, uint32_t id) { - struct manager *m = object; + struct manager *m = data; struct object *o; if ((o = find_object_by_id(m, id)) == NULL) diff --git a/src/modules/module-rt.c b/src/modules/module-rt.c index 1aed00af8..20040296a 100644 --- a/src/modules/module-rt.c +++ b/src/modules/module-rt.c @@ -612,7 +612,7 @@ static int impl_acquire_rt_sched(struct spa_thread *thread, int priority) return 0; } -static int impl_drop_rt_generic(void *data, struct spa_thread *thread) +static int impl_drop_rt_generic(void *object, struct spa_thread *thread) { struct sched_param sp; pthread_t pt = (pthread_t)thread; @@ -685,9 +685,9 @@ exit: return (struct spa_thread*)this->thread; } -static int impl_join(void *data, struct spa_thread *thread, void **retval) +static int impl_join(void *object, struct spa_thread *thread, void **retval) { - struct impl *impl = data; + struct impl *impl = object; pthread_t pt = (pthread_t)thread; struct thread *thr; @@ -701,10 +701,10 @@ static int impl_join(void *data, struct spa_thread *thread, void **retval) return pthread_join(pt, retval); } -static int impl_get_rt_range(void *data, const struct spa_dict *props, +static int impl_get_rt_range(void *object, const struct spa_dict *props, int *min, int *max) { - struct impl *impl = data; + struct impl *impl = object; if (impl->use_rtkit) { if (min) *min = 1; @@ -735,9 +735,9 @@ static pid_t impl_gettid(struct impl *impl, pthread_t pt) return pid; } -static int impl_acquire_rt(void *data, struct spa_thread *thread, int priority) +static int impl_acquire_rt(void *object, struct spa_thread *thread, int priority) { - struct impl *impl = data; + struct impl *impl = object; struct sched_param sp; int err, rtprio_limit; pthread_t pt = (pthread_t)thread; diff --git a/src/modules/module-session-manager/endpoint-link.c b/src/modules/module-session-manager/endpoint-link.c index 58c1afbbb..c09ec7cec 100644 --- a/src/modules/module-session-manager/endpoint-link.c +++ b/src/modules/module-session-manager/endpoint-link.c @@ -183,10 +183,10 @@ static const struct pw_endpoint_link_methods link_methods = { .request_state = method_request_state, }; -static int global_bind(void *_data, struct pw_impl_client *client, +static int global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct impl *impl = _data; + struct impl *impl = object; struct pw_resource *resource; struct resource_data *data; @@ -285,9 +285,9 @@ static int emit_info(void *data, struct pw_resource *resource) return 0; } -static void event_info(void *object, const struct pw_endpoint_link_info *info) +static void event_info(void *data, const struct pw_endpoint_link_info *info) { - struct impl *impl = object; + struct impl *impl = data; uint32_t changed_ids[MAX_PARAMS], n_changed_ids = 0; uint32_t i; @@ -350,11 +350,11 @@ static int emit_param(void *_data, struct pw_resource *resource) return 0; } -static void event_param(void *object, int seq, +static void event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct impl *impl = object; + struct impl *impl = data; struct param_data *pdata; struct spa_pod **pod; struct param_event_args args = { id, index, next, param }; diff --git a/src/modules/module-session-manager/endpoint-stream.c b/src/modules/module-session-manager/endpoint-stream.c index 80810e30a..dab6a74bd 100644 --- a/src/modules/module-session-manager/endpoint-stream.c +++ b/src/modules/module-session-manager/endpoint-stream.c @@ -174,10 +174,10 @@ static const struct pw_endpoint_stream_methods stream_methods = { .set_param = method_set_param, }; -static int global_bind(void *_data, struct pw_impl_client *client, +static int global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct impl *impl = _data; + struct impl *impl = object; struct pw_resource *resource; struct resource_data *data; @@ -276,9 +276,9 @@ static int emit_info(void *data, struct pw_resource *resource) return 0; } -static void event_info(void *object, const struct pw_endpoint_stream_info *info) +static void event_info(void *data, const struct pw_endpoint_stream_info *info) { - struct impl *impl = object; + struct impl *impl = data; uint32_t changed_ids[MAX_PARAMS], n_changed_ids = 0; uint32_t i; @@ -341,11 +341,11 @@ static int emit_param(void *_data, struct pw_resource *resource) return 0; } -static void event_param(void *object, int seq, +static void event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct impl *impl = object; + struct impl *impl = data; struct param_data *pdata; struct spa_pod **pod; struct param_event_args args = { id, index, next, param }; diff --git a/src/modules/module-session-manager/endpoint.c b/src/modules/module-session-manager/endpoint.c index 2059d4414..d900c5f92 100644 --- a/src/modules/module-session-manager/endpoint.c +++ b/src/modules/module-session-manager/endpoint.c @@ -183,10 +183,10 @@ static const struct pw_endpoint_methods endpoint_methods = { .create_link = method_create_link, }; -static int global_bind(void *_data, struct pw_impl_client *client, +static int global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct impl *impl = _data; + struct impl *impl = object; struct pw_resource *resource; struct resource_data *data; @@ -285,9 +285,9 @@ static int emit_info(void *data, struct pw_resource *resource) return 0; } -static void event_info(void *object, const struct pw_endpoint_info *info) +static void event_info(void *data, const struct pw_endpoint_info *info) { - struct impl *impl = object; + struct impl *impl = data; uint32_t changed_ids[MAX_PARAMS], n_changed_ids = 0; uint32_t i; @@ -350,11 +350,11 @@ static int emit_param(void *_data, struct pw_resource *resource) return 0; } -static void event_param(void *object, int seq, +static void event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct impl *impl = object; + struct impl *impl = data; struct param_data *pdata; struct spa_pod **pod; struct param_event_args args = { id, index, next, param }; diff --git a/src/modules/module-session-manager/protocol-native.c b/src/modules/module-session-manager/protocol-native.c index e5f85c7d4..6981252af 100644 --- a/src/modules/module-session-manager/protocol-native.c +++ b/src/modules/module-session-manager/protocol-native.c @@ -470,10 +470,10 @@ static int client_endpoint_marshal_stream_update(void *object, return pw_protocol_native_end_proxy(proxy, b); } -static int client_endpoint_demarshal_set_session_id(void *object, +static int client_endpoint_demarshal_set_session_id(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id; @@ -486,10 +486,10 @@ static int client_endpoint_demarshal_set_session_id(void *object, set_session_id, 0, id); } -static int client_endpoint_demarshal_set_param(void *object, +static int client_endpoint_demarshal_set_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, flags; const struct spa_pod *param = NULL; @@ -505,10 +505,10 @@ static int client_endpoint_demarshal_set_param(void *object, set_param, 0, id, flags, param); } -static int client_endpoint_demarshal_stream_set_param(void *object, +static int client_endpoint_demarshal_stream_set_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t stream_id, id, flags; const struct spa_pod *param = NULL; @@ -525,10 +525,10 @@ static int client_endpoint_demarshal_stream_set_param(void *object, stream_set_param, 0, stream_id, id, flags, param); } -static int client_endpoint_demarshal_create_link(void *object, +static int client_endpoint_demarshal_create_link(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -672,11 +672,11 @@ static const struct pw_protocol_marshal pw_protocol_native_client_endpoint_marsh * CLIENT SESSION ***********************************************/ -static int client_session_marshal_set_param (void *object, +static int client_session_marshal_set_param (void *data, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -690,11 +690,11 @@ static int client_session_marshal_set_param (void *object, return pw_protocol_native_end_resource(resource, b); } -static int client_session_marshal_link_set_param (void *object, +static int client_session_marshal_link_set_param (void *data, uint32_t link_id, uint32_t id, uint32_t flags, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -709,10 +709,10 @@ static int client_session_marshal_link_set_param (void *object, return pw_protocol_native_end_resource(resource, b); } -static int client_session_marshal_link_request_state (void *object, +static int client_session_marshal_link_request_state (void *data, uint32_t link_id, uint32_t state) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -803,10 +803,10 @@ static int client_session_marshal_link_update(void *object, return pw_protocol_native_end_proxy(proxy, b); } -static int client_session_demarshal_set_param(void *object, +static int client_session_demarshal_set_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, flags; const struct spa_pod *param = NULL; @@ -822,10 +822,10 @@ static int client_session_demarshal_set_param(void *object, set_param, 0, id, flags, param); } -static int client_session_demarshal_link_set_param(void *object, +static int client_session_demarshal_link_set_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t link_id, id, flags; const struct spa_pod *param = NULL; @@ -842,10 +842,10 @@ static int client_session_demarshal_link_set_param(void *object, link_set_param, 0, link_id, id, flags, param); } -static int client_session_demarshal_link_request_state(void *object, +static int client_session_demarshal_link_request_state(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t link_id, state; @@ -988,10 +988,10 @@ static const struct pw_protocol_marshal pw_protocol_native_client_session_marsha * ENDPOINT LINK ***********************************************/ -static void endpoint_link_proxy_marshal_info (void *object, +static void endpoint_link_proxy_marshal_info (void *data, const struct pw_endpoint_link_info *info) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, @@ -1002,10 +1002,10 @@ static void endpoint_link_proxy_marshal_info (void *object, pw_protocol_native_end_proxy(proxy, b); } -static void endpoint_link_resource_marshal_info (void *object, +static void endpoint_link_resource_marshal_info (void *data, const struct pw_endpoint_link_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -1016,11 +1016,11 @@ static void endpoint_link_resource_marshal_info (void *object, pw_protocol_native_end_resource(resource, b); } -static void endpoint_link_proxy_marshal_param (void *object, int seq, uint32_t id, +static void endpoint_link_proxy_marshal_param (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, @@ -1035,11 +1035,11 @@ static void endpoint_link_proxy_marshal_param (void *object, int seq, uint32_t i pw_protocol_native_end_proxy(proxy, b); } -static void endpoint_link_resource_marshal_param (void *object, int seq, uint32_t id, +static void endpoint_link_resource_marshal_param (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -1213,10 +1213,10 @@ static int endpoint_link_resource_marshal_request_state(void *object, return pw_protocol_native_end_resource(resource, b); } -static int endpoint_link_proxy_demarshal_info(void *object, +static int endpoint_link_proxy_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1230,10 +1230,10 @@ static int endpoint_link_proxy_demarshal_info(void *object, info, 0, &info); } -static int endpoint_link_resource_demarshal_info(void *object, +static int endpoint_link_resource_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1247,10 +1247,10 @@ static int endpoint_link_resource_demarshal_info(void *object, info, 0, &info); } -static int endpoint_link_proxy_demarshal_param(void *object, +static int endpoint_link_proxy_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -1269,10 +1269,10 @@ static int endpoint_link_proxy_demarshal_param(void *object, param, 0, seq, id, index, next, param); } -static int endpoint_link_resource_demarshal_param(void *object, +static int endpoint_link_resource_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -1537,10 +1537,10 @@ static const struct pw_protocol_marshal pw_protocol_native_endpoint_link_impl_ma * ENDPOINT STREAM ***********************************************/ -static void endpoint_stream_proxy_marshal_info (void *object, +static void endpoint_stream_proxy_marshal_info (void *data, const struct pw_endpoint_stream_info *info) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, @@ -1551,10 +1551,10 @@ static void endpoint_stream_proxy_marshal_info (void *object, pw_protocol_native_end_proxy(proxy, b); } -static void endpoint_stream_resource_marshal_info (void *object, +static void endpoint_stream_resource_marshal_info (void *data, const struct pw_endpoint_stream_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -1565,11 +1565,11 @@ static void endpoint_stream_resource_marshal_info (void *object, pw_protocol_native_end_resource(resource, b); } -static void endpoint_stream_proxy_marshal_param (void *object, int seq, uint32_t id, +static void endpoint_stream_proxy_marshal_param (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, @@ -1585,11 +1585,11 @@ static void endpoint_stream_proxy_marshal_param (void *object, int seq, uint32_t pw_protocol_native_end_proxy(proxy, b); } -static void endpoint_stream_resource_marshal_param (void *object, int seq, uint32_t id, +static void endpoint_stream_resource_marshal_param (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -1735,10 +1735,10 @@ static int endpoint_stream_resource_marshal_set_param(void *object, return pw_protocol_native_end_resource(resource, b); } -static int endpoint_stream_proxy_demarshal_info(void *object, +static int endpoint_stream_proxy_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1752,10 +1752,10 @@ static int endpoint_stream_proxy_demarshal_info(void *object, info, 0, &info); } -static int endpoint_stream_resource_demarshal_info(void *object, +static int endpoint_stream_resource_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -1769,10 +1769,10 @@ static int endpoint_stream_resource_demarshal_info(void *object, info, 0, &info); } -static int endpoint_stream_proxy_demarshal_param(void *object, +static int endpoint_stream_proxy_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -1791,10 +1791,10 @@ static int endpoint_stream_proxy_demarshal_param(void *object, param, 0, seq, id, index, next, param); } -static int endpoint_stream_resource_demarshal_param(void *object, +static int endpoint_stream_resource_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -2023,10 +2023,10 @@ static const struct pw_protocol_marshal pw_protocol_native_endpoint_stream_impl_ * ENDPOINT ***********************************************/ -static void endpoint_proxy_marshal_info (void *object, +static void endpoint_proxy_marshal_info (void *data, const struct pw_endpoint_info *info) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, @@ -2037,10 +2037,10 @@ static void endpoint_proxy_marshal_info (void *object, pw_protocol_native_end_proxy(proxy, b); } -static void endpoint_resource_marshal_info (void *object, +static void endpoint_resource_marshal_info (void *data, const struct pw_endpoint_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -2051,11 +2051,11 @@ static void endpoint_resource_marshal_info (void *object, pw_protocol_native_end_resource(resource, b); } -static void endpoint_proxy_marshal_param (void *object, int seq, uint32_t id, +static void endpoint_proxy_marshal_param (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, @@ -2071,11 +2071,11 @@ static void endpoint_proxy_marshal_param (void *object, int seq, uint32_t id, pw_protocol_native_end_proxy(proxy, b); } -static void endpoint_resource_marshal_param (void *object, int seq, uint32_t id, +static void endpoint_resource_marshal_param (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -2249,10 +2249,10 @@ static int endpoint_resource_marshal_create_link(void *object, return pw_protocol_native_end_resource(resource, b); } -static int endpoint_proxy_demarshal_info(void *object, +static int endpoint_proxy_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -2266,10 +2266,10 @@ static int endpoint_proxy_demarshal_info(void *object, info, 0, &info); } -static int endpoint_resource_demarshal_info(void *object, +static int endpoint_resource_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -2283,10 +2283,10 @@ static int endpoint_resource_demarshal_info(void *object, info, 0, &info); } -static int endpoint_proxy_demarshal_param(void *object, +static int endpoint_proxy_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -2305,10 +2305,10 @@ static int endpoint_proxy_demarshal_param(void *object, param, 0, seq, id, index, next, param); } -static int endpoint_resource_demarshal_param(void *object, +static int endpoint_resource_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -2573,10 +2573,10 @@ static const struct pw_protocol_marshal pw_protocol_native_endpoint_impl_marshal * SESSION ***********************************************/ -static void session_proxy_marshal_info (void *object, +static void session_proxy_marshal_info (void *data, const struct pw_session_info *info) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, @@ -2587,10 +2587,10 @@ static void session_proxy_marshal_info (void *object, pw_protocol_native_end_proxy(proxy, b); } -static void session_resource_marshal_info (void *object, +static void session_resource_marshal_info (void *data, const struct pw_session_info *info) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -2601,11 +2601,11 @@ static void session_resource_marshal_info (void *object, pw_protocol_native_end_resource(resource, b); } -static void session_proxy_marshal_param (void *object, int seq, uint32_t id, +static void session_proxy_marshal_param (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_proxy(proxy, @@ -2621,11 +2621,11 @@ static void session_proxy_marshal_param (void *object, int seq, uint32_t id, pw_protocol_native_end_proxy(proxy, b); } -static void session_resource_marshal_param (void *object, int seq, uint32_t id, +static void session_resource_marshal_param (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_builder *b; b = pw_protocol_native_begin_resource(resource, @@ -2771,10 +2771,10 @@ static int session_resource_marshal_set_param(void *object, return pw_protocol_native_end_resource(resource, b); } -static int session_proxy_demarshal_info(void *object, +static int session_proxy_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -2788,10 +2788,10 @@ static int session_proxy_demarshal_info(void *object, info, 0, &info); } -static int session_resource_demarshal_info(void *object, +static int session_resource_demarshal_info(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; struct spa_pod_frame f; struct spa_dict props = SPA_DICT_INIT(NULL, 0); @@ -2805,10 +2805,10 @@ static int session_resource_demarshal_info(void *object, info, 0, &info); } -static int session_proxy_demarshal_param(void *object, +static int session_proxy_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_proxy *proxy = object; + struct pw_proxy *proxy = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; @@ -2827,10 +2827,10 @@ static int session_proxy_demarshal_param(void *object, param, 0, seq, id, index, next, param); } -static int session_resource_demarshal_param(void *object, +static int session_resource_demarshal_param(void *data, const struct pw_protocol_native_message *msg) { - struct pw_resource *resource = object; + struct pw_resource *resource = data; struct spa_pod_parser prs; uint32_t id, index, next; int seq; diff --git a/src/modules/module-session-manager/session.c b/src/modules/module-session-manager/session.c index 5473da71f..e839b6c17 100644 --- a/src/modules/module-session-manager/session.c +++ b/src/modules/module-session-manager/session.c @@ -174,10 +174,10 @@ static const struct pw_session_methods session_methods = { .set_param = method_set_param, }; -static int global_bind(void *_data, struct pw_impl_client *client, +static int global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct impl *impl = _data; + struct impl *impl = object; struct pw_resource *resource; struct resource_data *data; @@ -274,9 +274,9 @@ static int emit_info(void *data, struct pw_resource *resource) return 0; } -static void event_info(void *object, const struct pw_session_info *info) +static void event_info(void *data, const struct pw_session_info *info) { - struct impl *impl = object; + struct impl *impl = data; uint32_t changed_ids[MAX_PARAMS], n_changed_ids = 0; uint32_t i; @@ -339,11 +339,11 @@ static int emit_param(void *_data, struct pw_resource *resource) return 0; } -static void event_param(void *object, int seq, +static void event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct impl *impl = object; + struct impl *impl = data; struct param_data *pdata; struct spa_pod **pod; struct param_event_args args = { id, index, next, param }; diff --git a/src/pipewire/client.h b/src/pipewire/client.h index 7187d033a..2ed4c5b7b 100644 --- a/src/pipewire/client.h +++ b/src/pipewire/client.h @@ -85,7 +85,7 @@ struct pw_client_events { * * \param info info about the client */ - void (*info) (void *object, const struct pw_client_info *info); + void (*info) (void *data, const struct pw_client_info *info); /** * Notify a client permission * @@ -96,7 +96,7 @@ struct pw_client_events { * \param n_permissions the number of permissions * \param permissions the permissions */ - void (*permissions) (void *object, + void (*permissions) (void *data, uint32_t index, uint32_t n_permissions, const struct pw_permission *permissions); diff --git a/src/pipewire/core.h b/src/pipewire/core.h index 5995b36dd..604e7ccdf 100644 --- a/src/pipewire/core.h +++ b/src/pipewire/core.h @@ -125,7 +125,7 @@ struct pw_core_events { * * \param info new core info */ - void (*info) (void *object, const struct pw_core_info *info); + void (*info) (void *data, const struct pw_core_info *info); /** * Emit a done event * @@ -134,14 +134,14 @@ struct pw_core_events { * * \param seq the seq number passed to the sync method call */ - void (*done) (void *object, uint32_t id, int seq); + void (*done) (void *data, uint32_t id, int seq); /** Emit a ping event * * The client should reply with a pong reply with the same seq * number. */ - void (*ping) (void *object, uint32_t id, int seq); + void (*ping) (void *data, uint32_t id, int seq); /** * Fatal error event @@ -160,7 +160,7 @@ struct pw_core_events { * \param res error code * \param message error description */ - void (*error) (void *object, uint32_t id, int seq, int res, const char *message); + void (*error) (void *data, uint32_t id, int seq, int res, const char *message); /** * Remove an object ID * @@ -172,7 +172,7 @@ struct pw_core_events { * * \param id deleted object ID */ - void (*remove_id) (void *object, uint32_t id); + void (*remove_id) (void *data, uint32_t id); /** * Notify an object binding @@ -184,7 +184,7 @@ struct pw_core_events { * \param id bound object ID * \param global_id the global id bound to */ - void (*bound_id) (void *object, uint32_t id, uint32_t global_id); + void (*bound_id) (void *data, uint32_t id, uint32_t global_id); /** * Add memory for a client @@ -200,14 +200,14 @@ struct pw_core_events { * \param fd the file descriptor * \param flags extra flags */ - void (*add_mem) (void *object, uint32_t id, uint32_t type, int fd, uint32_t flags); + void (*add_mem) (void *data, uint32_t id, uint32_t type, int fd, uint32_t flags); /** * Remove memory for a client * * \param id the memory id to remove */ - void (*remove_mem) (void *object, uint32_t id); + void (*remove_mem) (void *data, uint32_t id); }; #define PW_CORE_METHOD_ADD_LISTENER 0 @@ -442,7 +442,7 @@ struct pw_registry_events { * \param version the version of the interface * \param props extra properties of the global */ - void (*global) (void *object, uint32_t id, + void (*global) (void *data, uint32_t id, uint32_t permissions, const char *type, uint32_t version, const struct spa_dict *props); /** @@ -454,7 +454,7 @@ struct pw_registry_events { * * \param id the id of the global that was removed */ - void (*global_remove) (void *object, uint32_t id); + void (*global_remove) (void *data, uint32_t id); }; #define PW_REGISTRY_METHOD_ADD_LISTENER 0 diff --git a/src/pipewire/device.h b/src/pipewire/device.h index 5399b5b3a..5bcaf8082 100644 --- a/src/pipewire/device.h +++ b/src/pipewire/device.h @@ -84,7 +84,7 @@ struct pw_device_events { * * \param info info about the device */ - void (*info) (void *object, const struct pw_device_info *info); + void (*info) (void *data, const struct pw_device_info *info); /** * Notify a device param * @@ -96,7 +96,7 @@ struct pw_device_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, int seq, + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; diff --git a/src/pipewire/extensions/client-node.h b/src/pipewire/extensions/client-node.h index a55cd02f8..15dbae359 100644 --- a/src/pipewire/extensions/client-node.h +++ b/src/pipewire/extensions/client-node.h @@ -84,7 +84,7 @@ struct pw_client_node_events { * \param offset offset of activation memory * \param size size of activation memory */ - int (*transport) (void *object, + int (*transport) (void *data, int readfd, int writefd, uint32_t mem_id, @@ -100,7 +100,7 @@ struct pw_client_node_events { * \param flags parameter flags * \param param the param to set */ - int (*set_param) (void *object, + int (*set_param) (void *data, uint32_t id, uint32_t flags, const struct spa_pod *param); /** @@ -114,7 +114,7 @@ struct pw_client_node_events { * \param offset offset of io area in memory * \param size size of the io area */ - int (*set_io) (void *object, + int (*set_io) (void *data, uint32_t id, uint32_t mem_id, uint32_t offset, @@ -122,13 +122,13 @@ struct pw_client_node_events { /** * Receive an event from the client node * \param event the received event */ - int (*event) (void *object, const struct spa_event *event); + int (*event) (void *data, const struct spa_event *event); /** * Notify of a new node command * * \param command the command */ - int (*command) (void *object, const struct spa_command *command); + int (*command) (void *data, const struct spa_command *command); /** * A new port was added to the node * @@ -139,7 +139,7 @@ struct pw_client_node_events { * \param port_id the new port id * \param props extra properties */ - int (*add_port) (void *object, + int (*add_port) (void *data, enum spa_direction direction, uint32_t port_id, const struct spa_dict *props); @@ -149,7 +149,7 @@ struct pw_client_node_events { * \param direction a port direction * \param port_id the remove port id */ - int (*remove_port) (void *object, + int (*remove_port) (void *data, enum spa_direction direction, uint32_t port_id); /** @@ -161,7 +161,7 @@ struct pw_client_node_events { * \param flags flags used when setting the param * \param param the new param */ - int (*port_set_param) (void *object, + int (*port_set_param) (void *data, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t flags, @@ -175,7 +175,7 @@ struct pw_client_node_events { * \param n_buffer the number of buffers * \param buffers and array of buffer descriptions */ - int (*port_use_buffers) (void *object, + int (*port_use_buffers) (void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, @@ -193,7 +193,7 @@ struct pw_client_node_events { * \param offset offset of io area in memory * \param size size of the io area */ - int (*port_set_io) (void *object, + int (*port_set_io) (void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, @@ -212,7 +212,7 @@ struct pw_client_node_events { * \param the offset in \a mem_id to map * \param the size of \a mem_id to map */ - int (*set_activation) (void *object, + int (*set_activation) (void *data, uint32_t node_id, int signalfd, uint32_t mem_id, @@ -230,7 +230,7 @@ struct pw_client_node_events { * * Since version 4:1 */ - int (*port_set_mix_info) (void *object, + int (*port_set_mix_info) (void *data, enum spa_direction direction, uint32_t port_id, uint32_t mix_id, diff --git a/src/pipewire/extensions/metadata.h b/src/pipewire/extensions/metadata.h index 99cceb262..9541e2a11 100644 --- a/src/pipewire/extensions/metadata.h +++ b/src/pipewire/extensions/metadata.h @@ -54,7 +54,7 @@ struct pw_metadata_events { #define PW_VERSION_METADATA_EVENTS 0 uint32_t version; - int (*property) (void *object, + int (*property) (void *data, uint32_t subject, const char *key, const char *type, diff --git a/src/pipewire/extensions/profiler.h b/src/pipewire/extensions/profiler.h index 4bf8ce476..a5940a167 100644 --- a/src/pipewire/extensions/profiler.h +++ b/src/pipewire/extensions/profiler.h @@ -54,7 +54,7 @@ struct pw_profiler_events { #define PW_VERSION_PROFILER_EVENTS 0 uint32_t version; - void (*profile) (void *object, const struct spa_pod *pod); + void (*profile) (void *data, const struct spa_pod *pod); }; #define PW_PROFILER_METHOD_ADD_LISTENER 0 diff --git a/src/pipewire/extensions/session-manager/impl-interfaces.h b/src/pipewire/extensions/session-manager/impl-interfaces.h index bc748cd33..20dbc1125 100644 --- a/src/pipewire/extensions/session-manager/impl-interfaces.h +++ b/src/pipewire/extensions/session-manager/impl-interfaces.h @@ -71,7 +71,7 @@ struct pw_client_endpoint_events { * -EINVAL when the session id has already been set * -ENOTSUP when the endpoint is a session master */ - int (*set_session_id) (void *object, uint32_t session_id); + int (*set_session_id) (void *data, uint32_t session_id); /** * Set the configurable parameter in \a endpoint. @@ -94,7 +94,7 @@ struct pw_client_endpoint_events { * -ENOTSUP when there are no parameters implemented on \a endpoint * -ENOENT the parameter is unknown */ - int (*set_param) (void *object, + int (*set_param) (void *data, uint32_t id, uint32_t flags, const struct spa_pod *param); @@ -118,11 +118,11 @@ struct pw_client_endpoint_events { * -ESRCH when the type or size of a property is not correct. * -ENOENT when the param id is not found */ - int (*stream_set_param) (void *object, uint32_t stream_id, + int (*stream_set_param) (void *data, uint32_t stream_id, uint32_t id, uint32_t flags, const struct spa_pod *param); - int (*create_link) (void *object, const struct spa_dict *props); + int (*create_link) (void *data, const struct spa_dict *props); }; #define PW_CLIENT_ENDPOINT_METHOD_ADD_LISTENER 0 @@ -208,7 +208,7 @@ struct pw_client_session_events { * -ENOTSUP when there are no parameters implemented on \a session * -ENOENT the parameter is unknown */ - int (*set_param) (void *object, + int (*set_param) (void *data, uint32_t id, uint32_t flags, const struct spa_pod *param); @@ -232,11 +232,11 @@ struct pw_client_session_events { * -ESRCH when the type or size of a property is not correct. * -ENOENT when the param id is not found */ - int (*link_set_param) (void *object, uint32_t link_id, + int (*link_set_param) (void *data, uint32_t link_id, uint32_t id, uint32_t flags, const struct spa_pod *param); - int (*link_request_state) (void *object, uint32_t link_id, uint32_t state); + int (*link_request_state) (void *data, uint32_t link_id, uint32_t state); }; #define PW_CLIENT_SESSION_METHOD_ADD_LISTENER 0 diff --git a/src/pipewire/extensions/session-manager/interfaces.h b/src/pipewire/extensions/session-manager/interfaces.h index c507f265f..0c11e1dec 100644 --- a/src/pipewire/extensions/session-manager/interfaces.h +++ b/src/pipewire/extensions/session-manager/interfaces.h @@ -71,7 +71,7 @@ struct pw_session_events { * * \param info info about the session */ - void (*info) (void *object, const struct pw_session_info *info); + void (*info) (void *data, const struct pw_session_info *info); /** * Notify a session param @@ -84,7 +84,7 @@ struct pw_session_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, int seq, + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; @@ -173,7 +173,7 @@ struct pw_endpoint_events { * * \param info info about the endpoint */ - void (*info) (void *object, const struct pw_endpoint_info *info); + void (*info) (void *data, const struct pw_endpoint_info *info); /** * Notify a endpoint param @@ -186,7 +186,7 @@ struct pw_endpoint_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, int seq, + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; @@ -277,7 +277,7 @@ struct pw_endpoint_stream_events { * * \param info info about the endpoint stream */ - void (*info) (void *object, const struct pw_endpoint_stream_info *info); + void (*info) (void *data, const struct pw_endpoint_stream_info *info); /** * Notify a endpoint stream param @@ -290,7 +290,7 @@ struct pw_endpoint_stream_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, int seq, + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; @@ -377,7 +377,7 @@ struct pw_endpoint_link_events { * * \param info info about the endpoint link */ - void (*info) (void *object, const struct pw_endpoint_link_info *info); + void (*info) (void *data, const struct pw_endpoint_link_info *info); /** * Notify a endpoint link param @@ -390,7 +390,7 @@ struct pw_endpoint_link_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, int seq, + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; diff --git a/src/pipewire/factory.h b/src/pipewire/factory.h index 8e7da28d7..c747dd965 100644 --- a/src/pipewire/factory.h +++ b/src/pipewire/factory.h @@ -84,7 +84,7 @@ struct pw_factory_events { * * \param info info about the factory */ - void (*info) (void *object, const struct pw_factory_info *info); + void (*info) (void *data, const struct pw_factory_info *info); }; #define PW_FACTORY_METHOD_ADD_LISTENER 0 diff --git a/src/pipewire/impl-client.c b/src/pipewire/impl-client.c index 1279472a6..cd566a566 100644 --- a/src/pipewire/impl-client.c +++ b/src/pipewire/impl-client.c @@ -303,10 +303,10 @@ static const struct pw_resource_events resource_events = { }; static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_client *this = _data; + struct pw_impl_client *this = object; struct pw_global *global = this->global; struct pw_resource *resource; struct resource_data *data; @@ -469,9 +469,9 @@ error_cleanup: return NULL; } -static void global_destroy(void *object) +static void global_destroy(void *data) { - struct pw_impl_client *client = object; + struct pw_impl_client *client = data; spa_hook_remove(&client->global_listener); client->global = NULL; pw_impl_client_destroy(client); diff --git a/src/pipewire/impl-core.c b/src/pipewire/impl-core.c index 8f0e37dc4..776f030fe 100644 --- a/src/pipewire/impl-core.c +++ b/src/pipewire/impl-core.c @@ -157,9 +157,9 @@ static const struct pw_registry_methods registry_methods = { .destroy = registry_destroy }; -static void destroy_registry_resource(void *object) +static void destroy_registry_resource(void *_data) { - struct resource_data *data = object; + struct resource_data *data = _data; struct pw_resource *resource = data->resource; spa_list_remove(&resource->link); spa_hook_remove(&data->resource_listener); @@ -507,13 +507,13 @@ static const struct pw_resource_events core_resource_events = { }; static int -global_bind(void *_data, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_core *this = _data; + struct pw_impl_core *this = object; struct pw_global *global = this->global; struct pw_resource *resource; struct resource_data *data; @@ -555,9 +555,9 @@ error: return res; } -static void global_destroy(void *object) +static void global_destroy(void *data) { - struct pw_impl_core *core = object; + struct pw_impl_core *core = data; spa_hook_remove(&core->global_listener); core->global = NULL; pw_impl_core_destroy(core); diff --git a/src/pipewire/impl-device.c b/src/pipewire/impl-device.c index 3b63190dd..188da6f9d 100644 --- a/src/pipewire/impl-device.c +++ b/src/pipewire/impl-device.c @@ -502,10 +502,10 @@ static const struct pw_device_methods device_methods = { }; static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_device *this = _data; + struct pw_impl_device *this = object; struct pw_global *global = this->global; struct pw_resource *resource; struct resource_data *data; @@ -540,9 +540,9 @@ error_resource: return -errno; } -static void global_destroy(void *object) +static void global_destroy(void *data) { - struct pw_impl_device *device = object; + struct pw_impl_device *device = data; spa_hook_remove(&device->global_listener); device->global = NULL; pw_impl_device_destroy(device); diff --git a/src/pipewire/impl-factory.c b/src/pipewire/impl-factory.c index d216ba5b8..07572c3f4 100644 --- a/src/pipewire/impl-factory.c +++ b/src/pipewire/impl-factory.c @@ -106,10 +106,10 @@ void pw_impl_factory_destroy(struct pw_impl_factory *factory) } static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_factory *this = _data; + struct pw_impl_factory *this = object; struct pw_global *global = this->global; struct pw_resource *resource; @@ -131,9 +131,9 @@ error_resource: return -errno; } -static void global_destroy(void *object) +static void global_destroy(void *data) { - struct pw_impl_factory *factory = object; + struct pw_impl_factory *factory = data; spa_hook_remove(&factory->global_listener); factory->global = NULL; pw_impl_factory_destroy(factory); diff --git a/src/pipewire/impl-link.c b/src/pipewire/impl-link.c index 49b99880e..095f1eabc 100644 --- a/src/pipewire/impl-link.c +++ b/src/pipewire/impl-link.c @@ -849,10 +849,10 @@ int pw_impl_link_deactivate(struct pw_impl_link *this) } static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_link *this = _data; + struct pw_impl_link *this = object; struct pw_global *global = this->global; struct pw_resource *resource; @@ -1322,9 +1322,9 @@ error_exit: return NULL; } -static void global_destroy(void *object) +static void global_destroy(void *data) { - struct pw_impl_link *link = object; + struct pw_impl_link *link = data; spa_hook_remove(&link->global_listener); link->global = NULL; pw_impl_link_destroy(link); diff --git a/src/pipewire/impl-metadata.c b/src/pipewire/impl-metadata.c index 32c2074ba..9f7aa41d8 100644 --- a/src/pipewire/impl-metadata.c +++ b/src/pipewire/impl-metadata.c @@ -268,10 +268,10 @@ struct resource_data { }; -static int metadata_property(void *object, uint32_t subject, const char *key, +static int metadata_property(void *data, uint32_t subject, const char *key, const char *type, const char *value) { - struct pw_impl_metadata *this = object; + struct pw_impl_metadata *this = data; pw_impl_metadata_emit_property(this, subject, key, type, value); return 0; } @@ -391,13 +391,13 @@ void pw_impl_metadata_destroy(struct pw_impl_metadata *metadata) #define pw_metadata_resource_property(r,...) \ pw_metadata_resource(r,property,0,__VA_ARGS__) -static int metadata_resource_property(void *object, +static int metadata_resource_property(void *data, uint32_t subject, const char *key, const char *type, const char *value) { - struct resource_data *d = object; + struct resource_data *d = data; struct pw_resource *resource = d->resource; struct pw_impl_client *client = pw_resource_get_client(resource); @@ -465,10 +465,10 @@ static const struct pw_resource_events resource_events = { }; static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_metadata *this = _data; + struct pw_impl_metadata *this = object; struct pw_global *global = this->global; struct pw_resource *resource; struct resource_data *data; @@ -506,9 +506,9 @@ error_resource: return -errno; } -static void global_destroy(void *object) +static void global_destroy(void *data) { - struct pw_impl_metadata *metadata = object; + struct pw_impl_metadata *metadata = data; spa_hook_remove(&metadata->global_listener); metadata->global = NULL; pw_impl_metadata_destroy(metadata); diff --git a/src/pipewire/impl-module.c b/src/pipewire/impl-module.c index c7f3691d8..0657fa590 100644 --- a/src/pipewire/impl-module.c +++ b/src/pipewire/impl-module.c @@ -109,10 +109,10 @@ static char *find_module(const char *path, const char *name, int level) } static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_module *this = _data; + struct pw_impl_module *this = object; struct pw_global *global = this->global; struct pw_resource *resource; @@ -134,9 +134,9 @@ error_resource: return -errno; } -static void global_destroy(void *object) +static void global_destroy(void *data) { - struct pw_impl_module *module = object; + struct pw_impl_module *module = data; spa_hook_remove(&module->global_listener); module->global = NULL; pw_impl_module_destroy(module); diff --git a/src/pipewire/impl-node.c b/src/pipewire/impl-node.c index 93bb8e832..e654b979d 100644 --- a/src/pipewire/impl-node.c +++ b/src/pipewire/impl-node.c @@ -592,10 +592,10 @@ static const struct pw_resource_events resource_events = { }; static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_node *this = _data; + struct pw_impl_node *this = object; struct pw_global *global = this->global; struct pw_resource *resource; struct resource_data *data; diff --git a/src/pipewire/impl-port.c b/src/pipewire/impl-port.c index c6252edb0..87d1f61ef 100644 --- a/src/pipewire/impl-port.c +++ b/src/pipewire/impl-port.c @@ -847,10 +847,10 @@ static const struct pw_resource_events resource_events = { }; static int -global_bind(void *_data, struct pw_impl_client *client, uint32_t permissions, +global_bind(void *object, struct pw_impl_client *client, uint32_t permissions, uint32_t version, uint32_t id) { - struct pw_impl_port *this = _data; + struct pw_impl_port *this = object; struct pw_global *global = this->global; struct pw_resource *resource; struct resource_data *data; @@ -886,9 +886,9 @@ error_resource: return res; } -static void global_destroy(void *object) +static void global_destroy(void *data) { - struct pw_impl_port *port = object; + struct pw_impl_port *port = data; spa_hook_remove(&port->global_listener); port->global = NULL; pw_impl_port_destroy(port); diff --git a/src/pipewire/link.h b/src/pipewire/link.h index e1f3ff87c..8130f4b5e 100644 --- a/src/pipewire/link.h +++ b/src/pipewire/link.h @@ -109,7 +109,7 @@ struct pw_link_events { * * \param info info about the link */ - void (*info) (void *object, const struct pw_link_info *info); + void (*info) (void *data, const struct pw_link_info *info); }; #define PW_LINK_METHOD_ADD_LISTENER 0 diff --git a/src/pipewire/module.h b/src/pipewire/module.h index 23bddf0f9..aba6de8b5 100644 --- a/src/pipewire/module.h +++ b/src/pipewire/module.h @@ -82,7 +82,7 @@ struct pw_module_events { * * \param info info about the module */ - void (*info) (void *object, const struct pw_module_info *info); + void (*info) (void *data, const struct pw_module_info *info); }; #define PW_MODULE_METHOD_ADD_LISTENER 0 diff --git a/src/pipewire/node.h b/src/pipewire/node.h index 6301b820b..e5b899525 100644 --- a/src/pipewire/node.h +++ b/src/pipewire/node.h @@ -111,7 +111,7 @@ struct pw_node_events { * * \param info info about the node */ - void (*info) (void *object, const struct pw_node_info *info); + void (*info) (void *data, const struct pw_node_info *info); /** * Notify a node param * @@ -123,7 +123,7 @@ struct pw_node_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, int seq, + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; diff --git a/src/pipewire/port.h b/src/pipewire/port.h index 2a725abcf..463af23db 100644 --- a/src/pipewire/port.h +++ b/src/pipewire/port.h @@ -96,7 +96,7 @@ struct pw_port_events { * * \param info info about the port */ - void (*info) (void *object, const struct pw_port_info *info); + void (*info) (void *data, const struct pw_port_info *info); /** * Notify a port param * @@ -108,7 +108,7 @@ struct pw_port_events { * \param next the param index of the next param * \param param the parameter */ - void (*param) (void *object, int seq, + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); }; diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index d99b33531..b5e87cb25 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1306,9 +1306,9 @@ static int node_event_param(void *object, int seq, return 0; } -static void node_event_info(void *object, const struct pw_node_info *info) +static void node_event_info(void *data, const struct pw_node_info *info) { - struct pw_stream *stream = object; + struct pw_stream *stream = data; struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); uint32_t i; @@ -1336,9 +1336,9 @@ static const struct pw_impl_node_events node_events = { .info_changed = node_event_info, }; -static void on_core_error(void *object, uint32_t id, int seq, int res, const char *message) +static void on_core_error(void *data, uint32_t id, int seq, int res, const char *message) { - struct pw_stream *stream = object; + struct pw_stream *stream = data; pw_log_debug("%p: error id:%u seq:%d res:%d (%s): %s", stream, id, seq, res, spa_strerror(res), message); diff --git a/src/pipewire/thread.c b/src/pipewire/thread.c index 35c930d0b..512c62606 100644 --- a/src/pipewire/thread.c +++ b/src/pipewire/thread.c @@ -34,7 +34,7 @@ #include "thread.h" -static struct spa_thread *impl_create(void *data, +static struct spa_thread *impl_create(void *object, const struct spa_dict *props, void *(*start)(void*), void *arg) { @@ -47,13 +47,13 @@ static struct spa_thread *impl_create(void *data, return (struct spa_thread*)pt; } -static int impl_join(void *data, struct spa_thread *thread, void **retval) +static int impl_join(void *object, struct spa_thread *thread, void **retval) { pthread_t pt = (pthread_t)thread; return pthread_join(pt, retval); } -static int impl_get_rt_range(void *data, const struct spa_dict *props, +static int impl_get_rt_range(void *object, const struct spa_dict *props, int *min, int *max) { if (min) diff --git a/src/tests/test-endpoint.c b/src/tests/test-endpoint.c index 45276304a..dd516a6d4 100644 --- a/src/tests/test-endpoint.c +++ b/src/tests/test-endpoint.c @@ -267,9 +267,9 @@ struct test_endpoint_data }; static void -endpoint_event_info(void *object, const struct pw_endpoint_info *info) +endpoint_event_info(void *data, const struct pw_endpoint_info *info) { - struct test_endpoint_data *d = object; + struct test_endpoint_data *d = data; const char *val; spa_assert_se(info); @@ -299,11 +299,11 @@ endpoint_event_info(void *object, const struct pw_endpoint_info *info) } static void -endpoint_event_param(void *object, int seq, +endpoint_event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct test_endpoint_data *d = object; + struct test_endpoint_data *d = data; if (id == SPA_PARAM_Props) { struct props *p = &d->props; @@ -326,9 +326,9 @@ static const struct pw_endpoint_events endpoint_events = { }; static void -endpoint_proxy_destroy(void *object) +endpoint_proxy_destroy(void *data) { - struct test_endpoint_data *d = object; + struct test_endpoint_data *d = data; d->bound_proxy = NULL; pw_main_loop_quit(d->loop); } @@ -339,11 +339,11 @@ static const struct pw_proxy_events proxy_events = { }; static void -test_endpoint_global(void *object, uint32_t id, +test_endpoint_global(void *data, uint32_t id, uint32_t permissions, const char *type, uint32_t version, const struct spa_dict *props) { - struct test_endpoint_data *d = object; + struct test_endpoint_data *d = data; const char *val; if (!spa_streq(type, PW_TYPE_INTERFACE_Endpoint)) @@ -366,9 +366,9 @@ test_endpoint_global(void *object, uint32_t id, } static void -test_endpoint_global_remove(void *object, uint32_t id) +test_endpoint_global_remove(void *data, uint32_t id) { - struct test_endpoint_data *d = object; + struct test_endpoint_data *d = data; if (d->bound_proxy && id == pw_proxy_get_bound_id(d->bound_proxy)) pw_proxy_destroy(d->bound_proxy); } diff --git a/src/tests/test-interfaces.c b/src/tests/test-interfaces.c index e298f7ad6..86f772fc7 100644 --- a/src/tests/test-interfaces.c +++ b/src/tests/test-interfaces.c @@ -54,14 +54,14 @@ static void test_core_abi(void) } methods = { PW_VERSION_CORE_METHODS, }; static const struct { uint32_t version; - void (*info) (void *object, const struct pw_core_info *info); - void (*done) (void *object, uint32_t id, int seq); - void (*ping) (void *object, uint32_t id, int seq); - void (*error) (void *object, uint32_t id, int seq, int res, const char *error); - void (*remove_id) (void *object, uint32_t id); - void (*bound_id) (void *object, uint32_t id, uint32_t global_id); - void (*add_mem) (void *object, uint32_t id, uint32_t type, int fd, uint32_t flags); - void (*remove_mem) (void *object, uint32_t id); + void (*info) (void *data, const struct pw_core_info *info); + void (*done) (void *data, uint32_t id, int seq); + void (*ping) (void *data, uint32_t id, int seq); + void (*error) (void *data, uint32_t id, int seq, int res, const char *error); + void (*remove_id) (void *data, uint32_t id); + void (*bound_id) (void *data, uint32_t id, uint32_t global_id); + void (*add_mem) (void *data, uint32_t id, uint32_t type, int fd, uint32_t flags); + void (*remove_mem) (void *data, uint32_t id); } events = { PW_VERSION_CORE_EVENTS, }; struct pw_core_events e; @@ -108,10 +108,10 @@ static void test_registry_abi(void) } methods = { PW_VERSION_REGISTRY_METHODS, }; struct { uint32_t version; - void (*global) (void *object, uint32_t id, + void (*global) (void *data, uint32_t id, uint32_t permissions, const char *type, uint32_t version, const struct spa_dict *props); - void (*global_remove) (void *object, uint32_t id); + void (*global_remove) (void *data, uint32_t id); } events = { PW_VERSION_REGISTRY_EVENTS, }; TEST_FUNC(m, methods, version); @@ -141,7 +141,7 @@ static void test_module_abi(void) } methods = { PW_VERSION_MODULE_METHODS, }; struct { uint32_t version; - void (*info) (void *object, const struct pw_module_info *info); + void (*info) (void *data, const struct pw_module_info *info); } events = { PW_VERSION_MODULE_EVENTS, }; TEST_FUNC(m, methods, version); @@ -174,8 +174,8 @@ static void test_device_abi(void) } methods = { PW_VERSION_DEVICE_METHODS, }; struct { uint32_t version; - void (*info) (void *object, const struct pw_device_info *info); - void (*param) (void *object, int seq, + void (*info) (void *data, const struct pw_device_info *info); + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); } events = { PW_VERSION_DEVICE_EVENTS, }; @@ -214,8 +214,8 @@ static void test_node_abi(void) } methods = { PW_VERSION_NODE_METHODS, }; struct { uint32_t version; - void (*info) (void *object, const struct pw_node_info *info); - void (*param) (void *object, int seq, + void (*info) (void *data, const struct pw_node_info *info); + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); } events = { PW_VERSION_NODE_EVENTS, }; @@ -252,8 +252,8 @@ static void test_port_abi(void) } methods = { PW_VERSION_PORT_METHODS, }; struct { uint32_t version; - void (*info) (void *object, const struct pw_port_info *info); - void (*param) (void *object, int seq, + void (*info) (void *data, const struct pw_port_info *info); + void (*param) (void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param); } events = { PW_VERSION_PORT_EVENTS, }; @@ -284,7 +284,7 @@ static void test_factory_abi(void) } methods = { PW_VERSION_FACTORY_METHODS, }; struct { uint32_t version; - void (*info) (void *object, const struct pw_factory_info *info); + void (*info) (void *data, const struct pw_factory_info *info); } events = { PW_VERSION_FACTORY_EVENTS, }; TEST_FUNC(m, methods, version); @@ -316,8 +316,8 @@ static void test_client_abi(void) } methods = { PW_VERSION_CLIENT_METHODS, }; struct { uint32_t version; - void (*info) (void *object, const struct pw_client_info *info); - void (*permissions) (void *object, uint32_t index, + void (*info) (void *data, const struct pw_client_info *info); + void (*permissions) (void *data, uint32_t index, uint32_t n_permissions, const struct pw_permission *permissions); } events = { PW_VERSION_CLIENT_EVENTS, }; @@ -350,7 +350,7 @@ static void test_link_abi(void) } methods = { PW_VERSION_LINK_METHODS, }; struct { uint32_t version; - void (*info) (void *object, const struct pw_link_info *info); + void (*info) (void *data, const struct pw_link_info *info); } events = { PW_VERSION_LINK_EVENTS, }; TEST_FUNC(m, methods, version); diff --git a/src/tools/pw-cli.c b/src/tools/pw-cli.c index d19e66b86..621d3ea06 100644 --- a/src/tools/pw-cli.c +++ b/src/tools/pw-cli.c @@ -801,9 +801,9 @@ static void info_endpoint_stream(struct proxy_data *pd) info->change_mask = 0; } -static void core_event_info(void *object, const struct pw_core_info *info) +static void core_event_info(void *data, const struct pw_core_info *info) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; if (pd->info) printf("remote %d core %d changed\n", rd->id, info->id); @@ -822,9 +822,9 @@ static const struct pw_core_events core_events = { }; -static void module_event_info(void *object, const struct pw_module_info *info) +static void module_event_info(void *data, const struct pw_module_info *info) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; if (pd->info) printf("remote %d module %d changed\n", rd->id, info->id); @@ -842,9 +842,9 @@ static const struct pw_module_events module_events = { .info = module_event_info }; -static void node_event_info(void *object, const struct pw_node_info *info) +static void node_event_info(void *data, const struct pw_node_info *info) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; if (pd->info) printf("remote %d node %d changed\n", rd->id, info->id); @@ -857,10 +857,10 @@ static void node_event_info(void *object, const struct pw_node_info *info) } } -static void event_param(void *object, int seq, uint32_t id, +static void event_param(void *_data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct proxy_data *data = object; + struct proxy_data *data = _data; struct remote_data *rd = data->rd; if (rd->data->interactive) @@ -877,9 +877,9 @@ static const struct pw_node_events node_events = { }; -static void port_event_info(void *object, const struct pw_port_info *info) +static void port_event_info(void *data, const struct pw_port_info *info) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; if (pd->info) printf("remote %d port %d changed\n", rd->id, info->id); @@ -898,9 +898,9 @@ static const struct pw_port_events port_events = { .param = event_param }; -static void factory_event_info(void *object, const struct pw_factory_info *info) +static void factory_event_info(void *data, const struct pw_factory_info *info) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; if (pd->info) printf("remote %d factory %d changed\n", rd->id, info->id); @@ -918,9 +918,9 @@ static const struct pw_factory_events factory_events = { .info = factory_event_info }; -static void client_event_info(void *object, const struct pw_client_info *info) +static void client_event_info(void *data, const struct pw_client_info *info) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; if (pd->info) printf("remote %d client %d changed\n", rd->id, info->id); @@ -933,10 +933,10 @@ static void client_event_info(void *object, const struct pw_client_info *info) } } -static void client_event_permissions(void *object, uint32_t index, +static void client_event_permissions(void *_data, uint32_t index, uint32_t n_permissions, const struct pw_permission *permissions) { - struct proxy_data *data = object; + struct proxy_data *data = _data; struct remote_data *rd = data->rd; uint32_t i; @@ -959,9 +959,9 @@ static const struct pw_client_events client_events = { .permissions = client_event_permissions }; -static void link_event_info(void *object, const struct pw_link_info *info) +static void link_event_info(void *data, const struct pw_link_info *info) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; if (pd->info) printf("remote %d link %d changed\n", rd->id, info->id); @@ -980,9 +980,9 @@ static const struct pw_link_events link_events = { }; -static void device_event_info(void *object, const struct pw_device_info *info) +static void device_event_info(void *data, const struct pw_device_info *info) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; if (pd->info) printf("remote %d device %d changed\n", rd->id, info->id); @@ -1008,10 +1008,10 @@ static void session_info_free(struct pw_session_info *info) free(info); } -static void session_event_info(void *object, +static void session_event_info(void *data, const struct pw_session_info *update) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; struct pw_session_info *info = pd->info; @@ -1055,10 +1055,10 @@ static void endpoint_info_free(struct pw_endpoint_info *info) free(info); } -static void endpoint_event_info(void *object, +static void endpoint_event_info(void *data, const struct pw_endpoint_info *update) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; struct pw_endpoint_info *info = pd->info; @@ -1109,10 +1109,10 @@ static void endpoint_stream_info_free(struct pw_endpoint_stream_info *info) free(info); } -static void endpoint_stream_event_info(void *object, +static void endpoint_stream_event_info(void *data, const struct pw_endpoint_stream_info *update) { - struct proxy_data *pd = object; + struct proxy_data *pd = data; struct remote_data *rd = pd->rd; struct pw_endpoint_stream_info *info = pd->info; diff --git a/src/tools/pw-dot.c b/src/tools/pw-dot.c index 687acc4f9..68abc3b95 100644 --- a/src/tools/pw-dot.c +++ b/src/tools/pw-dot.c @@ -603,15 +603,15 @@ static const struct pw_module_events module_events = { .info = module_event_info }; -static void removed_proxy(void *user_data) +static void removed_proxy(void *data) { - struct global *g = user_data; + struct global *g = data; pw_proxy_destroy(g->proxy); } -static void destroy_proxy(void *user_data) +static void destroy_proxy(void *data) { - struct global *g = user_data; + struct global *g = data; spa_hook_remove(&g->object_listener); spa_hook_remove(&g->proxy_listener); } diff --git a/src/tools/pw-dump.c b/src/tools/pw-dump.c index d9999786c..31e6f1184 100644 --- a/src/tools/pw-dump.c +++ b/src/tools/pw-dump.c @@ -582,9 +582,9 @@ static void client_dump(struct object *o) put_end(d, "}", 0); } -static void client_event_info(void *object, const struct pw_client_info *info) +static void client_event_info(void *data, const struct pw_client_info *info) { - struct object *o = object; + struct object *o = data; int changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->id, info->change_mask); @@ -642,9 +642,9 @@ static void module_dump(struct object *o) put_end(d, "}", 0); } -static void module_event_info(void *object, const struct pw_module_info *info) +static void module_event_info(void *data, const struct pw_module_info *info) { - struct object *o = object; + struct object *o = data; int changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->id, info->change_mask); @@ -702,9 +702,9 @@ static void factory_dump(struct object *o) put_end(d, "}", 0); } -static void factory_event_info(void *object, const struct pw_factory_info *info) +static void factory_event_info(void *data, const struct pw_factory_info *info) { - struct object *o = object; + struct object *o = data; int changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->id, info->change_mask); @@ -761,9 +761,9 @@ static void device_dump(struct object *o) put_end(d, "}", 0); } -static void device_event_info(void *object, const struct pw_device_info *info) +static void device_event_info(void *data, const struct pw_device_info *info) { - struct object *o = object; + struct object *o = data; uint32_t i, changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->id, info->change_mask); @@ -796,11 +796,11 @@ static void device_event_info(void *object, const struct pw_device_info *info) } } -static void device_event_param(void *object, int seq, +static void device_event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct object *o = object; + struct object *o = data; add_param(&o->pending_list, id, param); } @@ -855,9 +855,9 @@ static void node_dump(struct object *o) put_end(d, "}", 0); } -static void node_event_info(void *object, const struct pw_node_info *info) +static void node_event_info(void *data, const struct pw_node_info *info) { - struct object *o = object; + struct object *o = data; uint32_t i, changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->id, info->change_mask); @@ -893,11 +893,11 @@ static void node_event_info(void *object, const struct pw_node_info *info) } } -static void node_event_param(void *object, int seq, +static void node_event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct object *o = object; + struct object *o = data; add_param(&o->pending_list, id, param); } @@ -944,9 +944,9 @@ static void port_dump(struct object *o) put_end(d, "}", 0); } -static void port_event_info(void *object, const struct pw_port_info *info) +static void port_event_info(void *data, const struct pw_port_info *info) { - struct object *o = object; + struct object *o = data; uint32_t i, changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->id, info->change_mask); @@ -979,11 +979,11 @@ static void port_event_info(void *object, const struct pw_port_info *info) } } -static void port_event_param(void *object, int seq, +static void port_event_param(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct object *o = object; + struct object *o = data; add_param(&o->pending_list, id, param); } @@ -1036,9 +1036,9 @@ static void link_dump(struct object *o) put_end(d, "}", 0); } -static void link_event_info(void *object, const struct pw_link_info *info) +static void link_event_info(void *data, const struct pw_link_info *info) { - struct object *o = object; + struct object *o = data; uint32_t changed = 0; pw_log_debug("object %p: id:%d change-mask:%08"PRIx64, o, o->id, info->change_mask); @@ -1163,13 +1163,13 @@ static struct metadata_entry *metadata_find(struct object *o, uint32_t subject, return NULL; } -static int metadata_property(void *object, +static int metadata_property(void *data, uint32_t subject, const char *key, const char *type, const char *value) { - struct object *o = object; + struct object *o = data; struct metadata_entry *e; while ((e = metadata_find(o, subject, key)) != NULL) { @@ -1332,9 +1332,9 @@ bind_failed: return; } -static void registry_event_global_remove(void *object, uint32_t id) +static void registry_event_global_remove(void *data, uint32_t id) { - struct data *d = object; + struct data *d = data; struct object *o; if ((o = find_object(d, id)) == NULL) diff --git a/src/tools/pw-link.c b/src/tools/pw-link.c index 232a364a8..155f48fe5 100644 --- a/src/tools/pw-link.c +++ b/src/tools/pw-link.c @@ -492,9 +492,9 @@ static void registry_event_global(void *data, uint32_t id, uint32_t permissions, } } -static void registry_event_global_remove(void *object, uint32_t id) +static void registry_event_global_remove(void *data, uint32_t id) { - struct data *d = object; + struct data *d = data; struct object *obj; if ((obj = find_object(d, OBJECT_ANY, id)) == NULL) diff --git a/src/tools/pw-mididump.c b/src/tools/pw-mididump.c index b3e38fd09..d6b803fa8 100644 --- a/src/tools/pw-mididump.c +++ b/src/tools/pw-mididump.c @@ -75,9 +75,9 @@ static int dump_file(const char *filename) return 0; } -static void on_process(void *userdata, struct spa_io_position *position) +static void on_process(void *_data, struct spa_io_position *position) { - struct data *data = userdata; + struct data *data = _data; struct pw_buffer *b; struct spa_buffer *buf; struct spa_data *d; diff --git a/src/tools/pw-mon.c b/src/tools/pw-mon.c index fe2060d83..f7e088c65 100644 --- a/src/tools/pw-mon.c +++ b/src/tools/pw-mon.c @@ -148,10 +148,10 @@ static void remove_params(struct proxy_data *data, uint32_t id, int seq) } } -static void event_param(void *object, int seq, uint32_t id, +static void event_param(void *_data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param) { - struct proxy_data *data = object; + struct proxy_data *data = _data; struct param *p; /* remove all params with the same id and older seq */ @@ -233,9 +233,9 @@ static void on_core_info(void *data, const struct pw_core_info *info) } } -static void module_event_info(void *object, const struct pw_module_info *info) +static void module_event_info(void *_data, const struct pw_module_info *info) { - struct proxy_data *data = object; + struct proxy_data *data = _data; bool print_all, print_mark; print_all = true; @@ -309,9 +309,9 @@ static void print_node(struct proxy_data *data) } } -static void node_event_info(void *object, const struct pw_node_info *info) +static void node_event_info(void *_data, const struct pw_node_info *info) { - struct proxy_data *data = object; + struct proxy_data *data = _data; uint32_t i; info = data->info = pw_node_info_update(data->info, info); @@ -368,9 +368,9 @@ static void print_port(struct proxy_data *data) } } -static void port_event_info(void *object, const struct pw_port_info *info) +static void port_event_info(void *_data, const struct pw_port_info *info) { - struct proxy_data *data = object; + struct proxy_data *data = _data; uint32_t i; info = data->info = pw_port_info_update(data->info, info); @@ -399,9 +399,9 @@ static const struct pw_port_events port_events = { .param = event_param }; -static void factory_event_info(void *object, const struct pw_factory_info *info) +static void factory_event_info(void *_data, const struct pw_factory_info *info) { - struct proxy_data *data = object; + struct proxy_data *data = _data; bool print_all, print_mark; print_all = true; @@ -433,9 +433,9 @@ static const struct pw_factory_events factory_events = { .info = factory_event_info }; -static void client_event_info(void *object, const struct pw_client_info *info) +static void client_event_info(void *_data, const struct pw_client_info *info) { - struct proxy_data *data = object; + struct proxy_data *data = _data; bool print_all, print_mark; print_all = true; @@ -465,9 +465,9 @@ static const struct pw_client_events client_events = { .info = client_event_info }; -static void link_event_info(void *object, const struct pw_link_info *info) +static void link_event_info(void *_data, const struct pw_link_info *info) { - struct proxy_data *data = object; + struct proxy_data *data = _data; bool print_all, print_mark; print_all = true; @@ -544,9 +544,9 @@ static void print_device(struct proxy_data *data) } -static void device_event_info(void *object, const struct pw_device_info *info) +static void device_event_info(void *_data, const struct pw_device_info *info) { - struct proxy_data *data = object; + struct proxy_data *data = _data; uint32_t i; info = data->info = pw_device_info_update(data->info, info); @@ -700,9 +700,9 @@ static struct proxy_data *find_proxy(struct data *d, uint32_t id) return NULL; } -static void registry_event_global_remove(void *object, uint32_t id) +static void registry_event_global_remove(void *data, uint32_t id) { - struct data *d = object; + struct data *d = data; struct proxy_data *pd; printf("removed:\n");