Browse Source

Measure capture clock offset and video audio-barrier latency

master
evgeny 4 days ago
parent
commit
15e4fcb710
  1. 8
      src/call/call_video_transport.c
  2. 6
      tools/chatgui/src/call_video_engine.cpp

8
src/call/call_video_transport.c

@ -148,9 +148,13 @@ static void update_rate(struct call_video_transport *v) {
v->max_audio_ahead = v->tx[0].frame.pts_us - v->audio_end_pts;
if (now - v->report_us >= 1000000) {
DEBUG_DEBUG(DEBUG_CATEGORY_CALL,
"video TX flow call=%llu offered=%u accepted=%u audio_busy=%u transport_busy=%u key_wait=%u audio_ahead_us=%lld held=%d queue=%u bytes=%u",
"video TX flow call=%llu offered=%u accepted=%u audio_busy=%u transport_busy=%u key_wait=%u "
"audio_ahead_us=%lld held=%d queue=%u bytes=%u audio_age_us=%lld queue_age_us=%llu tail_ahead_us=%lld",
(unsigned long long)s->call_id, v->offered, v->accepted, v->held_busy, v->transport_busy, v->key_wait,
(long long)v->max_audio_ahead, held, v->tx_count, v->tx_bytes);
(long long)v->max_audio_ahead, held, v->tx_count, v->tx_bytes,
(long long)(v->audio_end_pts >= 0 ? (int64_t)now - v->audio_end_pts : 0),
(unsigned long long)(v->tx_count ? (get_time_tb() - v->tx[0].started_tb) * 100 : 0),
(long long)(v->tx_count && v->audio_end_pts >= 0 ? v->tx[v->tx_count - 1].frame.pts_us - v->audio_end_pts : 0));
v->report_us = now; v->offered = v->accepted = v->held_busy = v->transport_busy = v->key_wait = 0; v->max_audio_ahead = 0;
}
struct call_video_rate_sample sample = {0};

6
tools/chatgui/src/call_video_engine.cpp

@ -215,9 +215,11 @@ void CallVideoEngine::transmit() {
int64_t now = nowUs();
if (now - reportAt >= 1000000) {
DEBUG_DEBUG(DEBUG_CATEGORY_CALL,
"video capture flow call=%llu interval_us=%lld captured=%llu encoded=%u keys=%u send_busy=%u paced=%u encode_max_us=%lld",
"video capture flow call=%llu interval_us=%lld captured=%llu encoded=%u keys=%u send_busy=%u paced=%u "
"encode_max_us=%lld capture_age_us=%lld pts=%lld",
(unsigned long long)m->id, (long long)(now - reportAt), (unsigned long long)(captured - captureBase),
encodedCount, keyCount, sendBusy, paced, (long long)encodeMax);
encodedCount, keyCount, sendBusy, paced, (long long)encodeMax,
(long long)(pts >= 0 ? now - pts : 0), (long long)pts);
reportAt = now; captureBase = captured; encodedCount = keyCount = sendBusy = paced = 0; encodeMax = 0;
}
if (revision != userRevision) { userRevision = revision; excluded = 0; }

Loading…
Cancel
Save