pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 1 | /* |
| 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 Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 10 | #ifndef TEST_VIDEO_RENDERER_H_ |
| 11 | #define TEST_VIDEO_RENDERER_H_ |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 12 | |
pbos@webrtc.org | 1ecee9a | 2013-05-29 11:34:32 +0000 | [diff] [blame] | 13 | #include <stddef.h> |
| 14 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 15 | #include "media/base/videosinkinterface.h" |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 16 | |
| 17 | namespace webrtc { |
nisse | 7ade7b3 | 2016-03-23 04:48:10 -0700 | [diff] [blame] | 18 | class VideoFrame; |
| 19 | |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 20 | namespace test { |
nisse | 7ade7b3 | 2016-03-23 04:48:10 -0700 | [diff] [blame] | 21 | class VideoRenderer : public rtc::VideoSinkInterface<VideoFrame> { |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 22 | public: |
mflodman@webrtc.org | 7f944f3 | 2013-05-27 15:52:38 +0000 | [diff] [blame] | 23 | // 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.org | 771cdcb | 2013-05-23 12:20:16 +0000 | [diff] [blame] | 26 | size_t height); |
mflodman@webrtc.org | 7f944f3 | 2013-05-27 15:52:38 +0000 | [diff] [blame] | 27 | // 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.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 34 | virtual ~VideoRenderer() {} |
pbos@webrtc.org | 9b30348 | 2013-05-23 12:37:11 +0000 | [diff] [blame] | 35 | protected: |
| 36 | VideoRenderer() {} |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 37 | }; |
pbos@webrtc.org | adf23a5 | 2013-07-10 14:07:56 +0000 | [diff] [blame] | 38 | } // namespace test |
| 39 | } // namespace webrtc |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 40 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 41 | #endif // TEST_VIDEO_RENDERER_H_ |