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

Side by Side Diff: webrtc/api/objc/RTCPeerConnectionFactory.mm

Issue 1558473002: Update API for Objective-C RTCPeerConnectionFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Update against master Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #import "RTCPeerConnectionFactory.h"
12
13 #import "webrtc/api/objc/RTCPeerConnectionFactory+Private.h"
14
15 @implementation RTCPeerConnectionFactory {
16 rtc::scoped_ptr<rtc::Thread> _signalingThread;
17 rtc::scoped_ptr<rtc::Thread> _workerThread;
18 }
19
20 @synthesize nativeFactory = _nativeFactory;
21
22 - (instancetype)init {
23 if ((self = [super init])) {
24 _signalingThread.reset(new rtc::Thread());
25 BOOL result = _signalingThread->Start();
26 NSAssert(result, @"Failed to start signaling thread.");
27 _workerThread.reset(new rtc::Thread());
28 result = _workerThread->Start();
29 NSAssert(result, @"Failed to start worker thread.");
30
31 _nativeFactory = webrtc::CreatePeerConnectionFactory(
32 _workerThread.get(), _signalingThread.get(), nullptr, nullptr, nullptr);
33 NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!");
34 }
35 return self;
36 }
37
38 @end
OLDNEW
« no previous file with comments | « webrtc/api/objc/RTCPeerConnectionFactory.h ('k') | webrtc/api/objc/RTCPeerConnectionFactory+Private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698