Index: webrtc/api/objc/RTCVideoSource.mm |
diff --git a/webrtc/api/objc/RTCVideoSource.mm b/webrtc/api/objc/RTCVideoSource.mm |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1449d204bb13c292cdc51fb6dc14632598fd78da |
--- /dev/null |
+++ b/webrtc/api/objc/RTCVideoSource.mm |
@@ -0,0 +1,43 @@ |
+/* |
+ * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#import "RTCVideoSource.h" |
+ |
+#import "webrtc/api/objc/RTCMediaSource+Private.h" |
+#import "webrtc/api/objc/RTCVideoSource+Private.h" |
+ |
+@implementation RTCVideoSource { |
+ rtc::scoped_refptr<webrtc::VideoSourceInterface> _nativeVideoSource; |
+} |
+ |
+- (NSString *)description { |
+ return [NSString stringWithFormat:@"RTCVideoSource:\n%@", |
+ [[self class] stringForState:self.state]]; |
+} |
+ |
+#pragma mark - Private |
+ |
+- (rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource { |
+ return _nativeVideoSource; |
+} |
+ |
+- (rtc::scoped_refptr<webrtc::VideoSourceInterface>)nativeVideoSource { |
+ return _nativeVideoSource; |
+} |
+ |
+- (instancetype)initWithNativeVideoSource: |
+ (rtc::scoped_refptr<webrtc::VideoSourceInterface>)nativeVideoSource { |
+ if (self = [super init]) { |
+ _nativeVideoSource = nativeVideoSource; |
+ } |
+ return self; |
+} |
+ |
+@end |