Revert "Reland "Return audio stats regarless if we have a codec.""
This reverts commit 4334cdfc5c0619a5f06125ea1f039cb123ccf21e. Reason for revert: Breaks downstream project. Original change's description: > Reland "Return audio stats regarless if we have a codec." > > This is a reland of commit 7fff587a096c6ef40f5601f47ef50b221b3a4abf > > Original change's description: > > Return audio stats regarless if we have a codec. > > > > Bug: b/331602608 > > Change-Id: I2d12a3ed83645fe1e7cbd8950fd86d5ba2d7c94d > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361743 > > Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> > > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> > > Cr-Commit-Position: refs/heads/main@{#42964} > > Bug: b/331602608 > Change-Id: I95c89e7059005bc8dd8569ef41bfe9e863b4082f > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361762 > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> > Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#42969} Bug: b/331602608 Change-Id: Ifbe332a8749d024f603b75b6e787551dd6762dd6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363001 Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43059}
This commit is contained in:
parent
f566dee902
commit
64e8e64e80
@ -257,15 +257,13 @@ webrtc::AudioReceiveStreamInterface::Stats AudioReceiveStreamImpl::GetStats(
|
|||||||
|
|
||||||
webrtc::CallReceiveStatistics call_stats =
|
webrtc::CallReceiveStatistics call_stats =
|
||||||
channel_receive_->GetRTCPStatistics();
|
channel_receive_->GetRTCPStatistics();
|
||||||
|
// TODO(solenberg): Don't return here if we can't get the codec - return the
|
||||||
|
// stats we *can* get.
|
||||||
auto receive_codec = channel_receive_->GetReceiveCodec();
|
auto receive_codec = channel_receive_->GetReceiveCodec();
|
||||||
if (receive_codec) {
|
if (!receive_codec) {
|
||||||
stats.codec_name = receive_codec->second.name;
|
return stats;
|
||||||
stats.codec_payload_type = receive_codec->first;
|
|
||||||
int clockrate_khz = receive_codec->second.clockrate_hz / 1000;
|
|
||||||
if (clockrate_khz > 0) {
|
|
||||||
stats.jitter_ms = call_stats.jitterSamples / clockrate_khz;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stats.payload_bytes_received = call_stats.payload_bytes_received;
|
stats.payload_bytes_received = call_stats.payload_bytes_received;
|
||||||
stats.header_and_padding_bytes_received =
|
stats.header_and_padding_bytes_received =
|
||||||
call_stats.header_and_padding_bytes_received;
|
call_stats.header_and_padding_bytes_received;
|
||||||
@ -274,6 +272,12 @@ webrtc::AudioReceiveStreamInterface::Stats AudioReceiveStreamImpl::GetStats(
|
|||||||
stats.nacks_sent = call_stats.nacks_sent;
|
stats.nacks_sent = call_stats.nacks_sent;
|
||||||
stats.capture_start_ntp_time_ms = call_stats.capture_start_ntp_time_ms_;
|
stats.capture_start_ntp_time_ms = call_stats.capture_start_ntp_time_ms_;
|
||||||
stats.last_packet_received = call_stats.last_packet_received;
|
stats.last_packet_received = call_stats.last_packet_received;
|
||||||
|
stats.codec_name = receive_codec->second.name;
|
||||||
|
stats.codec_payload_type = receive_codec->first;
|
||||||
|
int clockrate_khz = receive_codec->second.clockrate_hz / 1000;
|
||||||
|
if (clockrate_khz > 0) {
|
||||||
|
stats.jitter_ms = call_stats.jitterSamples / clockrate_khz;
|
||||||
|
}
|
||||||
stats.delay_estimate_ms = channel_receive_->GetDelayEstimate();
|
stats.delay_estimate_ms = channel_receive_->GetDelayEstimate();
|
||||||
stats.audio_level = channel_receive_->GetSpeechOutputLevelFullRange();
|
stats.audio_level = channel_receive_->GetSpeechOutputLevelFullRange();
|
||||||
stats.total_output_energy = channel_receive_->GetTotalOutputEnergy();
|
stats.total_output_energy = channel_receive_->GetTotalOutputEnergy();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user