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

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

Issue 2046863004: Add AVFoundation video capture support to Mac objc SDK (based on iOS) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated BUILD.gn to match gyp Created 4 years, 6 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
« no previous file with comments | « webrtc/sdk/BUILD.gn ('k') | webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #if defined(WEBRTC_IOS)
15 #import "RTCAVFoundationVideoSource+Private.h" 14 #import "RTCAVFoundationVideoSource+Private.h"
16 #endif
17 #import "RTCAudioTrack+Private.h" 15 #import "RTCAudioTrack+Private.h"
18 #import "RTCMediaStream+Private.h" 16 #import "RTCMediaStream+Private.h"
19 #import "RTCPeerConnection+Private.h" 17 #import "RTCPeerConnection+Private.h"
20 #import "RTCVideoSource+Private.h" 18 #import "RTCVideoSource+Private.h"
21 #import "RTCVideoTrack+Private.h" 19 #import "RTCVideoTrack+Private.h"
22 20
23 #include <memory> 21 #include <memory>
24 22
25 @implementation RTCPeerConnectionFactory { 23 @implementation RTCPeerConnectionFactory {
26 std::unique_ptr<rtc::Thread> _networkThread; 24 std::unique_ptr<rtc::Thread> _networkThread;
(...skipping 20 matching lines...) Expand all
47 _nativeFactory = webrtc::CreatePeerConnectionFactory( 45 _nativeFactory = webrtc::CreatePeerConnectionFactory(
48 _networkThread.get(), _workerThread.get(), _signalingThread.get(), 46 _networkThread.get(), _workerThread.get(), _signalingThread.get(),
49 nullptr, nullptr, nullptr); 47 nullptr, nullptr, nullptr);
50 NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!"); 48 NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!");
51 } 49 }
52 return self; 50 return self;
53 } 51 }
54 52
55 - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints: 53 - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints:
56 (nullable RTCMediaConstraints *)constraints { 54 (nullable RTCMediaConstraints *)constraints {
57 #if defined(WEBRTC_IOS)
58 return [[RTCAVFoundationVideoSource alloc] initWithFactory:self 55 return [[RTCAVFoundationVideoSource alloc] initWithFactory:self
59 constraints:constraints]; 56 constraints:constraints];
60 #else
61 return nil;
62 #endif
63 } 57 }
64 58
65 - (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId { 59 - (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId {
66 return [[RTCAudioTrack alloc] initWithFactory:self 60 return [[RTCAudioTrack alloc] initWithFactory:self
67 trackId:trackId]; 61 trackId:trackId];
68 } 62 }
69 63
70 - (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source 64 - (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source
71 trackId:(NSString *)trackId { 65 trackId:(NSString *)trackId {
72 return [[RTCVideoTrack alloc] initWithFactory:self 66 return [[RTCVideoTrack alloc] initWithFactory:self
(...skipping 12 matching lines...) Expand all
85 (RTCMediaConstraints *)constraints 79 (RTCMediaConstraints *)constraints
86 delegate: 80 delegate:
87 (nullable id<RTCPeerConnectionDelegate>)delegate { 81 (nullable id<RTCPeerConnectionDelegate>)delegate {
88 return [[RTCPeerConnection alloc] initWithFactory:self 82 return [[RTCPeerConnection alloc] initWithFactory:self
89 configuration:configuration 83 configuration:configuration
90 constraints:constraints 84 constraints:constraints
91 delegate:delegate]; 85 delegate:delegate];
92 } 86 }
93 87
94 @end 88 @end
OLDNEW
« no previous file with comments | « webrtc/sdk/BUILD.gn ('k') | webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698