OLD | NEW |
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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 observer, mediaStreamTrack.mediaTrack, nativeOutputLevel); | 268 observer, mediaStreamTrack.mediaTrack, nativeOutputLevel); |
269 } | 269 } |
270 | 270 |
271 @end | 271 @end |
272 | 272 |
273 @implementation RTCPeerConnection (Internal) | 273 @implementation RTCPeerConnection (Internal) |
274 | 274 |
275 - (instancetype)initWithFactory:(webrtc::PeerConnectionFactoryInterface*)factory | 275 - (instancetype)initWithFactory:(webrtc::PeerConnectionFactoryInterface*)factory |
276 iceServers:(const webrtc::PeerConnectionInterface::IceServers&)iceServers | 276 iceServers:(const webrtc::PeerConnectionInterface::IceServers&)iceServers |
277 constraints:(const webrtc::MediaConstraintsInterface*)constraints { | 277 constraints:(const webrtc::MediaConstraintsInterface*)constraints { |
278 NSParameterAssert(factory != NULL); | 278 NSParameterAssert(factory != nullptr); |
279 if (self = [super init]) { | 279 if (self = [super init]) { |
280 _observer.reset(new webrtc::RTCPeerConnectionObserver(self)); | 280 _observer.reset(new webrtc::RTCPeerConnectionObserver(self)); |
281 _peerConnection = factory->CreatePeerConnection( | 281 _peerConnection = factory->CreatePeerConnection( |
282 iceServers, constraints, NULL, NULL, _observer.get()); | 282 iceServers, |
| 283 constraints, |
| 284 nullptr, |
| 285 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface>(nullptr).Pass(), |
| 286 _observer.get()); |
283 _localStreams = [[NSMutableArray alloc] init]; | 287 _localStreams = [[NSMutableArray alloc] init]; |
284 } | 288 } |
285 return self; | 289 return self; |
286 } | 290 } |
287 | 291 |
288 - (instancetype)initWithFactory:(webrtc::PeerConnectionFactoryInterface *)factor
y | 292 - (instancetype)initWithFactory:(webrtc::PeerConnectionFactoryInterface *)factor
y |
289 config:(const webrtc::PeerConnectionInterface::RTCConfi
guration &)config | 293 config:(const webrtc::PeerConnectionInterface::RTCConfi
guration &)config |
290 constraints:(const webrtc::MediaConstraintsInterface *)const
raints | 294 constraints:(const webrtc::MediaConstraintsInterface *)const
raints |
291 delegate:(id<RTCPeerConnectionDelegate>)delegate { | 295 delegate:(id<RTCPeerConnectionDelegate>)delegate { |
292 NSParameterAssert(factory); | 296 NSParameterAssert(factory); |
293 if (self = [super init]) { | 297 if (self = [super init]) { |
294 _observer.reset(new webrtc::RTCPeerConnectionObserver(self)); | 298 _observer.reset(new webrtc::RTCPeerConnectionObserver(self)); |
295 _peerConnection = | 299 _peerConnection = |
296 factory->CreatePeerConnection(config, constraints, nullptr, nullptr, _ob
server.get()); | 300 factory->CreatePeerConnection( |
| 301 config, |
| 302 constraints, |
| 303 nullptr, |
| 304 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface>(nullptr).Pass(), |
| 305 _observer.get()); |
297 _localStreams = [[NSMutableArray alloc] init]; | 306 _localStreams = [[NSMutableArray alloc] init]; |
298 _delegate = delegate; | 307 _delegate = delegate; |
299 } | 308 } |
300 return self; | 309 return self; |
301 } | 310 } |
302 | 311 |
303 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)peerConnection { | 312 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)peerConnection { |
304 return _peerConnection; | 313 return _peerConnection; |
305 } | 314 } |
306 | 315 |
307 @end | 316 @end |
OLD | NEW |