mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
node: update the duration/rate from the target
Before scheduling the graph from the driver, update the duration and rate with the new targets.
This commit is contained in:
parent
1bdd5eee69
commit
6e8625cf96
13 changed files with 87 additions and 3 deletions
|
|
@ -345,6 +345,14 @@ static int read_timer(struct impl *this)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void update_target(struct impl *this)
|
||||
{
|
||||
if (this->position) {
|
||||
this->position->clock.duration = this->position->clock.target_duration;
|
||||
this->position->clock.rate = this->position->clock.target_rate;
|
||||
}
|
||||
}
|
||||
|
||||
static int make_buffer(struct impl *this)
|
||||
{
|
||||
struct buffer *b;
|
||||
|
|
@ -424,6 +432,8 @@ static void on_output(struct spa_source *source)
|
|||
struct impl *this = source->data;
|
||||
int res;
|
||||
|
||||
update_target(this);
|
||||
|
||||
res = make_buffer(this);
|
||||
|
||||
if (res == SPA_STATUS_HAVE_DATA)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue