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

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm

Issue 2745193002: iOS: Add new RTCVideoSource interface (Closed)
Patch Set: Naming convention and remove unnecessary code. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698