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

Unified Diff: content/renderer/media/peer_connection_tracker.cc

Issue 2721163002: Add support for RTCConfiguration.iceCandidatePoolSize. (Closed)
Patch Set: Merge with master 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/peer_connection_tracker.cc
diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc
index bfa8b6f20d8b794629783f1807a1d70dda8e63be..49ff5c49bbee1c9a7b690b3f30b800f99ffe5bae 100644
--- a/content/renderer/media/peer_connection_tracker.cc
+++ b/content/renderer/media/peer_connection_tracker.cc
@@ -173,6 +173,19 @@ static const char* SerializeRtcpMuxPolicy(
return policy_str;
}
+static std::string SerializeConfiguration(
+ const webrtc::PeerConnectionInterface::RTCConfiguration& config) {
+ std::ostringstream oss;
+ // TODO(hbos): Add serialization of certificate.
+ oss << "{ iceServers: " << SerializeServers(config.servers) << ", "
+ << "iceTransportPolicy: " << SerializeIceTransportType(config.type)
+ << ", "
+ << "bundlePolicy: " << SerializeBundlePolicy(config.bundle_policy) << ", "
+ << "rtcpMuxPolicy: " << SerializeRtcpMuxPolicy(config.rtcp_mux_policy)
+ << "iceCandidatePoolSize: " << config.ice_candidate_pool_size << " }";
+ return oss.str();
+}
+
#define GET_STRING_OF_STATE(state) \
case WebRTCPeerConnectionHandlerClient::state: \
result = #state; \
@@ -428,11 +441,7 @@ void PeerConnectionTracker::RegisterPeerConnection(
PeerConnectionInfo info;
info.lid = GetNextLocalID();
- info.rtc_configuration =
- "{ iceServers: " + SerializeServers(config.servers) + ", " +
- "iceTransportPolicy: " + SerializeIceTransportType(config.type) + ", " +
- "bundlePolicy: " + SerializeBundlePolicy(config.bundle_policy) + ", " +
- "rtcpMuxPolicy: " + SerializeRtcpMuxPolicy(config.rtcp_mux_policy) + " }";
+ info.rtc_configuration = SerializeConfiguration(config);
info.constraints = SerializeMediaConstraints(constraints);
if (frame)
@@ -532,14 +541,8 @@ void PeerConnectionTracker::TrackSetConfiguration(
if (id == -1)
return;
- std::ostringstream result;
- result << "servers: " << SerializeServers(config.servers)
- << "iceTransportType: " << SerializeIceTransportType(config.type)
- << "bundlePolicy: " << SerializeBundlePolicy(config.bundle_policy)
- << "rtcpMuxPolicy: " << SerializeRtcpMuxPolicy(config.rtcp_mux_policy)
- << "}";
-
- SendPeerConnectionUpdate(id, "setConfiguration", result.str());
+ SendPeerConnectionUpdate(id, "setConfiguration",
+ SerializeConfiguration(config));
}
void PeerConnectionTracker::TrackAddIceCandidate(
« no previous file with comments | « no previous file | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698