Index: webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm |
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm |
index 4f542a9fcc6e519e8c1eb945eab2e2ec6376ba4f..aab4119e026959300aeefd1250663f4dbcc026df 100644 |
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm |
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm |
@@ -21,6 +21,7 @@ |
#import "RTCVideoTrack+Private.h" |
#import "WebRTC/RTCLogging.h" |
+#include "objcvideotracksource.h" |
#include "videotoolboxvideocodecfactory.h" |
@implementation RTCPeerConnectionFactory { |
@@ -87,6 +88,13 @@ |
constraints:constraints]; |
} |
+- (RTCVideoSource *)newVideoSource { |
daniela-webrtc
2017/03/20 14:23:10
No need for the `new` prefix here. ARC will handle
magjed_webrtc
2017/03/27 12:35:11
Done.
|
+ rtc::scoped_refptr<webrtc::ObjcVideoTrackSource> objc_video_track_source( |
+ new rtc::RefCountedObject<webrtc::ObjcVideoTrackSource>()); |
+ return [[RTCVideoSource alloc] |
+ initWithNativeVideoSource:objc_video_track_source]; |
+} |
+ |
- (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source |
trackId:(NSString *)trackId { |
return [[RTCVideoTrack alloc] initWithFactory:self |