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

Side by Side Diff: webrtc/test/video_capturer.cc

Issue 2348533002: Reland Replace interface VideoCapturerInput with VideoSinkInterface. (Closed)
Patch Set: Fix rtp timestamp in quality test. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/test/video_capturer.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2013 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 #include "webrtc/test/video_capturer.h"
12
13 #include "webrtc/test/testsupport/fileutils.h"
14 #include "webrtc/test/frame_generator_capturer.h"
15 #include "webrtc/test/vcm_capturer.h"
16
17 namespace webrtc {
18 namespace test {
19
20 class NullCapturer : public VideoCapturer {
21 public:
22 NullCapturer() : VideoCapturer(NULL) {}
23 virtual ~NullCapturer() {}
24
25 virtual void Start() {}
26 virtual void Stop() {}
27 };
28
29 VideoCapturer::VideoCapturer(VideoCaptureInput* input) : input_(input) {
30 }
31
32 VideoCapturer* VideoCapturer::Create(VideoCaptureInput* input,
33 size_t width,
34 size_t height,
35 int fps,
36 Clock* clock) {
37 VcmCapturer* vcm_capturer = VcmCapturer::Create(input, width, height, fps);
38
39 if (vcm_capturer != NULL) {
40 return vcm_capturer;
41 }
42 // TODO(pbos): Log a warning that this failed.
43
44 FrameGeneratorCapturer* frame_generator_capturer =
45 FrameGeneratorCapturer::Create(input, width, height, fps, clock);
46 if (frame_generator_capturer != NULL) {
47 return frame_generator_capturer;
48 }
49 // TODO(pbos): Log a warning that this failed.
50
51 return new NullCapturer();
52 }
53 } // test
54 } // webrtc
OLDNEW
« no previous file with comments | « webrtc/test/video_capturer.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698