blob: 2ec9f86ed81d9e2e129e10f003e7a85854a967b5 [file] [log] [blame]
pbos@webrtc.org2f02da82013-07-09 08:02:33 +00001/*
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#ifndef WEBRTC_VIDEO_ENGINE_TEST_COMMON_FILE_CAPTURER_H_
11#define WEBRTC_VIDEO_ENGINE_TEST_COMMON_FILE_CAPTURER_H_
12
13#include <stdio.h>
14
15#include "webrtc/typedefs.h"
16#include "webrtc/video_engine/test/common/frame_generator.h"
17#include "webrtc/video_engine/test/common/video_capturer.h"
18
19namespace webrtc {
20
21class Clock;
22
pbos@webrtc.org2f02da82013-07-09 08:02:33 +000023class VideoSendStreamInput;
pbos@webrtc.org2f02da82013-07-09 08:02:33 +000024
25namespace test {
26
27class YuvFileFrameGenerator : public FrameGenerator {
28 public:
29 static YuvFileFrameGenerator* Create(const char* file_name,
30 size_t width,
31 size_t height,
32 Clock* clock);
33 virtual ~YuvFileFrameGenerator();
34
35 private:
36 YuvFileFrameGenerator(FILE* file, size_t width, size_t height, Clock* clock);
37 virtual void GenerateNextFrame() OVERRIDE;
38
39 FILE* file_;
40 size_t frame_size_;
41 uint8_t* frame_buffer_;
42};
43} // namespace test
44} // namespace webrtc
45
46#endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_CAPTURER_H_