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, constraints, nullptr, nullptr, rtc::KT_DEFAULT, |
| 283 _observer.get()); |
283 _localStreams = [[NSMutableArray alloc] init]; | 284 _localStreams = [[NSMutableArray alloc] init]; |
284 } | 285 } |
285 return self; | 286 return self; |
286 } | 287 } |
287 | 288 |
288 - (instancetype)initWithFactory:(webrtc::PeerConnectionFactoryInterface *)factor
y | 289 - (instancetype)initWithFactory:(webrtc::PeerConnectionFactoryInterface *)factor
y |
289 config:(const webrtc::PeerConnectionInterface::RTCConfi
guration &)config | 290 config:(const webrtc::PeerConnectionInterface::RTCConfi
guration &)config |
290 constraints:(const webrtc::MediaConstraintsInterface *)const
raints | 291 constraints:(const webrtc::MediaConstraintsInterface *)const
raints |
291 delegate:(id<RTCPeerConnectionDelegate>)delegate { | 292 delegate:(id<RTCPeerConnectionDelegate>)delegate { |
292 NSParameterAssert(factory); | 293 NSParameterAssert(factory); |
293 if (self = [super init]) { | 294 if (self = [super init]) { |
294 _observer.reset(new webrtc::RTCPeerConnectionObserver(self)); | 295 _observer.reset(new webrtc::RTCPeerConnectionObserver(self)); |
295 _peerConnection = | 296 _peerConnection = |
296 factory->CreatePeerConnection(config, constraints, nullptr, nullptr, _ob
server.get()); | 297 factory->CreatePeerConnection(config, constraints, nullptr, nullptr, |
| 298 rtc::KT_DEFAULT, _observer.get()); |
297 _localStreams = [[NSMutableArray alloc] init]; | 299 _localStreams = [[NSMutableArray alloc] init]; |
298 _delegate = delegate; | 300 _delegate = delegate; |
299 } | 301 } |
300 return self; | 302 return self; |
301 } | 303 } |
302 | 304 |
303 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)peerConnection { | 305 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)peerConnection { |
304 return _peerConnection; | 306 return _peerConnection; |
305 } | 307 } |
306 | 308 |
307 @end | 309 @end |
OLD | NEW |