2013-05-16 12:08:03 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef TEST_VIDEO_RENDERER_H_
|
|
|
|
|
#define TEST_VIDEO_RENDERER_H_
|
2013-05-16 12:08:03 +00:00
|
|
|
|
2013-05-29 11:34:32 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
|
|
2018-05-11 11:15:30 +02:00
|
|
|
#include "api/video/video_sink_interface.h"
|
2013-05-16 12:08:03 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
2016-03-23 04:48:10 -07:00
|
|
|
class VideoFrame;
|
|
|
|
|
|
2013-05-16 12:08:03 +00:00
|
|
|
namespace test {
|
2016-03-23 04:48:10 -07:00
|
|
|
class VideoRenderer : public rtc::VideoSinkInterface<VideoFrame> {
|
2013-05-16 12:08:03 +00:00
|
|
|
public:
|
2013-05-27 15:52:38 +00:00
|
|
|
// Creates a platform-specific renderer if possible, or a null implementation
|
|
|
|
|
// if failing.
|
|
|
|
|
static VideoRenderer* Create(const char* window_title,
|
|
|
|
|
size_t width,
|
2013-05-23 12:20:16 +00:00
|
|
|
size_t height);
|
2013-05-27 15:52:38 +00:00
|
|
|
// Returns a renderer rendering to a platform specific window if possible,
|
|
|
|
|
// NULL if none can be created.
|
|
|
|
|
// Creates a platform-specific renderer if possible, returns NULL if a
|
|
|
|
|
// platform renderer could not be created. This occurs, for instance, when
|
|
|
|
|
// running without an X environment on Linux.
|
|
|
|
|
static VideoRenderer* CreatePlatformRenderer(const char* window_title,
|
|
|
|
|
size_t width,
|
|
|
|
|
size_t height);
|
2013-05-16 12:08:03 +00:00
|
|
|
virtual ~VideoRenderer() {}
|
2018-06-19 15:03:05 +02:00
|
|
|
|
2013-05-23 12:37:11 +00:00
|
|
|
protected:
|
|
|
|
|
VideoRenderer() {}
|
2013-05-16 12:08:03 +00:00
|
|
|
};
|
2013-07-10 14:07:56 +00:00
|
|
|
} // namespace test
|
|
|
|
|
} // namespace webrtc
|
2013-05-16 12:08:03 +00:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // TEST_VIDEO_RENDERER_H_
|