aboutsummaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
authorByoungchan Lee <daniel.l@hpcnt.com>2022-09-22 19:50:00 +0900
committerWebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-22 12:37:30 +0000
commit636dc3d208eaedd5d0e7c2457bb7dda5fec6acc7 (patch)
treec32ddec76bc1e5d879fb88f1eac9d9f957943a4a /media
parent6a49fb2d5ffde0b22cb05793d67c8e2bbe1b1be9 (diff)
downloadwebrtc-636dc3d208eaedd5d0e7c2457bb7dda5fec6acc7.tar.gz
Implement RTCOutboundRtpStreamStats.targetBitrate for video
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-targetbitrate Bug: webrtc:13394 Change-Id: I4749b38088a24d1a775137d5fe2c65f96effd185 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276380 Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com> Commit-Queue: Henrik Boström <hbos@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38170}
Diffstat (limited to 'media')
-rw-r--r--media/base/media_channel.h2
-rw-r--r--media/engine/webrtc_video_engine.cc1
2 files changed, 2 insertions, 1 deletions
diff --git a/media/base/media_channel.h b/media/base/media_channel.h
index 57b488479b..986cb26261 100644
--- a/media/base/media_channel.h
+++ b/media/base/media_channel.h
@@ -391,7 +391,7 @@ struct MediaSenderInfo {
// https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-nackcount
uint32_t nacks_rcvd = 0;
// https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-targetbitrate
- double target_bitrate = 0.0;
+ absl::optional<double> target_bitrate;
int packets_lost = 0;
float fraction_lost = 0.0f;
int64_t rtt_ms = 0;
diff --git a/media/engine/webrtc_video_engine.cc b/media/engine/webrtc_video_engine.cc
index dc404dc13f..5651f5944c 100644
--- a/media/engine/webrtc_video_engine.cc
+++ b/media/engine/webrtc_video_engine.cc
@@ -2656,6 +2656,7 @@ WebRtcVideoChannel::WebRtcVideoSendStream::GetPerLayerVideoSenderInfos(
common_info.quality_limitation_resolution_changes =
stats.quality_limitation_resolution_changes;
common_info.encoder_implementation_name = stats.encoder_implementation_name;
+ common_info.target_bitrate = stats.target_media_bitrate_bps;
common_info.ssrc_groups = ssrc_groups_;
common_info.frames = stats.frames;
common_info.framerate_input = stats.input_frame_rate;