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

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

Issue 2761143002: Support encrypted RTP extensions (RFC 6904) (Closed)
Patch Set: Various changes based on feedback from Peter and Taylor. Created 3 years, 9 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
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // specified in a different order (also allows us to use std::unique below). 168 // specified in a different order (also allows us to use std::unique below).
169 std::sort(result.begin(), result.end(), 169 std::sort(result.begin(), result.end(),
170 [](const webrtc::RtpExtension& rhs, 170 [](const webrtc::RtpExtension& rhs,
171 const webrtc::RtpExtension& lhs) { return rhs.uri < lhs.uri; }); 171 const webrtc::RtpExtension& lhs) { return rhs.uri < lhs.uri; });
172 172
173 // Remove unnecessary extensions (used on send side). 173 // Remove unnecessary extensions (used on send side).
174 if (filter_redundant_extensions) { 174 if (filter_redundant_extensions) {
175 auto it = std::unique( 175 auto it = std::unique(
176 result.begin(), result.end(), 176 result.begin(), result.end(),
177 [](const webrtc::RtpExtension& rhs, const webrtc::RtpExtension& lhs) { 177 [](const webrtc::RtpExtension& rhs, const webrtc::RtpExtension& lhs) {
178 return rhs.uri == lhs.uri; 178 return rhs.uri == lhs.uri && rhs.encrypt == lhs.encrypt;
179 }); 179 });
180 result.erase(it, result.end()); 180 result.erase(it, result.end());
181 181
182 // Keep just the highest priority extension of any in the following list. 182 // Keep just the highest priority extension of any in the following list.
183 static const char* kBweExtensionPriorities[] = { 183 static const char* kBweExtensionPriorities[] = {
184 webrtc::RtpExtension::kTransportSequenceNumberUri, 184 webrtc::RtpExtension::kTransportSequenceNumberUri,
185 webrtc::RtpExtension::kAbsSendTimeUri, 185 webrtc::RtpExtension::kAbsSendTimeUri,
186 webrtc::RtpExtension::kTimestampOffsetUri}; 186 webrtc::RtpExtension::kTimestampOffsetUri};
187 DiscardRedundantExtensions(&result, kBweExtensionPriorities); 187 DiscardRedundantExtensions(&result, kBweExtensionPriorities);
188 } 188 }
(...skipping 20 matching lines...) Expand all
209 } 209 }
210 if (codec.GetParam(kCodecParamMaxBitrate, &bitrate_kbps) && 210 if (codec.GetParam(kCodecParamMaxBitrate, &bitrate_kbps) &&
211 bitrate_kbps > 0) { 211 bitrate_kbps > 0) {
212 config.max_bitrate_bps = bitrate_kbps * 1000; 212 config.max_bitrate_bps = bitrate_kbps * 1000;
213 } else { 213 } else {
214 config.max_bitrate_bps = -1; 214 config.max_bitrate_bps = -1;
215 } 215 }
216 return config; 216 return config;
217 } 217 }
218 } // namespace cricket 218 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698