mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
hook: separate spa_callbacks from the hook
Make a spa_callbacks with just the functions and data and use this in the hook and objects.
This commit is contained in:
parent
6ee192dff5
commit
448c1937ad
28 changed files with 97 additions and 84 deletions
|
|
@ -85,7 +85,7 @@ struct impl {
|
|||
struct props props;
|
||||
|
||||
struct spa_hook_list hooks;
|
||||
struct spa_hook callbacks;
|
||||
struct spa_callbacks callbacks;
|
||||
|
||||
struct spa_source timer_source;
|
||||
struct itimerspec timerspec;
|
||||
|
|
@ -393,7 +393,7 @@ impl_node_set_callbacks(struct spa_node *node,
|
|||
spa_log_error(this->log, "a data_loop is needed for async operation");
|
||||
return -EINVAL;
|
||||
}
|
||||
this->callbacks = SPA_HOOK_INIT(callbacks, data);
|
||||
this->callbacks = SPA_CALLBACKS_INIT(callbacks, data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ struct impl {
|
|||
struct props props;
|
||||
|
||||
struct spa_hook_list hooks;
|
||||
struct spa_hook callbacks;
|
||||
struct spa_callbacks callbacks;
|
||||
|
||||
struct spa_source timer_source;
|
||||
struct itimerspec timerspec;
|
||||
|
|
@ -407,7 +407,7 @@ impl_node_set_callbacks(struct spa_node *node,
|
|||
spa_log_error(this->log, "a data_loop is needed for async operation");
|
||||
return -EINVAL;
|
||||
}
|
||||
this->callbacks = SPA_HOOK_INIT(callbacks, data);
|
||||
this->callbacks = SPA_CALLBACKS_INIT(callbacks, data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue