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

Unified Diff: webrtc/pc/channel.cc

Issue 2981013002: Introduce RtpTransportInternal and SrtpTransport. (Closed)
Patch Set: Depend on test:test_support for gmock. Created 3 years, 5 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 | « webrtc/pc/channel.h ('k') | webrtc/pc/rtptransport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channel.cc
diff --git a/webrtc/pc/channel.cc b/webrtc/pc/channel.cc
index f6568c3c18f0335dc1080f762ac22fdefa3a97f1..59f0869431ae59aef1e26b3dbc555b0c897e7e14 100644
--- a/webrtc/pc/channel.cc
+++ b/webrtc/pc/channel.cc
@@ -31,6 +31,8 @@
#include "webrtc/media/engine/webrtcvoiceengine.h" // nogncheck
#include "webrtc/p2p/base/packettransportinternal.h"
#include "webrtc/pc/channelmanager.h"
+#include "webrtc/pc/rtptransport.h"
+#include "webrtc/pc/srtptransport.h"
namespace cricket {
using rtc::Bind;
@@ -156,7 +158,11 @@ BaseChannel::BaseChannel(rtc::Thread* worker_thread,
signaling_thread_(signaling_thread),
content_name_(content_name),
rtcp_mux_required_(rtcp_mux_required),
- rtp_transport_(rtc::MakeUnique<webrtc::RtpTransport>(rtcp_mux_required)),
+ rtp_transport_(
+ srtp_required
+ ? rtc::WrapUnique<webrtc::RtpTransportInternal>(
+ new webrtc::SrtpTransport(rtcp_mux_required, content_name))
+ : rtc::MakeUnique<webrtc::RtpTransport>(rtcp_mux_required)),
srtp_required_(srtp_required),
media_channel_(media_channel),
selected_candidate_pair_(nullptr) {
@@ -170,7 +176,7 @@ BaseChannel::BaseChannel(rtc::Thread* worker_thread,
// with a callback interface later so that the demuxer can select which
// channel to signal.
rtp_transport_->SignalPacketReceived.connect(this,
- &BaseChannel::OnPacketReceived);
+ &BaseChannel::OnPacketReceived);
LOG(LS_INFO) << "Created channel for " << content_name;
}
« no previous file with comments | « webrtc/pc/channel.h ('k') | webrtc/pc/rtptransport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698