From d42a4490fb99c4de3794f5ae72c6eb49aeb17ef4 Mon Sep 17 00:00:00 2001 From: Rasmus Brandt Date: Tue, 16 Apr 2019 16:51:24 +0200 Subject: [PATCH] Reland "Add more adaptation text logs for VideoSendStream." This is a reland of d0298f4b161fe2afd4c6b334da31218c115a7eeb Original change's description: > Add more adaptation text logs for VideoSendStream. > > Tested: Manual tests in app. > Bug: None > Change-Id: I2739a23d37c05cbe1ba9be5c788d1c647265a895 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133186 > Reviewed-by: Niels Moller > Commit-Queue: Rasmus Brandt > Cr-Commit-Position: refs/heads/master@{#27644} Bug: None Change-Id: Ieb0b0a686e4e892ef154a63b796463f5fb95df77 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133172 Reviewed-by: Niels Moller Commit-Queue: Rasmus Brandt Cr-Commit-Position: refs/heads/master@{#27825} --- call/video_send_stream.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/call/video_send_stream.cc b/call/video_send_stream.cc index 8d3f62cb1f..fa2d4f2f8c 100644 --- a/call/video_send_stream.cc +++ b/call/video_send_stream.cc @@ -43,7 +43,7 @@ VideoSendStream::Stats::Stats() = default; VideoSendStream::Stats::~Stats() = default; std::string VideoSendStream::Stats::ToString(int64_t time_ms) const { - char buf[1024]; + char buf[2048]; rtc::SimpleStringBuilder ss(buf); ss << "VideoSendStream stats: " << time_ms << ", {"; ss << "input_fps: " << input_frame_rate << ", "; @@ -53,7 +53,15 @@ std::string VideoSendStream::Stats::ToString(int64_t time_ms) const { ss << "target_bps: " << target_media_bitrate_bps << ", "; ss << "media_bps: " << media_bitrate_bps << ", "; ss << "suspended: " << (suspended ? "true" : "false") << ", "; - ss << "bw_adapted: " << (bw_limited_resolution ? "true" : "false"); + ss << "bw_adapted_res: " << (bw_limited_resolution ? "true" : "false") + << ", "; + ss << "cpu_adapted_res: " << (cpu_limited_resolution ? "true" : "false") + << ", "; + ss << "bw_adapted_fps: " << (bw_limited_framerate ? "true" : "false") << ", "; + ss << "cpu_adapted_fps: " << (cpu_limited_framerate ? "true" : "false") + << ", "; + ss << "#cpu_adaptations: " << number_of_cpu_adapt_changes << ", "; + ss << "#quality_adaptations: " << number_of_quality_adapt_changes; ss << '}'; for (const auto& substream : substreams) { if (!substream.second.is_rtx && !substream.second.is_flexfec) {