mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
cleanups
Remove signals. Rename callbacks -> events, use listeners to listen for events. Callbacks are still used in spa for things you can listen to only once.
This commit is contained in:
parent
b898eb46cd
commit
1b79419554
64 changed files with 779 additions and 880 deletions
|
|
@ -30,7 +30,6 @@
|
|||
#include <spa/lib/debug.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
#include <pipewire/sig.h>
|
||||
#include <pipewire/module.h>
|
||||
#include <pipewire/node-factory.h>
|
||||
|
||||
|
|
@ -67,7 +66,7 @@ struct data {
|
|||
struct pw_type *t;
|
||||
|
||||
struct pw_remote *remote;
|
||||
struct pw_callback_info remote_callbacks;
|
||||
struct pw_listener remote_listener;
|
||||
|
||||
struct pw_node *node;
|
||||
};
|
||||
|
|
@ -107,8 +106,8 @@ static void on_state_changed(void *_data, enum pw_remote_state old, enum pw_remo
|
|||
}
|
||||
}
|
||||
|
||||
static const struct pw_remote_callbacks remote_callbacks = {
|
||||
PW_VERSION_REMOTE_CALLBACKS,
|
||||
static const struct pw_remote_events remote_events = {
|
||||
PW_VERSION_REMOTE_EVENTS,
|
||||
.state_changed = on_state_changed,
|
||||
};
|
||||
|
||||
|
|
@ -130,7 +129,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
spa_debug_set_type_map(data.t->map);
|
||||
|
||||
pw_remote_add_callbacks(data.remote, &data.remote_callbacks, &remote_callbacks, &data);
|
||||
pw_remote_add_listener(data.remote, &data.remote_listener, &remote_events, &data);
|
||||
|
||||
pw_remote_connect(data.remote);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue