Provide call audio diagnostics without consuming stats events

This commit is contained in:
evgeny committed 2026-10-15 02:44:35 +02:00
1 parent e53ea2e04a
commit f341d1db4b
2 files changed
+12

No files matched your search

+10
View File
@@ -557,6 +557,16 @@ int call_audio_get_clock(uint64_t call_id, int64_t now_us, struct call_clock_sna
return present ? 0 : -1;
}
int call_audio_get_diagnostics(uint64_t call_id, struct call_jitter_diagnostics* out) {
if (!out) { DEBUG_ERROR(DEBUG_CATEGORY_CALL, "call diagnostics: missing output"); return -1; }
memset(out, 0, sizeof(*out));
pthread_mutex_lock(&g_mtx);
int present = g_active && call_id == g_call_id && g_vj;
if (present) call_jitter_get_diagnostics(g_vj, out, 0);
pthread_mutex_unlock(&g_mtx);
return present ? 0 : -1;
}
/* ── uasync-поток: метрики ── */
int call_audio_get_stats(uint64_t call_id, int* buffer_ms, int* tempo_x100,
+2
View File
@@ -72,6 +72,8 @@ void call_audio_on_media(struct UTUN_INSTANCE* inst, uint64_t call_id,
void call_audio_playback_progress(uint64_t call_id, uint64_t epoch, uint64_t position,
int64_t at_us, int64_t now_us, int measured);
int call_audio_get_clock(uint64_t call_id, int64_t now_us, struct call_clock_snapshot* out);
/* Любой поток: диагностический снимок без потребления событий CALL_STATS. */
int call_audio_get_diagnostics(uint64_t call_id, struct call_jitter_diagnostics* out);
/* uasync-поток: метрики джиттер-буфера для CALL_STATS (dropped/underruns — необязательные). */
int call_audio_get_stats(uint64_t call_id, int* buffer_ms, int* tempo_x100,