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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm

Issue 2745193002: iOS: Add new RTCVideoSource interface (Closed)
Patch Set: Address comments and clang-format Created 3 years, 8 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 * 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
11 #import "RTCPeerConnectionFactory+Private.h" 11 #import "RTCPeerConnectionFactory+Private.h"
12 12
13 #import "NSString+StdString.h" 13 #import "NSString+StdString.h"
14 #import "RTCAVFoundationVideoSource+Private.h" 14 #import "RTCAVFoundationVideoSource+Private.h"
15 #import "RTCAudioSource+Private.h" 15 #import "RTCAudioSource+Private.h"
16 #import "RTCAudioTrack+Private.h" 16 #import "RTCAudioTrack+Private.h"
17 #import "RTCMediaConstraints+Private.h" 17 #import "RTCMediaConstraints+Private.h"
18 #import "RTCMediaStream+Private.h" 18 #import "RTCMediaStream+Private.h"
19 #import "RTCPeerConnection+Private.h" 19 #import "RTCPeerConnection+Private.h"
20 #import "RTCVideoSource+Private.h" 20 #import "RTCVideoSource+Private.h"
21 #import "RTCVideoTrack+Private.h" 21 #import "RTCVideoTrack+Private.h"
22 #import "WebRTC/RTCLogging.h" 22 #import "WebRTC/RTCLogging.h"
23 23
24 #include "objcvideotracksource.h"
24 #include "videotoolboxvideocodecfactory.h" 25 #include "videotoolboxvideocodecfactory.h"
25 26
26 @implementation RTCPeerConnectionFactory { 27 @implementation RTCPeerConnectionFactory {
27 std::unique_ptr<rtc::Thread> _networkThread; 28 std::unique_ptr<rtc::Thread> _networkThread;
28 std::unique_ptr<rtc::Thread> _workerThread; 29 std::unique_ptr<rtc::Thread> _workerThread;
29 std::unique_ptr<rtc::Thread> _signalingThread; 30 std::unique_ptr<rtc::Thread> _signalingThread;
30 BOOL _hasStartedAecDump; 31 BOOL _hasStartedAecDump;
31 } 32 }
32 33
33 @synthesize nativeFactory = _nativeFactory; 34 @synthesize nativeFactory = _nativeFactory;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 source:source 81 source:source
81 trackId:trackId]; 82 trackId:trackId];
82 } 83 }
83 84
84 - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints: 85 - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints:
85 (nullable RTCMediaConstraints *)constraints { 86 (nullable RTCMediaConstraints *)constraints {
86 return [[RTCAVFoundationVideoSource alloc] initWithFactory:self 87 return [[RTCAVFoundationVideoSource alloc] initWithFactory:self
87 constraints:constraints]; 88 constraints:constraints];
88 } 89 }
89 90
91 - (RTCVideoSource *)videoSource {
92 rtc::scoped_refptr<webrtc::ObjcVideoTrackSource> objc_video_track_source(
tkchin_webrtc 2017/04/06 18:01:51 ObjC naming in ObjC methods, so camel case
magjed_webrtc 2017/04/10 12:12:50 Done.
93 new rtc::RefCountedObject<webrtc::ObjcVideoTrackSource>());
94 return [[RTCVideoSource alloc] initWithNativeVideoSource:objc_video_track_sour ce];
95 }
96
90 - (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source 97 - (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source
91 trackId:(NSString *)trackId { 98 trackId:(NSString *)trackId {
92 return [[RTCVideoTrack alloc] initWithFactory:self 99 return [[RTCVideoTrack alloc] initWithFactory:self
93 source:source 100 source:source
94 trackId:trackId]; 101 trackId:trackId];
95 } 102 }
96 103
97 - (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId { 104 - (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId {
98 return [[RTCMediaStream alloc] initWithFactory:self 105 return [[RTCMediaStream alloc] initWithFactory:self
99 streamId:streamId]; 106 streamId:streamId];
(...skipping 28 matching lines...) Expand all
128 _hasStartedAecDump = _nativeFactory->StartAecDump(fd, maxSizeInBytes); 135 _hasStartedAecDump = _nativeFactory->StartAecDump(fd, maxSizeInBytes);
129 return _hasStartedAecDump; 136 return _hasStartedAecDump;
130 } 137 }
131 138
132 - (void)stopAecDump { 139 - (void)stopAecDump {
133 _nativeFactory->StopAecDump(); 140 _nativeFactory->StopAecDump();
134 _hasStartedAecDump = NO; 141 _hasStartedAecDump = NO;
135 } 142 }
136 143
137 @end 144 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698