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 | #include "test/video_renderer.h" |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 11 | |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 12 | // TODO(pbos): Android renderer |
| 13 | |
| 14 | namespace webrtc { |
| 15 | namespace test { |
| 16 | |
| 17 | class NullRenderer : public VideoRenderer { |
nisse | eb83a1a | 2016-03-21 01:27:56 -0700 | [diff] [blame] | 18 | void OnFrame(const VideoFrame& video_frame) override {} |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 19 | }; |
| 20 | |
pbos@webrtc.org | adf23a5 | 2013-07-10 14:07:56 +0000 | [diff] [blame] | 21 | VideoRenderer* VideoRenderer::Create(const char* window_title, |
| 22 | size_t width, |
pbos@webrtc.org | 771cdcb | 2013-05-23 12:20:16 +0000 | [diff] [blame] | 23 | size_t height) { |
mflodman@webrtc.org | 7f944f3 | 2013-05-27 15:52:38 +0000 | [diff] [blame] | 24 | VideoRenderer* renderer = CreatePlatformRenderer(window_title, width, height); |
mflodman | 9976840 | 2016-08-03 15:38:06 +0200 | [diff] [blame] | 25 | if (renderer != nullptr) |
mflodman@webrtc.org | 7f944f3 | 2013-05-27 15:52:38 +0000 | [diff] [blame] | 26 | return renderer; |
pbos@webrtc.org | adf23a5 | 2013-07-10 14:07:56 +0000 | [diff] [blame] | 27 | |
pbos@webrtc.org | 29d5839 | 2013-05-16 12:08:03 +0000 | [diff] [blame] | 28 | return new NullRenderer(); |
| 29 | } |
pbos@webrtc.org | adf23a5 | 2013-07-10 14:07:56 +0000 | [diff] [blame] | 30 | } // namespace test |
| 31 | } // namespace webrtc |