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

Side by Side Diff: talk/app/webrtc/objc/RTCPeerConnectionFactory.mm

Issue 1785353003: Replace scoped_ptr with unique_ptr in talk/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 13 matching lines...) Expand all
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #if !defined(__has_feature) || !__has_feature(objc_arc) 28 #if !defined(__has_feature) || !__has_feature(objc_arc)
29 #error "This file requires ARC support." 29 #error "This file requires ARC support."
30 #endif 30 #endif
31 31
32 #import "RTCPeerConnectionFactory+Internal.h" 32 #import "RTCPeerConnectionFactory+Internal.h"
33 33
34 #include <memory>
34 #include <vector> 35 #include <vector>
35 36
36 #import "RTCAudioTrack+Internal.h" 37 #import "RTCAudioTrack+Internal.h"
37 #import "RTCICEServer+Internal.h" 38 #import "RTCICEServer+Internal.h"
38 #import "RTCMediaConstraints+Internal.h" 39 #import "RTCMediaConstraints+Internal.h"
39 #import "RTCMediaSource+Internal.h" 40 #import "RTCMediaSource+Internal.h"
40 #import "RTCMediaStream+Internal.h" 41 #import "RTCMediaStream+Internal.h"
41 #import "RTCMediaStreamTrack+Internal.h" 42 #import "RTCMediaStreamTrack+Internal.h"
42 #import "RTCPeerConnection+Internal.h" 43 #import "RTCPeerConnection+Internal.h"
43 #import "RTCPeerConnectionDelegate.h" 44 #import "RTCPeerConnectionDelegate.h"
44 #import "RTCPeerConnectionInterface+Internal.h" 45 #import "RTCPeerConnectionInterface+Internal.h"
45 #import "RTCVideoCapturer+Internal.h" 46 #import "RTCVideoCapturer+Internal.h"
46 #import "RTCVideoSource+Internal.h" 47 #import "RTCVideoSource+Internal.h"
47 #import "RTCVideoTrack+Internal.h" 48 #import "RTCVideoTrack+Internal.h"
48 49
49 #include "webrtc/api/audiotrack.h" 50 #include "webrtc/api/audiotrack.h"
50 #include "webrtc/api/mediastreaminterface.h" 51 #include "webrtc/api/mediastreaminterface.h"
51 #include "webrtc/api/peerconnectioninterface.h" 52 #include "webrtc/api/peerconnectioninterface.h"
52 #include "webrtc/api/videosourceinterface.h" 53 #include "webrtc/api/videosourceinterface.h"
53 #include "webrtc/api/videotrack.h" 54 #include "webrtc/api/videotrack.h"
54 #include "webrtc/base/logging.h" 55 #include "webrtc/base/logging.h"
55 #include "webrtc/base/ssladapter.h" 56 #include "webrtc/base/ssladapter.h"
56 57
57 @implementation RTCPeerConnectionFactory { 58 @implementation RTCPeerConnectionFactory {
58 rtc::scoped_ptr<rtc::Thread> _signalingThread; 59 std::unique_ptr<rtc::Thread> _signalingThread;
59 rtc::scoped_ptr<rtc::Thread> _workerThread; 60 std::unique_ptr<rtc::Thread> _workerThread;
60 } 61 }
61 62
62 @synthesize nativeFactory = _nativeFactory; 63 @synthesize nativeFactory = _nativeFactory;
63 64
64 + (void)initializeSSL { 65 + (void)initializeSSL {
65 BOOL initialized = rtc::InitializeSSL(); 66 BOOL initialized = rtc::InitializeSSL();
66 NSAssert(initialized, @"Failed to initialize SSL library"); 67 NSAssert(initialized, @"Failed to initialize SSL library");
67 } 68 }
68 69
69 + (void)deinitializeSSL { 70 + (void)deinitializeSSL {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return [[RTCVideoTrack alloc] initWithMediaTrack:track]; 139 return [[RTCVideoTrack alloc] initWithMediaTrack:track];
139 } 140 }
140 141
141 - (RTCAudioTrack*)audioTrackWithID:(NSString*)audioId { 142 - (RTCAudioTrack*)audioTrackWithID:(NSString*)audioId {
142 rtc::scoped_refptr<webrtc::AudioTrackInterface> track = 143 rtc::scoped_refptr<webrtc::AudioTrackInterface> track =
143 self.nativeFactory->CreateAudioTrack([audioId UTF8String], NULL); 144 self.nativeFactory->CreateAudioTrack([audioId UTF8String], NULL);
144 return [[RTCAudioTrack alloc] initWithMediaTrack:track]; 145 return [[RTCAudioTrack alloc] initWithMediaTrack:track];
145 } 146 }
146 147
147 @end 148 @end
OLDNEW
« no previous file with comments | « talk/app/webrtc/objc/RTCPeerConnection.mm ('k') | talk/app/webrtc/objc/RTCPeerConnectionFactory+Internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698