blob: ac94522ccddc01a50bc6b5501fc245372063d68c [file] [log] [blame]
pbos@webrtc.orgdc8c8832013-05-16 12:08: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_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_
11#define WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_
12
pbos@webrtc.org266d5f62013-05-29 11:34:32 +000013#include <stddef.h>
14
15#include "webrtc/video_engine/new_include/video_renderer.h"
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +000016
17namespace webrtc {
18namespace test {
19
20class VideoRenderer : public newapi::VideoRenderer {
21 public:
mflodman@webrtc.org9bacbf42013-05-27 15:52:38 +000022 // Creates a platform-specific renderer if possible, or a null implementation
23 // if failing.
24 static VideoRenderer* Create(const char* window_title, size_t width,
pbos@webrtc.org3d6a8bf2013-05-23 12:20:16 +000025 size_t height);
mflodman@webrtc.org9bacbf42013-05-27 15:52:38 +000026 // Returns a renderer rendering to a platform specific window if possible,
27 // NULL if none can be created.
28 // Creates a platform-specific renderer if possible, returns NULL if a
29 // platform renderer could not be created. This occurs, for instance, when
30 // running without an X environment on Linux.
31 static VideoRenderer* CreatePlatformRenderer(const char* window_title,
32 size_t width, size_t height);
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +000033 virtual ~VideoRenderer() {}
pbos@webrtc.orgd9f91852013-05-23 12:37:11 +000034 protected:
35 VideoRenderer() {}
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +000036};
pbos@webrtc.org8d671f52013-07-10 14:07:56 +000037} // namespace test
38} // namespace webrtc
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +000039
40#endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_