blob: 6a00e8803b3ee1c8ef06077128197a53714da020 [file] [log] [blame]
pbos@webrtc.org29d58392013-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 */
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020010#ifndef TEST_VIDEO_RENDERER_H_
11#define TEST_VIDEO_RENDERER_H_
pbos@webrtc.org29d58392013-05-16 12:08:03 +000012
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +000013#include <stddef.h>
14
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020015#include "media/base/videosinkinterface.h"
pbos@webrtc.org29d58392013-05-16 12:08:03 +000016
17namespace webrtc {
nisse7ade7b32016-03-23 04:48:10 -070018class VideoFrame;
19
pbos@webrtc.org29d58392013-05-16 12:08:03 +000020namespace test {
nisse7ade7b32016-03-23 04:48:10 -070021class VideoRenderer : public rtc::VideoSinkInterface<VideoFrame> {
pbos@webrtc.org29d58392013-05-16 12:08:03 +000022 public:
mflodman@webrtc.org7f944f32013-05-27 15:52:38 +000023 // Creates a platform-specific renderer if possible, or a null implementation
24 // if failing.
25 static VideoRenderer* Create(const char* window_title, size_t width,
pbos@webrtc.org771cdcb2013-05-23 12:20:16 +000026 size_t height);
mflodman@webrtc.org7f944f32013-05-27 15:52:38 +000027 // Returns a renderer rendering to a platform specific window if possible,
28 // NULL if none can be created.
29 // Creates a platform-specific renderer if possible, returns NULL if a
30 // platform renderer could not be created. This occurs, for instance, when
31 // running without an X environment on Linux.
32 static VideoRenderer* CreatePlatformRenderer(const char* window_title,
33 size_t width, size_t height);
pbos@webrtc.org29d58392013-05-16 12:08:03 +000034 virtual ~VideoRenderer() {}
pbos@webrtc.org9b303482013-05-23 12:37:11 +000035 protected:
36 VideoRenderer() {}
pbos@webrtc.org29d58392013-05-16 12:08:03 +000037};
pbos@webrtc.orgadf23a52013-07-10 14:07:56 +000038} // namespace test
39} // namespace webrtc
pbos@webrtc.org29d58392013-05-16 12:08:03 +000040
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020041#endif // TEST_VIDEO_RENDERER_H_