Add AVFoundation video capture support to Mac objc SDK (based on iOS)

The AppRTCDemo app on Mac OSX does not show or send local video streams,
as ACFoundation capture session is not compiled in or implemented in
the appropriate places.  This is the first part of a two-part patch
that implements local capture on the Mac for AppRTCDemo

P.S. This is my first patch to WebRTC.   I didn't see any relevant tests, but I could write some if you can point me at a location. Also, I don't have access to the automated tests (I don't think)

BUG=webrtc:3417

Review-Url: https://codereview.webrtc.org/2046863004
Cr-Commit-Position: refs/heads/master@{#13080}
This commit is contained in:
adam.fedor
2016-06-08 17:24:37 -07:00
committed by Commit bot
parent f2a1c89241
commit fc22e03eb8
4 changed files with 47 additions and 19 deletions

View File

@ -11,9 +11,7 @@
#import "RTCPeerConnectionFactory+Private.h"
#import "NSString+StdString.h"
#if defined(WEBRTC_IOS)
#import "RTCAVFoundationVideoSource+Private.h"
#endif
#import "RTCAudioTrack+Private.h"
#import "RTCMediaStream+Private.h"
#import "RTCPeerConnection+Private.h"
@ -54,12 +52,8 @@
- (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints:
(nullable RTCMediaConstraints *)constraints {
#if defined(WEBRTC_IOS)
return [[RTCAVFoundationVideoSource alloc] initWithFactory:self
constraints:constraints];
#else
return nil;
#endif
}
- (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId {