blob: 75ab72a8839a55d62bdf9a383b926dabccb51242 [file] [log] [blame]
pbos@webrtc.org29d58392013-05-16 12:08:03 +00001/*
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 06:47:31 +020010#include "test/video_renderer.h"
pbos@webrtc.org29d58392013-05-16 12:08:03 +000011
pbos@webrtc.org29d58392013-05-16 12:08:03 +000012// TODO(pbos): Android renderer
13
14namespace webrtc {
15namespace test {
16
17class NullRenderer : public VideoRenderer {
nisseeb83a1a2016-03-21 01:27:56 -070018 void OnFrame(const VideoFrame& video_frame) override {}
pbos@webrtc.org29d58392013-05-16 12:08:03 +000019};
20
pbos@webrtc.orgadf23a52013-07-10 14:07:56 +000021VideoRenderer* VideoRenderer::Create(const char* window_title,
22 size_t width,
pbos@webrtc.org771cdcb2013-05-23 12:20:16 +000023 size_t height) {
mflodman@webrtc.org7f944f32013-05-27 15:52:38 +000024 VideoRenderer* renderer = CreatePlatformRenderer(window_title, width, height);
mflodman99768402016-08-03 15:38:06 +020025 if (renderer != nullptr)
mflodman@webrtc.org7f944f32013-05-27 15:52:38 +000026 return renderer;
pbos@webrtc.orgadf23a52013-07-10 14:07:56 +000027
pbos@webrtc.org29d58392013-05-16 12:08:03 +000028 return new NullRenderer();
29}
pbos@webrtc.orgadf23a52013-07-10 14:07:56 +000030} // namespace test
31} // namespace webrtc