blob: 9e580f6f59859c18d54d758c53904671f39a79af [file] [log] [blame]
pbos@webrtc.org29d58392013-05-16 12:08:031/*
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 04:47:3110#ifndef TEST_VIDEO_RENDERER_H_
11#define TEST_VIDEO_RENDERER_H_
pbos@webrtc.org29d58392013-05-16 12:08:0312
pbos@webrtc.org1ecee9a2013-05-29 11:34:3213#include <stddef.h>
14
Niels Möllerc6ce9c52018-05-11 09:15:3015#include "api/video/video_sink_interface.h"
pbos@webrtc.org29d58392013-05-16 12:08:0316
17namespace webrtc {
nisse7ade7b32016-03-23 11:48:1018class VideoFrame;
19
pbos@webrtc.org29d58392013-05-16 12:08:0320namespace test {
nisse7ade7b32016-03-23 11:48:1021class VideoRenderer : public rtc::VideoSinkInterface<VideoFrame> {
pbos@webrtc.org29d58392013-05-16 12:08:0322 public:
mflodman@webrtc.org7f944f32013-05-27 15:52:3823 // Creates a platform-specific renderer if possible, or a null implementation
24 // if failing.
Yves Gerey665174f2018-06-19 13:03:0525 static VideoRenderer* Create(const char* window_title,
26 size_t width,
pbos@webrtc.org771cdcb2013-05-23 12:20:1627 size_t height);
mflodman@webrtc.org7f944f32013-05-27 15:52:3828 // Returns a renderer rendering to a platform specific window if possible,
29 // NULL if none can be created.
30 // Creates a platform-specific renderer if possible, returns NULL if a
31 // platform renderer could not be created. This occurs, for instance, when
32 // running without an X environment on Linux.
33 static VideoRenderer* CreatePlatformRenderer(const char* window_title,
Yves Gerey665174f2018-06-19 13:03:0534 size_t width,
35 size_t height);
pbos@webrtc.org29d58392013-05-16 12:08:0336 virtual ~VideoRenderer() {}
Yves Gerey665174f2018-06-19 13:03:0537
pbos@webrtc.org9b303482013-05-23 12:37:1138 protected:
39 VideoRenderer() {}
pbos@webrtc.org29d58392013-05-16 12:08:0340};
pbos@webrtc.orgadf23a52013-07-10 14:07:5641} // namespace test
42} // namespace webrtc
pbos@webrtc.org29d58392013-05-16 12:08:0343
Mirko Bonadei92ea95e2017-09-15 04:47:3144#endif // TEST_VIDEO_RENDERER_H_