2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
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.
10 #ifndef WEBRTC_VIDEO_ENGINE_TEST_COMMON_FRAME_GENERATOR_CAPTURER_H_
11 #define WEBRTC_VIDEO_ENGINE_TEST_COMMON_FRAME_GENERATOR_CAPTURER_H_
13 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
14 #include "webrtc/test/video_capturer.h"
15 #include "webrtc/typedefs.h"
19 class CriticalSectionWrapper;
27 class FrameGeneratorCapturer : public VideoCapturer {
29 static FrameGeneratorCapturer* Create(VideoSendStreamInput* input,
35 static FrameGeneratorCapturer* CreateFromYuvFile(VideoSendStreamInput* input,
36 const char* file_name,
41 virtual ~FrameGeneratorCapturer();
43 virtual void Start() OVERRIDE;
44 virtual void Stop() OVERRIDE;
46 int64_t first_frame_capture_time() const { return first_frame_capture_time_; }
49 FrameGeneratorCapturer(Clock* clock,
50 VideoSendStreamInput* input,
51 FrameGenerator* frame_generator,
55 static bool Run(void* obj);
60 scoped_ptr<EventWrapper> tick_;
61 scoped_ptr<CriticalSectionWrapper> lock_;
62 scoped_ptr<ThreadWrapper> thread_;
63 scoped_ptr<FrameGenerator> frame_generator_;
67 int64_t first_frame_capture_time_;
72 #endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_FRAME_GENERATOR_CAPTURER_H_