Only pass data to callbacks.
Rename some structs
Provide methods to access structs
This commit is contained in:
Wim Taymans 2017-08-06 06:42:26 +02:00
parent 1b79419554
commit 0602d76b9e
57 changed files with 716 additions and 422 deletions

View file

@ -114,7 +114,7 @@ struct impl {
struct props props;
const struct spa_node_callbacks *callbacks;
void *user_data;
void *callbacks_data;
struct spa_source timer_source;
struct itimerspec timerspec;
@ -303,7 +303,7 @@ static void on_output(struct spa_source *source)
res = make_buffer(this);
if (res == SPA_RESULT_HAVE_BUFFER)
this->callbacks->have_output(&this->node, this->user_data);
this->callbacks->have_output(this->callbacks_data);
}
static int impl_node_send_command(struct spa_node *node, const struct spa_command *command)
@ -358,7 +358,7 @@ static int impl_node_send_command(struct spa_node *node, const struct spa_comman
static int
impl_node_set_callbacks(struct spa_node *node,
const struct spa_node_callbacks *callbacks,
void *user_data)
void *data)
{
struct impl *this;
@ -371,7 +371,7 @@ impl_node_set_callbacks(struct spa_node *node,
return SPA_RESULT_ERROR;
}
this->callbacks = callbacks;
this->user_data = user_data;
this->callbacks_data = data;
return SPA_RESULT_OK;
}