Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1502173002: Wire up bandwidth limitation info to GetStats and adapt_reason. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 &last_captured_frame_format); 2149 &last_captured_frame_format);
2150 info.input_frame_width = last_captured_frame_format.width; 2150 info.input_frame_width = last_captured_frame_format.width;
2151 info.input_frame_height = last_captured_frame_format.height; 2151 info.input_frame_height = last_captured_frame_format.height;
2152 } 2152 }
2153 if (capturer_->video_adapter() != nullptr) { 2153 if (capturer_->video_adapter() != nullptr) {
2154 info.adapt_changes += capturer_->video_adapter()->adaptation_changes(); 2154 info.adapt_changes += capturer_->video_adapter()->adaptation_changes();
2155 info.adapt_reason = capturer_->video_adapter()->adapt_reason(); 2155 info.adapt_reason = capturer_->video_adapter()->adapt_reason();
2156 } 2156 }
2157 } 2157 }
2158 } 2158 }
2159
2160 // Get bandwidth limitation info from stream_->GetStats().
2161 // Input resolution (output from video_adapter) can be further scaled down or
2162 // higher video layer(s) can be dropped due to bitrate constraints.
2163 // Note, adapt_changes only include changes from the video_adapter.
2164 if (stats.bw_limited_resolution)
2165 info.adapt_reason = CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH;
stefan-webrtc 2015/12/07 16:02:33 Now this may overwrite any reason written on line
åsapersson 2015/12/08 08:58:25 The video_adapter shows the most limiting reason (
åsapersson 2015/12/11 14:39:38 Have changed so BW is added (and does not overwrit
2166
2159 info.ssrc_groups = ssrc_groups_; 2167 info.ssrc_groups = ssrc_groups_;
2160 info.framerate_input = stats.input_frame_rate; 2168 info.framerate_input = stats.input_frame_rate;
2161 info.framerate_sent = stats.encode_frame_rate; 2169 info.framerate_sent = stats.encode_frame_rate;
2162 info.avg_encode_ms = stats.avg_encode_time_ms; 2170 info.avg_encode_ms = stats.avg_encode_time_ms;
2163 info.encode_usage_percent = stats.encode_usage_percent; 2171 info.encode_usage_percent = stats.encode_usage_percent;
2164 2172
2165 info.nominal_bitrate = stats.media_bitrate_bps; 2173 info.nominal_bitrate = stats.media_bitrate_bps;
2166 2174
2167 info.send_frame_width = 0; 2175 info.send_frame_width = 0;
2168 info.send_frame_height = 0; 2176 info.send_frame_height = 0;
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2691 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2684 } 2692 }
2685 } 2693 }
2686 2694
2687 return video_codecs; 2695 return video_codecs;
2688 } 2696 }
2689 2697
2690 } // namespace cricket 2698 } // namespace cricket
2691 2699
2692 #endif // HAVE_WEBRTC_VIDEO 2700 #endif // HAVE_WEBRTC_VIDEO
OLDNEW
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698