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

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

Issue 15120009: Pass the sctp command-line flag to Libjingle as an internal-only constraint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_peer_connection_handler.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index 30707cac02a2f3df08cf80fd2f40687182daf9b8..ab2ebcc1affb64e43e52964950a6113164edf363 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -8,10 +8,12 @@
#include <utility>
#include <vector>
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/utf_string_conversions.h"
+#include "content/public/common/content_switches.h"
#include "content/renderer/media/media_stream_dependency_factory.h"
#include "content/renderer/media/peer_connection_tracker.h"
#include "content/renderer/media/remote_media_stream_impl.h"
@@ -346,6 +348,15 @@ bool RTCPeerConnectionHandler::initialize(
GetNativeIceServers(server_configuration, &servers);
RTCMediaConstraints constraints(options);
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableSCTPDataChannels)) {
+ // TODO(jiayl): replace the hard coded string with
+ // webrtc::MediaConstraintsInterface::kEnableSctpDataChannels when
+ // the Libjingle change is rolled.
+ constraints.AddOptional("internalSctpDataChannels", "true");
+ }
+
native_peer_connection_ =
dependency_factory_->CreatePeerConnection(
servers, &constraints, frame_, this);
« 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