mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
jack: use core_proxy to listen for done messages
This commit is contained in:
parent
5de91e837e
commit
1687453636
1 changed files with 9 additions and 1 deletions
|
|
@ -221,6 +221,7 @@ struct client {
|
|||
struct spa_hook remote_listener;
|
||||
|
||||
struct pw_core_proxy *core_proxy;
|
||||
struct spa_hook core_listener;
|
||||
uint32_t last_sync;
|
||||
bool error;
|
||||
|
||||
|
|
@ -489,10 +490,14 @@ static void on_state_changed(void *data, enum pw_remote_state old,
|
|||
|
||||
static const struct pw_remote_events remote_events = {
|
||||
PW_VERSION_REMOTE_EVENTS,
|
||||
.sync_reply = on_sync_reply,
|
||||
.state_changed = on_state_changed,
|
||||
};
|
||||
|
||||
static const struct pw_core_proxy_events core_events = {
|
||||
PW_VERSION_CORE_EVENTS,
|
||||
.done = on_sync_reply,
|
||||
};
|
||||
|
||||
static int do_sync(struct client *client)
|
||||
{
|
||||
uint32_t seq = client->last_sync + 1;
|
||||
|
|
@ -1695,6 +1700,9 @@ jack_client_t * jack_client_open (const char *client_name,
|
|||
}
|
||||
}
|
||||
client->core_proxy = pw_remote_get_core_proxy(client->remote);
|
||||
pw_core_proxy_add_listener(client->core_proxy,
|
||||
&client->core_listener,
|
||||
&core_events, client);
|
||||
client->registry_proxy = pw_core_proxy_get_registry(client->core_proxy,
|
||||
PW_TYPE_INTERFACE_Registry,
|
||||
PW_VERSION_REGISTRY, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue