1 /*
2  *  Copyright (c) 2019 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 #include "test/platform_video_capturer.h"
11 
12 #include "absl/memory/memory.h"
13 #if defined(WEBRTC_MAC)
14 #include "test/mac_capturer.h"
15 #else
16 #include "test/vcm_capturer.h"
17 #endif
18 
19 namespace webrtc {
20 namespace test {
21 
CreateVideoCapturer(size_t width,size_t height,size_t target_fps,size_t capture_device_index)22 std::unique_ptr<TestVideoCapturer> CreateVideoCapturer(
23     size_t width,
24     size_t height,
25     size_t target_fps,
26     size_t capture_device_index) {
27 #if defined(WEBRTC_MAC)
28   return absl::WrapUnique<TestVideoCapturer>(test::MacCapturer::Create(
29       width, height, target_fps, capture_device_index));
30 #else
31   return absl::WrapUnique<TestVideoCapturer>(test::VcmCapturer::Create(
32       width, height, target_fps, capture_device_index));
33 #endif
34 }
35 
36 }  // namespace test
37 }  // namespace webrtc
38