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

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

Issue 862163004: Connect the BundlePolicy code in WebRTC to the BundlePolicy in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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 2075cdd00420e0abc7665b0f90ad5c72dfb309d2..f98c4eab3bbd9ff84266ff14b9bf5bdb8013ba6c 100644
--- a/content/renderer/media/peer_connection_tracker.cc
+++ b/content/renderer/media/peer_connection_tracker.cc
@@ -145,6 +145,25 @@ static std::string SerializeIceTransportType(
return transport_type;
}
+static std::string SerializeBundlePolicy(
+ webrtc::PeerConnectionInterface::BundlePolicy policy) {
+ string policy_str;
+ switch (policy) {
+ case webrtc::PeerConnectionInterface::kBundlePolicyBalanced:
+ policy_str = "balanced";
+ break;
+ case webrtc::PeerConnectionInterface::kBundlePolicyMaxBundle:
+ policy_str = "max-bundle";
+ break;
+ case webrtc::PeerConnectionInterface::kBundlePolicyMaxCompat:
+ policy_str = "max-compat";
+ break;
+ default:
+ NOTREACHED();
+ };
+ return policy_str;
+}
+
#define GET_STRING_OF_STATE(state) \
case WebRTCPeerConnectionHandlerClient::state: \
result = #state; \
@@ -339,7 +358,8 @@ void PeerConnectionTracker::RegisterPeerConnection(
info.lid = GetNextLocalID();
info.rtc_configuration =
"{ servers: " + SerializeServers(config.servers) + ", " +
- "iceTransportType: " + SerializeIceTransportType(config.type) + " }";
+ "iceTransportType: " + SerializeIceTransportType(config.type) + ", " +
+ "bundlePolicy: " + SerializeBundlePolicy(config.bundle_policy) + " }";
info.constraints = SerializeMediaConstraints(constraints);
info.url = frame->document().url().spec();
@@ -410,13 +430,17 @@ void PeerConnectionTracker::TrackUpdateIce(
string transport_type =
"iceTransportType: " + SerializeIceTransportType(config.type);
+ string bundle_policy =
+ "bundlePolicy: " + SerializeBundlePolicy(config.bundle_policy);
+
string constraints =
"constraints: {" + SerializeMediaConstraints(options) + "}";
SendPeerConnectionUpdate(
pc_handler,
"updateIce",
- servers_string + ", " + transport_type + ", " + constraints);
+ servers_string + ", " + transport_type + ", " +
+ bundle_policy + ", " + constraints);
}
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