| 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 30 matching lines...) Expand all Loading... |
| 41 NSAssert(result, @"Failed to start signaling thread."); | 41 NSAssert(result, @"Failed to start signaling thread."); |
| 42 | 42 |
| 43 _nativeFactory = webrtc::CreatePeerConnectionFactory( | 43 _nativeFactory = webrtc::CreatePeerConnectionFactory( |
| 44 _networkThread.get(), _workerThread.get(), _signalingThread.get(), | 44 _networkThread.get(), _workerThread.get(), _signalingThread.get(), |
| 45 nullptr, nullptr, nullptr); | 45 nullptr, nullptr, nullptr); |
| 46 NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!"); | 46 NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!"); |
| 47 } | 47 } |
| 48 return self; | 48 return self; |
| 49 } | 49 } |
| 50 | 50 |
| 51 - (BOOL)startAecDumpWithFileDescriptor:(int)fileDescriptor |
| 52 maxFileSizeInBytes:(int)maxFileSizeInBytes { |
| 53 // Pass the file to the recorder. The file ownership |
| 54 // is passed to the recorder, and the recorder |
| 55 // closes the file when needed. |
| 56 return _nativeFactory->StartAecDump(fileDescriptor, maxFileSizeInBytes); |
| 57 } |
| 58 |
| 59 - (void)stopAecDump { |
| 60 // The file is closed by the call below. |
| 61 _nativeFactory->StopAecDump(); |
| 62 } |
| 63 |
| 51 - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints: | 64 - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints: |
| 52 (nullable RTCMediaConstraints *)constraints { | 65 (nullable RTCMediaConstraints *)constraints { |
| 53 return [[RTCAVFoundationVideoSource alloc] initWithFactory:self | 66 return [[RTCAVFoundationVideoSource alloc] initWithFactory:self |
| 54 constraints:constraints]; | 67 constraints:constraints]; |
| 55 } | 68 } |
| 56 | 69 |
| 57 - (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId { | 70 - (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId { |
| 58 return [[RTCAudioTrack alloc] initWithFactory:self | 71 return [[RTCAudioTrack alloc] initWithFactory:self |
| 59 trackId:trackId]; | 72 trackId:trackId]; |
| 60 } | 73 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 77 (RTCMediaConstraints *)constraints | 90 (RTCMediaConstraints *)constraints |
| 78 delegate: | 91 delegate: |
| 79 (nullable id<RTCPeerConnectionDelegate>)delegate { | 92 (nullable id<RTCPeerConnectionDelegate>)delegate { |
| 80 return [[RTCPeerConnection alloc] initWithFactory:self | 93 return [[RTCPeerConnection alloc] initWithFactory:self |
| 81 configuration:configuration | 94 configuration:configuration |
| 82 constraints:constraints | 95 constraints:constraints |
| 83 delegate:delegate]; | 96 delegate:delegate]; |
| 84 } | 97 } |
| 85 | 98 |
| 86 @end | 99 @end |
| OLD | NEW |