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

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

Issue 2923563002: Add field trial for balanced degradation preference. (Closed)
Patch Set: Created 3 years, 6 months 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 | webrtc/media/engine/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 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 // |this| acts like a VideoSource to make sure SinkWants are handled on the 1744 // |this| acts like a VideoSource to make sure SinkWants are handled on the
1745 // correct thread. 1745 // correct thread.
1746 DegradationPreference degradation_preference; 1746 DegradationPreference degradation_preference;
1747 if (!enable_cpu_overuse_detection_) { 1747 if (!enable_cpu_overuse_detection_) {
1748 degradation_preference = DegradationPreference::kDegradationDisabled; 1748 degradation_preference = DegradationPreference::kDegradationDisabled;
1749 } else { 1749 } else {
1750 if (parameters_.options.is_screencast.value_or(false)) { 1750 if (parameters_.options.is_screencast.value_or(false)) {
1751 degradation_preference = DegradationPreference::kMaintainResolution; 1751 degradation_preference = DegradationPreference::kMaintainResolution;
1752 } else { 1752 } else {
1753 degradation_preference = DegradationPreference::kMaintainFramerate; 1753 degradation_preference = DegradationPreference::kMaintainFramerate;
1754 if (webrtc::field_trial::IsEnabled("WebRTC-Video-BalancedDegradation"))
mflodman1 2017/06/13 09:23:19 WDYT of, to avoid more nested if statements: if (
åsapersson 2017/06/13 10:17:15 Done.
1755 degradation_preference = DegradationPreference::kBalanced;
1754 } 1756 }
1755 } 1757 }
1756 return degradation_preference; 1758 return degradation_preference;
1757 } 1759 }
1758 1760
1759 const std::vector<uint32_t>& 1761 const std::vector<uint32_t>&
1760 WebRtcVideoChannel2::WebRtcVideoSendStream::GetSsrcs() const { 1762 WebRtcVideoChannel2::WebRtcVideoSendStream::GetSsrcs() const {
1761 return ssrcs_; 1763 return ssrcs_;
1762 } 1764 }
1763 1765
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
2676 rtx_mapping[video_codecs[i].codec.id] != 2678 rtx_mapping[video_codecs[i].codec.id] !=
2677 ulpfec_config.red_payload_type) { 2679 ulpfec_config.red_payload_type) {
2678 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2680 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2679 } 2681 }
2680 } 2682 }
2681 2683
2682 return video_codecs; 2684 return video_codecs;
2683 } 2685 }
2684 2686
2685 } // namespace cricket 2687 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698