blob: c8623270a73ca46112ec61dfaaff1728bedfe8b9 [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
pbos@webrtc.orgb581c902013-10-28 16:32:01 +000015#include "webrtc/video_renderer.h"
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +000016
17namespace webrtc {
18namespace test {
pbos@webrtc.orgd8e92c92013-08-23 09:19:30 +000019class VideoRenderer : public webrtc::VideoRenderer {
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +000020 public:
mflodman@webrtc.org9bacbf42013-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.org3d6a8bf2013-05-23 12:20:16 +000024 size_t height);
mflodman@webrtc.org9bacbf42013-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.orgdc8c8832013-05-16 12:08:03 +000032 virtual ~VideoRenderer() {}
pbos@webrtc.orgd9f91852013-05-23 12:37:11 +000033 protected:
34 VideoRenderer() {}
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +000035};
pbos@webrtc.org8d671f52013-07-10 14:07:56 +000036} // namespace test
37} // namespace webrtc
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +000038
39#endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_