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

Side by Side Diff: Source/modules/mediastream/RTCPeerConnection.cpp

Issue 1116253004: Add RtcpMuxPolicy to PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (bundlePolicyString == "max-compat") { 122 if (bundlePolicyString == "max-compat") {
123 bundlePolicy = RTCBundlePolicyMaxCompat; 123 bundlePolicy = RTCBundlePolicyMaxCompat;
124 } else if (bundlePolicyString == "max-bundle") { 124 } else if (bundlePolicyString == "max-bundle") {
125 bundlePolicy = RTCBundlePolicyMaxBundle; 125 bundlePolicy = RTCBundlePolicyMaxBundle;
126 } else if (bundlePolicyString != "balanced") { 126 } else if (bundlePolicyString != "balanced") {
127 exceptionState.throwTypeError("Malformed RTCBundlePolicy"); 127 exceptionState.throwTypeError("Malformed RTCBundlePolicy");
128 return 0; 128 return 0;
129 } 129 }
130 } 130 }
131 131
132 RTCRtcpMuxPolicy rtcpMuxPolicy = RTCRtcpMuxPolicyRequire;
tommi (sloooow) - chröme 2015/05/22 15:46:10 Shouldn't this be initialized to WebRTCRtcpMuxPoli
pthatcher2 2015/05/22 15:55:27 Yes, thank you for noticing that. That could have
133 String rtcpMuxPolicyString;
134 if (DictionaryHelper::get(configuration, "rtcpMuxPolicy", rtcpMuxPolicyStrin g)) {
135 if (rtcpMuxPolicyString == "require") {
136 rtcpMuxPolicy = RTCRtcpMuxPolicyRequire;
137 } else if (rtcpMuxPolicyString != "negotiate") {
138 exceptionState.throwTypeError("Malformed RTCRtcpMuxPolicy");
139 return 0;
140 }
141 }
142
132 RTCConfiguration* rtcConfiguration = RTCConfiguration::create(); 143 RTCConfiguration* rtcConfiguration = RTCConfiguration::create();
133 rtcConfiguration->setIceTransports(iceTransports); 144 rtcConfiguration->setIceTransports(iceTransports);
134 rtcConfiguration->setBundlePolicy(bundlePolicy); 145 rtcConfiguration->setBundlePolicy(bundlePolicy);
146 rtcConfiguration->setRtcpMuxPolicy(rtcpMuxPolicy);
135 147
136 for (size_t i = 0; i < numberOfServers; ++i) { 148 for (size_t i = 0; i < numberOfServers; ++i) {
137 Dictionary iceServer; 149 Dictionary iceServer;
138 ok = iceServers.get(i, iceServer); 150 ok = iceServers.get(i, iceServer);
139 if (!ok) { 151 if (!ok) {
140 exceptionState.throwTypeError("Malformed RTCIceServer"); 152 exceptionState.throwTypeError("Malformed RTCIceServer");
141 return 0; 153 return 0;
142 } 154 }
143 155
144 Vector<String> names; 156 Vector<String> names;
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 visitor->trace(m_remoteStreams); 837 visitor->trace(m_remoteStreams);
826 visitor->trace(m_dataChannels); 838 visitor->trace(m_dataChannels);
827 #if ENABLE(OILPAN) 839 #if ENABLE(OILPAN)
828 visitor->trace(m_scheduledEvents); 840 visitor->trace(m_scheduledEvents);
829 #endif 841 #endif
830 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac e(visitor); 842 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac e(visitor);
831 ActiveDOMObject::trace(visitor); 843 ActiveDOMObject::trace(visitor);
832 } 844 }
833 845
834 } // namespace blink 846 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt ('k') | Source/platform/exported/WebRTCConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698