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

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

Issue 1845673002: Removing `preference` field from `cricket::Codec`. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 750
751 // Handle send codec. 751 // Handle send codec.
752 const std::vector<VideoCodecSettings> supported_codecs = 752 const std::vector<VideoCodecSettings> supported_codecs =
753 FilterSupportedCodecs(MapCodecs(params.codecs)); 753 FilterSupportedCodecs(MapCodecs(params.codecs));
754 754
755 if (supported_codecs.empty()) { 755 if (supported_codecs.empty()) {
756 LOG(LS_ERROR) << "No video codecs supported."; 756 LOG(LS_ERROR) << "No video codecs supported.";
757 return false; 757 return false;
758 } 758 }
759 759
760 if (!send_codec_ || supported_codecs.front() != *send_codec_) { 760 VideoCodecSettings new_codec = supported_codecs.front();
761 changed_params->codec = 761 // Preference doesn't matter at this point and shouldn't impact comparison.
762 rtc::Optional<VideoCodecSettings>(supported_codecs.front()); 762 new_codec.codec.preference = 0;
pbos-webrtc 2016/04/04 07:58:58 Can we change VideoCodecSettings instead to not co
763 if (!send_codec_ || new_codec != *send_codec_) {
764 changed_params->codec = rtc::Optional<VideoCodecSettings>(new_codec);
763 } 765 }
764 766
765 // Handle RTP header extensions. 767 // Handle RTP header extensions.
766 std::vector<webrtc::RtpExtension> filtered_extensions = FilterRtpExtensions( 768 std::vector<webrtc::RtpExtension> filtered_extensions = FilterRtpExtensions(
767 params.extensions, webrtc::RtpExtension::IsSupportedForVideo, true); 769 params.extensions, webrtc::RtpExtension::IsSupportedForVideo, true);
768 if (send_rtp_extensions_ != filtered_extensions) { 770 if (send_rtp_extensions_ != filtered_extensions) {
769 changed_params->rtp_header_extensions = 771 changed_params->rtp_header_extensions =
770 rtc::Optional<std::vector<webrtc::RtpExtension>>(filtered_extensions); 772 rtc::Optional<std::vector<webrtc::RtpExtension>>(filtered_extensions);
771 } 773 }
772 774
(...skipping 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 rtx_mapping[video_codecs[i].codec.id] != 2595 rtx_mapping[video_codecs[i].codec.id] !=
2594 fec_settings.red_payload_type) { 2596 fec_settings.red_payload_type) {
2595 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2597 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2596 } 2598 }
2597 } 2599 }
2598 2600
2599 return video_codecs; 2601 return video_codecs;
2600 } 2602 }
2601 2603
2602 } // namespace cricket 2604 } // 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