mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-30 05:05:27 +00:00
impl-node: set active_driver_id
This is the driver id that the client has received and is using right now. We don't use this yet but it could be used in the future to check if a client has the most up to date info.
This commit is contained in:
parent
3cbda26f07
commit
33f1a713cd
|
@ -2239,6 +2239,7 @@ static int client_node_set_io(void *data,
|
|||
c->position = ptr;
|
||||
c->driver_id = ptr ? c->position->clock.id : SPA_ID_INVALID;
|
||||
update_driver_activation(c);
|
||||
c->activation->active_driver_id = c->driver_id;
|
||||
queue_memmap_free(c, old);
|
||||
old = NULL;
|
||||
break;
|
||||
|
|
|
@ -767,6 +767,9 @@ int pw_impl_node_set_io(struct pw_impl_node *this, uint32_t id, void *data, size
|
|||
|
||||
res = spa_node_set_io(this->node, id, data, size);
|
||||
|
||||
if (res >= 0 && !SPA_RESULT_IS_ASYNC(res) && this->rt.position)
|
||||
this->rt.target.activation->active_driver_id = this->rt.position->clock.id;
|
||||
|
||||
pw_log_debug("%p: set io: %s", this, spa_strerror(res));
|
||||
|
||||
return res;
|
||||
|
|
|
@ -606,11 +606,11 @@ struct pw_node_activation {
|
|||
uint32_t segment_owner[16]; /* id of owners for each segment info struct.
|
||||
* nodes that want to update segment info need to
|
||||
* CAS their node id in this array. */
|
||||
uint32_t padding[11];
|
||||
uint32_t client_version;
|
||||
uint32_t server_version;
|
||||
uint32_t padding[11]; /* must be 0 */
|
||||
uint32_t client_version; /* verions of client, see above */
|
||||
uint32_t server_version; /* verions of server, see above */
|
||||
|
||||
uint32_t active_driver_id;
|
||||
uint32_t active_driver_id; /* driver active on client */
|
||||
uint32_t driver_id; /* the current node driver id */
|
||||
#define PW_NODE_ACTIVATION_FLAG_NONE 0
|
||||
#define PW_NODE_ACTIVATION_FLAG_PROFILER (1<<0) /* the profiler is running */
|
||||
|
|
Loading…
Reference in a new issue