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

Unified Diff: talk/app/webrtc/objc/RTCPeerConnectionFactory.mm

Issue 1968393002: Propogate network-worker thread split to api (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase including nits Created 4 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 | webrtc/api/java/jni/peerconnection_jni.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
diff --git a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
index 6639797f16e0e10716509008e3463e8eb7bb0787..c156df74a5c7a47fcb1967517979df9b7754b8d5 100644
--- a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
+++ b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm
@@ -55,8 +55,9 @@
#include "webrtc/base/ssladapter.h"
@implementation RTCPeerConnectionFactory {
- std::unique_ptr<rtc::Thread> _signalingThread;
+ std::unique_ptr<rtc::Thread> _networkThread;
std::unique_ptr<rtc::Thread> _workerThread;
+ std::unique_ptr<rtc::Thread> _signalingThread;
}
@synthesize nativeFactory = _nativeFactory;
@@ -73,15 +74,21 @@
- (id)init {
if ((self = [super init])) {
- _signalingThread.reset(new rtc::Thread());
- BOOL result = _signalingThread->Start();
- NSAssert(result, @"Failed to start signaling thread.");
- _workerThread.reset(new rtc::Thread());
+ _networkThread = rtc::Thread::CreateWithSocketServer();
+ BOOL result = _networkThread->Start();
+ NSAssert(result, @"Failed to start network thread.");
+
+ _workerThread = rtc::Thread::Create();
result = _workerThread->Start();
NSAssert(result, @"Failed to start worker thread.");
+ _signalingThread = rtc::Thread::Create();
+ result = _signalingThread->Start();
+ NSAssert(result, @"Failed to start signaling thread.");
+
_nativeFactory = webrtc::CreatePeerConnectionFactory(
- _signalingThread.get(), _workerThread.get(), nullptr, nullptr, nullptr);
+ _networkThread.get(), _workerThread.get(), _signalingThread.get(),
+ nullptr, nullptr, nullptr);
NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!");
// Uncomment to get sensitive logs emitted (to stderr or logcat).
// rtc::LogMessage::LogToDebug(rtc::LS_SENSITIVE);
« no previous file with comments | « no previous file | webrtc/api/java/jni/peerconnection_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698