blob: fe10612fb5c3f2fb96c36ccad088e81b56fe26ed [file] [log] [blame]
andresp@webrtc.org28631e72013-09-19 12:14:03 +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_COMMON_VIDEO_TEST_FRAME_GENERATOR_H_
11#define WEBRTC_COMMON_VIDEO_TEST_FRAME_GENERATOR_H_
12
13#include "webrtc/common_video/interface/i420_video_frame.h"
14#include "webrtc/typedefs.h"
15
16namespace webrtc {
17namespace test {
18
19class FrameGenerator {
20 public:
21 FrameGenerator() {}
22 virtual ~FrameGenerator() {}
23
24 // Returns video frame that remains valid until next call.
pbos@webrtc.orgc33d37c2013-12-11 16:26:16 +000025 virtual I420VideoFrame* NextFrame() = 0;
andresp@webrtc.org28631e72013-09-19 12:14:03 +000026
pbos@webrtc.orge2c52d72013-10-15 09:15:47 +000027 static FrameGenerator* Create(size_t width, size_t height);
andresp@webrtc.org28631e72013-09-19 12:14:03 +000028 static FrameGenerator* CreateFromYuvFile(const char* file,
29 size_t width,
30 size_t height);
31};
32} // namespace test
33} // namespace webrtc
34
35#endif // WEBRTC_COMMON_VIDEO_TEST_FRAME_GENERATOR_H_