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:
Wim Taymans 2019-05-15 12:17:52 +02:00
parent 6ee192dff5
commit 448c1937ad
28 changed files with 97 additions and 84 deletions

View file

@ -51,7 +51,7 @@ struct impl {
struct spa_log *log;
struct spa_loop *main_loop;
struct spa_hook callbacks;
struct spa_callbacks callbacks;
struct udev *udev;
struct udev_monitor *umonitor;
@ -377,7 +377,7 @@ impl_monitor_set_callbacks(struct spa_monitor *monitor,
this = SPA_CONTAINER_OF(monitor, struct impl, monitor);
this->callbacks = SPA_HOOK_INIT(callbacks, data);
this->callbacks = SPA_CALLBACKS_INIT(callbacks, data);
if (callbacks) {
if ((res = impl_udev_open(this)) < 0)