• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #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 
16 namespace webrtc {
17 namespace test {
18 
19 class FrameGenerator {
20  public:
FrameGenerator()21   FrameGenerator() {}
~FrameGenerator()22   virtual ~FrameGenerator() {}
23 
24   // Returns video frame that remains valid until next call.
25   virtual I420VideoFrame* NextFrame() = 0;
26 
27   static FrameGenerator* Create(size_t width, size_t height);
28   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_
36