mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 964127 - Add a/v sync telemetry. r=bwc
This commit is contained in:
parent
3c145fe9de
commit
2d93410cc1
@ -20,6 +20,7 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
#include "Latency.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#endif
|
||||
|
||||
#include "webrtc/voice_engine/include/voe_errors.h"
|
||||
@ -691,15 +692,27 @@ WebrtcAudioConduit::GetAudioFrame(int16_t speechData[],
|
||||
// Not #ifdef DEBUG or on a log module so we can use it for about:webrtc/etc
|
||||
mSamples += lengthSamples;
|
||||
if (mSamples >= mLastSyncLog + samplingFreqHz) {
|
||||
int jitter_buffer_delay_ms = 0;
|
||||
int playout_buffer_delay_ms = 0;
|
||||
int avsync_offset_ms = 0;
|
||||
GetAVStats(&jitter_buffer_delay_ms,
|
||||
&playout_buffer_delay_ms,
|
||||
&avsync_offset_ms); // ignore errors
|
||||
CSFLogError(logTag,
|
||||
"A/V sync: sync delta: %dms, audio jitter delay %dms, playout delay %dms",
|
||||
avsync_offset_ms, jitter_buffer_delay_ms, playout_buffer_delay_ms);
|
||||
int jitter_buffer_delay_ms;
|
||||
int playout_buffer_delay_ms;
|
||||
int avsync_offset_ms;
|
||||
if (GetAVStats(&jitter_buffer_delay_ms,
|
||||
&playout_buffer_delay_ms,
|
||||
&avsync_offset_ms)) {
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
if (avsync_offset_ms < 0) {
|
||||
Telemetry::Accumulate(Telemetry::WEBRTC_AVSYNC_WHEN_VIDEO_LAGS_AUDIO_MS,
|
||||
-avsync_offset_ms);
|
||||
} else {
|
||||
Telemetry::Accumulate(Telemetry::WEBRTC_AVSYNC_WHEN_AUDIO_LAGS_VIDEO_MS,
|
||||
avsync_offset_ms);
|
||||
}
|
||||
#endif
|
||||
CSFLogError(logTag,
|
||||
"A/V sync: sync delta: %dms, audio jitter delay %dms, playout delay %dms",
|
||||
avsync_offset_ms, jitter_buffer_delay_ms, playout_buffer_delay_ms);
|
||||
} else {
|
||||
CSFLogError(logTag, "A/V sync: GetAVStats failed");
|
||||
}
|
||||
mLastSyncLog = mSamples;
|
||||
}
|
||||
|
||||
|
@ -4976,6 +4976,20 @@
|
||||
"kind": "boolean",
|
||||
"description": "The number of failed ICE Connections (0) vs. number of successful ICE connections (1)."
|
||||
},
|
||||
"WEBRTC_AVSYNC_WHEN_AUDIO_LAGS_VIDEO_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": 60000,
|
||||
"n_buckets": 1000,
|
||||
"description": "The delay (in milliseconds) when audio is behind video. Zero delay is counted. Measured every second of a call."
|
||||
},
|
||||
"WEBRTC_AVSYNC_WHEN_VIDEO_LAGS_AUDIO_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": 60000,
|
||||
"n_buckets": 1000,
|
||||
"description": "The delay (in milliseconds) when video is behind audio. Zero delay is not counted. Measured every second of a call."
|
||||
},
|
||||
"WEBRTC_CALL_DURATION": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
|
Loading…
x
Reference in New Issue
Block a user