blob: 1f0276f1892942cc858acfde83e13715bc097555 [file] [log] [blame]
Daniela012b56b2017-11-15 13:15:24 +01001/*
2 * Copyright 2017 The WebRTC Project Authors. All rights reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#import "ARDFileCaptureController.h"
12
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020013#import <WebRTC/RTCFileVideoCapturer.h>
Daniela012b56b2017-11-15 13:15:24 +010014
15@interface ARDFileCaptureController ()
16
17@property(nonatomic, strong) RTCFileVideoCapturer *fileCapturer;
18
19@end
20
21@implementation ARDFileCaptureController
22@synthesize fileCapturer = _fileCapturer;
23
24- (instancetype)initWithCapturer:(RTCFileVideoCapturer *)capturer {
25 if (self = [super init]) {
26 _fileCapturer = capturer;
27 }
28 return self;
29}
30
31- (void)startCapture {
32 [self startFileCapture];
33}
34
35- (void)startFileCapture {
36 [self.fileCapturer startCapturingFromFileNamed:@"foreman.mp4"
37 onError:^(NSError *_Nonnull error) {
38 NSLog(@"Error %@", error.userInfo);
39 }];
40}
41
42- (void)stopCapture {
43 [self.fileCapturer stopCapture];
44}
45@end