commit | bf0874568cb8db2b9e4695b1268cf9148bb836df | [log] [tgz] |
---|---|---|
author | Jakob Ivarsson <jakobi@webrtc.org> | Thu Nov 11 12:43:49 2021 |
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Nov 12 09:24:34 2021 |
tree | 814f4e791e603d1f64b0459f795e961cc71453a4 | |
parent | 1d732434669202caac26db4af31d3dd6927cfdd4 [diff] [blame] |
Implement RTCOutboundRtpStreamStats.targetBitrate for audio. Spec: https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-targetbitrate Bug: webrtc:13377 Change-Id: I98dd263e0b9d6e2ca94969d2a91857b14cd65f70 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237402 Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Minyue Li <minyue@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35337}
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc index 7637c07..23e24dc 100644 --- a/pc/rtc_stats_collector.cc +++ b/pc/rtc_stats_collector.cc
@@ -536,6 +536,9 @@ outbound_audio); outbound_audio->media_type = "audio"; outbound_audio->kind = "audio"; + if (voice_sender_info.target_bitrate > 0) { + outbound_audio->target_bitrate = voice_sender_info.target_bitrate; + } if (voice_sender_info.codec_payload_type) { outbound_audio->codec_id = RTCCodecStatsIDFromMidDirectionAndPayload( mid, /*inbound=*/false, *voice_sender_info.codec_payload_type);