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

Unified Diff: webrtc/api/webrtcsession.cc

Issue 1888903003: Network thread (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 8 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/api/webrtcsession.h ('k') | webrtc/api/webrtcsession_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/webrtcsession.cc
diff --git a/webrtc/api/webrtcsession.cc b/webrtc/api/webrtcsession.cc
index 9f84840822fce12c4c9012b568e10c0b3b4e651b..3e5ef08314ed89e9a8e71c3e2c2887eed254b1a4 100644
--- a/webrtc/api/webrtcsession.cc
+++ b/webrtc/api/webrtcsession.cc
@@ -472,6 +472,7 @@ bool CheckForRemoteIceRestart(const SessionDescriptionInterface* old_desc,
WebRtcSession::WebRtcSession(webrtc::MediaControllerInterface* media_controller,
rtc::Thread* signaling_thread,
rtc::Thread* worker_thread,
+ rtc::Thread* network_thread,
cricket::PortAllocator* port_allocator)
: signaling_thread_(signaling_thread),
worker_thread_(worker_thread),
@@ -481,7 +482,7 @@ WebRtcSession::WebRtcSession(webrtc::MediaControllerInterface* media_controller,
// Due to this constraint session id |sid_| is max limited to LLONG_MAX.
sid_(rtc::ToString(rtc::CreateRandomId64() & LLONG_MAX)),
transport_controller_(new cricket::TransportController(signaling_thread,
- worker_thread,
+ network_thread,
port_allocator)),
media_controller_(media_controller),
channel_manager_(media_controller_->channel_manager()),
@@ -1798,7 +1799,7 @@ bool WebRtcSession::CreateVoiceChannel(const cricket::ContentInfo* content) {
SignalVoiceChannelCreated();
voice_channel_->transport_channel()->SignalSentPacket.connect(
- this, &WebRtcSession::OnSentPacket_w);
+ this, &WebRtcSession::OnSentPacket_n);
return true;
}
@@ -1815,7 +1816,7 @@ bool WebRtcSession::CreateVideoChannel(const cricket::ContentInfo* content) {
SignalVideoChannelCreated();
video_channel_->transport_channel()->SignalSentPacket.connect(
- this, &WebRtcSession::OnSentPacket_w);
+ this, &WebRtcSession::OnSentPacket_n);
return true;
}
@@ -1837,7 +1838,7 @@ bool WebRtcSession::CreateDataChannel(const cricket::ContentInfo* content) {
SignalDataChannelCreated();
data_channel_->transport_channel()->SignalSentPacket.connect(
- this, &WebRtcSession::OnSentPacket_w);
+ this, &WebRtcSession::OnSentPacket_n);
return true;
}
@@ -2155,10 +2156,9 @@ void WebRtcSession::ReportNegotiatedCiphers(
}
}
-void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
+void WebRtcSession::OnSentPacket_n(cricket::TransportChannel* channel,
const rtc::SentPacket& sent_packet) {
- RTC_DCHECK(worker_thread()->IsCurrent());
- media_controller_->call_w()->OnSentPacket(sent_packet);
+ media_controller_->call()->OnSentPacket(sent_packet);
}
} // namespace webrtc
« no previous file with comments | « webrtc/api/webrtcsession.h ('k') | webrtc/api/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698