mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
bluez5: use position clock time
Use the position clock time and fall back to the monotonic time.
This commit is contained in:
parent
ebccd89ae1
commit
0cdcd04f77
1 changed files with 7 additions and 3 deletions
|
|
@ -1479,10 +1479,14 @@ static int impl_node_process(void *object)
|
||||||
}
|
}
|
||||||
if (!spa_list_is_empty(&port->ready)) {
|
if (!spa_list_is_empty(&port->ready)) {
|
||||||
if (this->following) {
|
if (this->following) {
|
||||||
|
if (this->position) {
|
||||||
|
this->current_time = this->position->clock.nsec;
|
||||||
|
} else {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
spa_system_clock_gettime(this->data_system, CLOCK_MONOTONIC, &now);
|
spa_system_clock_gettime(this->data_system, CLOCK_MONOTONIC, &now);
|
||||||
this->current_time = SPA_TIMESPEC_TO_NSEC(&now);
|
this->current_time = SPA_TIMESPEC_TO_NSEC(&now);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (this->need_flush)
|
if (this->need_flush)
|
||||||
reset_buffer(this);
|
reset_buffer(this);
|
||||||
flush_data(this, this->current_time);
|
flush_data(this, this->current_time);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue