Trace stream startup decoding and presentation delays

This commit is contained in:
evgeny committed 2026-10-20 21:34:24 +02:00
1 parent f38aa3b08d
commit 1b036e4ea9
3 files changed
+90 -20

No files matched your search

+6 -2
View File
@@ -90,12 +90,16 @@ int stream_playback_clock_update(struct stream_playback_clock *c, int64_t now, i
.correction_us = c->correction_us, .stable_us = stable, .removable_us = removable,
.tempo_milli = c->tempo_milli, .waiting = c->waiting, .history_ready = complete};
if (!c->report_us || now - c->report_us >= 1000000) {
const char *reason = c->waiting ? "starved" : !complete ? "history" : stable < 60000000 ? "cooldown"
: removable <= braking ? "reserve" : "catchup";
DEBUG_DEBUG(DEBUG_CATEGORY_STREAM,
"playback reserve id=%llu pts=%lld ready=%lld reserve=%lld minimum=%lld correction=%lld "
"stable_ms=%lld history=%u tempo=%d pending_gain=%lld waiting=%d",
"stable_ms=%lld history=%u tempo=%d pending_gain=%lld waiting=%d "
"guard_us=%lld removable_us=%lld braking_us=%lld reason=%s",
(unsigned long long)c->id, (long long)position, (long long)ready, (long long)reserve,
(long long)minimum, (long long)c->correction_us, (long long)(stable / 1000), samples,
c->tempo_milli, (long long)pending_gain, c->waiting);
c->tempo_milli, (long long)pending_gain, c->waiting,
(long long)guard, (long long)removable, (long long)braking, reason);
c->report_us = now;
}
c->last_us = now; c->last_position_us = position; *state = result;