blob: a9baf4453608370d18767552346daba98a9bc183 [file] [log] [blame]
pbos@webrtc.org2a9108f2013-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.org4988d942013-05-29 11:34:32 +000013#include <stddef.h>
14
15#include "webrtc/video_engine/new_include/video_renderer.h"
pbos@webrtc.org2a9108f2013-05-16 12:08:03 +000016
17namespace webrtc {
18namespace test {
pbos@webrtc.orgc1797062013-08-23 09:19:30 +000019class VideoRenderer : public webrtc::VideoRenderer {
pbos@webrtc.org2a9108f2013-05-16 12:08:03 +000020 public:
mflodman@webrtc.orga93cbbf2013-05-27 15:52:38 +000021 // Creates a platform-specific renderer if possible, or a null implementation
22 // if failing.
23 static VideoRenderer* Create(const char* window_title, size_t width,
pbos@webrtc.org074eb202013-05-23 12:20:16 +000024 size_t height);
mflodman@webrtc.orga93cbbf2013-05-27 15:52:38 +000025 // Returns a renderer rendering to a platform specific window if possible,
26 // NULL if none can be created.
27 // Creates a platform-specific renderer if possible, returns NULL if a
28 // platform renderer could not be created. This occurs, for instance, when
29 // running without an X environment on Linux.
30 static VideoRenderer* CreatePlatformRenderer(const char* window_title,
31 size_t width, size_t height);
pbos@webrtc.org2a9108f2013-05-16 12:08:03 +000032 virtual ~VideoRenderer() {}
pbos@webrtc.org08f3ca92013-05-23 12:37:11 +000033 protected:
34 VideoRenderer() {}
pbos@webrtc.org2a9108f2013-05-16 12:08:03 +000035};
pbos@webrtc.org778a1722013-07-10 14:07:56 +000036} // namespace test
37} // namespace webrtc
pbos@webrtc.org2a9108f2013-05-16 12:08:03 +000038
39#endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_