mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
Cleanups
Only pass data to callbacks. Rename some structs Provide methods to access structs
This commit is contained in:
parent
1b79419554
commit
0602d76b9e
57 changed files with 716 additions and 422 deletions
|
|
@ -63,10 +63,9 @@ static void inspect_item(struct data *data, struct spa_monitor_item *item)
|
|||
spa_debug_pod(&item->object.pod);
|
||||
}
|
||||
|
||||
static void on_monitor_event(struct spa_monitor *monitor,
|
||||
struct spa_event *event, void *user_data)
|
||||
static void on_monitor_event(void *_data, struct spa_event *event)
|
||||
{
|
||||
struct data *data = user_data;
|
||||
struct data *data = _data;
|
||||
|
||||
if (SPA_EVENT_TYPE(event) == data->type.monitor.Added) {
|
||||
fprintf(stderr, "added:\n");
|
||||
|
|
@ -102,7 +101,7 @@ static void do_remove_source(struct spa_source *source)
|
|||
|
||||
static const struct spa_monitor_callbacks impl_callbacks = {
|
||||
SPA_VERSION_MONITOR_CALLBACKS,
|
||||
on_monitor_event,
|
||||
.event = on_monitor_event,
|
||||
};
|
||||
|
||||
static void handle_monitor(struct data *data, struct spa_monitor *monitor)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue