mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 08:56:56 -05:00
Cleanup argument names in methods and events interfaces
First method argument is object, first event argument is data. Closes !963
This commit is contained in:
parent
d3ea3142e1
commit
22fc9eec35
55 changed files with 636 additions and 636 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue