Provide call audio diagnostics without consuming stats events
This commit is contained in:
1 parent
e53ea2e04a
commit
f341d1db4b
2 files changed
+12
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user