Cleanup argument names in methods and events interfaces: object/data, 2nd pass.

This commit is contained in:
Quentin Wenger 2022-04-16 22:38:38 +02:00 committed by Wim Taymans
parent 61594270f4
commit d2250e9d1c
3 changed files with 17 additions and 17 deletions

View file

@ -2497,11 +2497,11 @@ do { \
} \
} while(false);
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)
{
struct client *c = (struct client *) data;
struct client *c = (struct client *) object;
struct spa_thread *thr;
int res = 0;
@ -2533,17 +2533,17 @@ error:
}
static int impl_join(void *data,
static int impl_join(void *object,
struct spa_thread *thread, void **retval)
{
struct client *c = (struct client *) data;
struct client *c = (struct client *) object;
pw_log_info("join thread");
return spa_thread_utils_join(c->context.old_thread_utils, thread, retval);
}
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 client *c = (struct client *) data;
struct client *c = (struct client *) object;
return spa_thread_utils_acquire_rt(c->context.old_thread_utils, thread, priority);
}

View file

@ -42,16 +42,16 @@ static struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.aec.null");
#undef SPA_LOG_TOPIC_DEFAULT
#define SPA_LOG_TOPIC_DEFAULT &log_topic
static int null_init(void *data, const struct spa_dict *args, const struct spa_audio_info_raw *info)
static int null_init(void *object, const struct spa_dict *args, const struct spa_audio_info_raw *info)
{
struct impl *impl = data;
struct impl *impl = object;
impl->channels = info->channels;
return 0;
}
static int null_run(void *data, const float *rec[], const float *play[], float *out[], uint32_t n_samples)
static int null_run(void *object, const float *rec[], const float *play[], float *out[], uint32_t n_samples)
{
struct impl *impl = data;
struct impl *impl = object;
uint32_t i;
for (i = 0; i < impl->channels; i++)
memcpy(out[i], rec[i], n_samples * sizeof(float));

View file

@ -653,10 +653,10 @@ static void *custom_start(void *data)
return this->start(this->arg);
}
static struct spa_thread *impl_create(void *data, const struct spa_dict *props,
static struct spa_thread *impl_create(void *object, const struct spa_dict *props,
void *(*start_routine)(void*), void *arg)
{
struct impl *impl = data;
struct impl *impl = object;
struct thread *this;
int err;
@ -786,7 +786,7 @@ static const struct spa_thread_utils_methods impl_thread_utils = {
#else /* HAVE_DBUS */
static struct spa_thread *impl_create(void *data, const struct spa_dict *props,
static struct spa_thread *impl_create(void *object, const struct spa_dict *props,
void *(*start_routine)(void*), void *arg)
{
pthread_t pt;
@ -800,12 +800,12 @@ static struct spa_thread *impl_create(void *data, const struct spa_dict *props,
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)
{
return pthread_join((pthread_t)thread, 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)
@ -815,9 +815,9 @@ static int impl_get_rt_range(void *data, const struct spa_dict *props,
return 0;
}
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;
/* See the docstring on `spa_thread_utils_methods::acquire_rt` */
if (priority == -1) {