mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-node: improve time and position reporting
This commit is contained in:
parent
2d34a405e8
commit
f5f1a435cc
1 changed files with 4 additions and 0 deletions
|
|
@ -152,6 +152,7 @@ struct impl {
|
|||
int other_fds[2];
|
||||
|
||||
struct pw_client_node_position *position;
|
||||
uint32_t next_position;
|
||||
};
|
||||
|
||||
/** \endcond */
|
||||
|
|
@ -905,8 +906,11 @@ static int impl_node_process(struct spa_node *node)
|
|||
|
||||
q = impl->this.node->driver_node->rt.quantum;
|
||||
|
||||
impl->position->nsec = q->time;
|
||||
impl->position->duration = q->size;
|
||||
impl->position->position = impl->next_position;
|
||||
impl->position->rate = q->rate;
|
||||
impl->next_position += q->size;
|
||||
|
||||
if (write(this->writefd, &cmd, 8) != 8)
|
||||
spa_log_warn(this->log, "node %p: error %s", this, strerror(errno));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue