Expose jitter buffer stats

This commit is contained in:
Rashad Sookram 2023-06-08 10:13:26 -04:00 committed by GitHub
parent db3d421794
commit 3f71b5a8b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -60,6 +60,8 @@ typedef struct {
uint64_t bytes_received;
double jitter;
double total_audio_energy;
double jitter_buffer_delay;
uint64_t jitter_buffer_emitted_count;
} AudioReceiverStatistics;
typedef struct {

View file

@ -111,6 +111,8 @@ void StatsObserverRffi::OnStatsDelivered(const rtc::scoped_refptr<const RTCStats
audio_receiver.bytes_received = stat->bytes_received.ValueOrDefault(0);
audio_receiver.jitter = stat->jitter.ValueOrDefault(0.0);
audio_receiver.total_audio_energy = stat->total_audio_energy.ValueOrDefault(0.0);
audio_receiver.jitter_buffer_delay = stat->jitter_buffer_delay.ValueOrDefault(0.0);
audio_receiver.jitter_buffer_emitted_count = stat->jitter_buffer_emitted_count.ValueOrDefault(0);
this->audio_receiver_statistics_.push_back(audio_receiver);
} else if (*stat->kind == "video") {