OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 } | 197 } |
198 RTCPeerConnection* peer_connection = peer_connection_; | 198 RTCPeerConnection* peer_connection = peer_connection_; |
199 [peer_connection.delegate peerConnection:peer_connection | 199 [peer_connection.delegate peerConnection:peer_connection |
200 didRemoveIceCandidates:ice_candidates]; | 200 didRemoveIceCandidates:ice_candidates]; |
201 } | 201 } |
202 | 202 |
203 } // namespace webrtc | 203 } // namespace webrtc |
204 | 204 |
205 | 205 |
206 @implementation RTCPeerConnection { | 206 @implementation RTCPeerConnection { |
207 NSMutableArray *_localStreams; | 207 NSMutableArray<RTCMediaStream*>* _localStreams; |
208 std::unique_ptr<webrtc::PeerConnectionDelegateAdapter> _observer; | 208 std::unique_ptr<webrtc::PeerConnectionDelegateAdapter> _observer; |
209 rtc::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection; | 209 rtc::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection; |
210 BOOL _hasStartedRtcEventLog; | 210 BOOL _hasStartedRtcEventLog; |
211 } | 211 } |
212 | 212 |
213 @synthesize delegate = _delegate; | 213 @synthesize delegate = _delegate; |
214 | 214 |
215 - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory | 215 - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory |
216 configuration:(RTCConfiguration *)configuration | 216 configuration:(RTCConfiguration *)configuration |
217 constraints:(RTCMediaConstraints *)constraints | 217 constraints:(RTCMediaConstraints *)constraints |
(...skipping 16 matching lines...) Expand all Loading... | |
234 _observer.get()); | 234 _observer.get()); |
235 if (!_peerConnection) { | 235 if (!_peerConnection) { |
236 return nil; | 236 return nil; |
237 } | 237 } |
238 _localStreams = [[NSMutableArray alloc] init]; | 238 _localStreams = [[NSMutableArray alloc] init]; |
239 _delegate = delegate; | 239 _delegate = delegate; |
240 } | 240 } |
241 return self; | 241 return self; |
242 } | 242 } |
243 | 243 |
244 - (NSArray *)localStreams { | 244 - (NSArray<RTCMediaStream*>*)localStreams { |
tkchin_webrtc
2016/08/17 20:24:54
nit:
- (NSArray<RTCMediaStream *> *)localStreams
| |
245 return [_localStreams copy]; | 245 return [_localStreams copy]; |
246 } | 246 } |
247 | 247 |
248 - (RTCSessionDescription *)localDescription { | 248 - (RTCSessionDescription *)localDescription { |
249 const webrtc::SessionDescriptionInterface *description = | 249 const webrtc::SessionDescriptionInterface *description = |
250 _peerConnection->local_description(); | 250 _peerConnection->local_description(); |
251 return description ? | 251 return description ? |
252 [[RTCSessionDescription alloc] initWithNativeDescription:description] | 252 [[RTCSessionDescription alloc] initWithNativeDescription:description] |
253 : nil; | 253 : nil; |
254 } | 254 } |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
583 case RTCStatsOutputLevelDebug: | 583 case RTCStatsOutputLevelDebug: |
584 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; | 584 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; |
585 } | 585 } |
586 } | 586 } |
587 | 587 |
588 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { | 588 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { |
589 return _peerConnection; | 589 return _peerConnection; |
590 } | 590 } |
591 | 591 |
592 @end | 592 @end |
OLD | NEW |