mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
node: add a cycle counter to the position
So that we can count the number of times the graph is scheduled.
This commit is contained in:
parent
f366167278
commit
0633be3c12
2 changed files with 5 additions and 3 deletions
|
|
@ -148,7 +148,7 @@ struct spa_io_clock {
|
||||||
uint64_t target_duration; /**< Target duration of next cycle */
|
uint64_t target_duration; /**< Target duration of next cycle */
|
||||||
uint32_t target_seq; /**< Seq counter. must be equal at start and
|
uint32_t target_seq; /**< Seq counter. must be equal at start and
|
||||||
* end of read and lower bit must be 0 */
|
* end of read and lower bit must be 0 */
|
||||||
uint32_t padding;
|
uint32_t cycle; /**< incremented each time the graph is started */
|
||||||
uint64_t xrun; /**< Estimated accumulated xrun duration */
|
uint64_t xrun; /**< Estimated accumulated xrun duration */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1907,11 +1907,12 @@ again:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a->status = PW_NODE_ACTIVATION_TRIGGERED;
|
|
||||||
a->prev_signal_time = a->signal_time;
|
a->prev_signal_time = a->signal_time;
|
||||||
a->signal_time = nsec;
|
|
||||||
node->driver_start = nsec;
|
node->driver_start = nsec;
|
||||||
|
|
||||||
|
a->status = PW_NODE_ACTIVATION_TRIGGERED;
|
||||||
|
a->signal_time = nsec;
|
||||||
|
|
||||||
a->sync_timeout = SPA_MIN(min_timeout, DEFAULT_SYNC_TIMEOUT);
|
a->sync_timeout = SPA_MIN(min_timeout, DEFAULT_SYNC_TIMEOUT);
|
||||||
|
|
||||||
if (SPA_UNLIKELY(reposition_target != NULL)) {
|
if (SPA_UNLIKELY(reposition_target != NULL)) {
|
||||||
|
|
@ -1925,6 +1926,7 @@ again:
|
||||||
update_position(node, all_ready, nsec);
|
update_position(node, all_ready, nsec);
|
||||||
|
|
||||||
pw_impl_node_rt_emit_start(node);
|
pw_impl_node_rt_emit_start(node);
|
||||||
|
a->position.clock.cycle++;
|
||||||
}
|
}
|
||||||
/* this should not happen, driver nodes that are not currently driving
|
/* this should not happen, driver nodes that are not currently driving
|
||||||
* should not emit the ready callback */
|
* should not emit the ready callback */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue