pbos@webrtc.org | dc8c883 | 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 | */ |
| 10 | #ifndef WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_ |
| 11 | #define WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_ |
| 12 | |
pbos@webrtc.org | 266d5f6 | 2013-05-29 11:34:32 +0000 | [diff] [blame] | 13 | #include <stddef.h> |
| 14 | |
| 15 | #include "webrtc/video_engine/new_include/video_renderer.h" |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 16 | |
| 17 | namespace webrtc { |
| 18 | namespace test { |
| 19 | |
| 20 | class VideoRenderer : public newapi::VideoRenderer { |
| 21 | public: |
mflodman@webrtc.org | 9bacbf4 | 2013-05-27 15:52:38 +0000 | [diff] [blame] | 22 | // Creates a platform-specific renderer if possible, or a null implementation |
| 23 | // if failing. |
| 24 | static VideoRenderer* Create(const char* window_title, size_t width, |
pbos@webrtc.org | 3d6a8bf | 2013-05-23 12:20:16 +0000 | [diff] [blame] | 25 | size_t height); |
mflodman@webrtc.org | 9bacbf4 | 2013-05-27 15:52:38 +0000 | [diff] [blame] | 26 | // Returns a renderer rendering to a platform specific window if possible, |
| 27 | // NULL if none can be created. |
| 28 | // Creates a platform-specific renderer if possible, returns NULL if a |
| 29 | // platform renderer could not be created. This occurs, for instance, when |
| 30 | // running without an X environment on Linux. |
| 31 | static VideoRenderer* CreatePlatformRenderer(const char* window_title, |
| 32 | size_t width, size_t height); |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 33 | virtual ~VideoRenderer() {} |
pbos@webrtc.org | d9f9185 | 2013-05-23 12:37:11 +0000 | [diff] [blame] | 34 | protected: |
| 35 | VideoRenderer() {} |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 36 | }; |
pbos@webrtc.org | 8d671f5 | 2013-07-10 14:07:56 +0000 | [diff] [blame^] | 37 | } // namespace test |
| 38 | } // namespace webrtc |
pbos@webrtc.org | dc8c883 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 39 | |
| 40 | #endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_ |