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

Side by Side Diff: webrtc/pc/channel.cc

Issue 2622553003: Provide better message for when RTCP mux "require" policy is triggered. (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | 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 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 SafeSetError("Failed to setup SRTP filter.", error_desc); 1176 SafeSetError("Failed to setup SRTP filter.", error_desc);
1177 return false; 1177 return false;
1178 } 1178 }
1179 return true; 1179 return true;
1180 } 1180 }
1181 1181
1182 bool BaseChannel::SetRtcpMux_n(bool enable, 1182 bool BaseChannel::SetRtcpMux_n(bool enable,
1183 ContentAction action, 1183 ContentAction action,
1184 ContentSource src, 1184 ContentSource src,
1185 std::string* error_desc) { 1185 std::string* error_desc) {
1186 // Provide a more specific error message for the RTCP mux "require" policy
1187 // case.
1188 if (rtcp_mux_required_ && !enable) {
1189 SafeSetError(
1190 "rtcpMuxPolicy is 'require', but media description does not "
1191 "contain 'a=rtcp-mux'.",
1192 error_desc);
1193 return false;
1194 }
1186 bool ret = false; 1195 bool ret = false;
1187 switch (action) { 1196 switch (action) {
1188 case CA_OFFER: 1197 case CA_OFFER:
1189 ret = rtcp_mux_filter_.SetOffer(enable, src); 1198 ret = rtcp_mux_filter_.SetOffer(enable, src);
1190 break; 1199 break;
1191 case CA_PRANSWER: 1200 case CA_PRANSWER:
1192 // This may activate RTCP muxing, but we don't yet destroy the channel 1201 // This may activate RTCP muxing, but we don't yet destroy the channel
1193 // because the final answer may deactivate it. 1202 // because the final answer may deactivate it.
1194 ret = rtcp_mux_filter_.SetProvisionalAnswer(enable, src); 1203 ret = rtcp_mux_filter_.SetProvisionalAnswer(enable, src);
1195 break; 1204 break;
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_READYTOSENDDATA, 2406 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_READYTOSENDDATA,
2398 new DataChannelReadyToSendMessageData(writable)); 2407 new DataChannelReadyToSendMessageData(writable));
2399 } 2408 }
2400 2409
2401 void RtpDataChannel::GetSrtpCryptoSuites_n( 2410 void RtpDataChannel::GetSrtpCryptoSuites_n(
2402 std::vector<int>* crypto_suites) const { 2411 std::vector<int>* crypto_suites) const {
2403 GetSupportedDataCryptoSuites(crypto_options(), crypto_suites); 2412 GetSupportedDataCryptoSuites(crypto_options(), crypto_suites);
2404 } 2413 }
2405 2414
2406 } // namespace cricket 2415 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698