blob: 84aab894c268b8b72bfa2b86a3ac686496708f3c [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 */
pbos@webrtc.org29d58392013-05-16 12:08:03 +000010#include "webrtc/video_engine/test/common/video_renderer.h"
11
pbos@webrtc.org29d58392013-05-16 12:08:03 +000012// TODO(pbos): Android renderer
13
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +000014#include "webrtc/typedefs.h"
15
pbos@webrtc.org29d58392013-05-16 12:08:03 +000016namespace webrtc {
17namespace test {
18
19class NullRenderer : public VideoRenderer {
20 virtual void RenderFrame(const I420VideoFrame& video_frame,
21 int time_to_render_ms) OVERRIDE {}
22};
23
pbos@webrtc.orgadf23a52013-07-10 14:07:56 +000024VideoRenderer* VideoRenderer::Create(const char* window_title,
25 size_t width,
pbos@webrtc.org771cdcb2013-05-23 12:20:16 +000026 size_t height) {
mflodman@webrtc.org7f944f32013-05-27 15:52:38 +000027 VideoRenderer* renderer = CreatePlatformRenderer(window_title, width, height);
28 if (renderer != NULL) {
29 // TODO(mflodman) Add a warning log.
30 return renderer;
pbos@webrtc.org29d58392013-05-16 12:08:03 +000031 }
pbos@webrtc.orgadf23a52013-07-10 14:07:56 +000032
pbos@webrtc.org29d58392013-05-16 12:08:03 +000033 return new NullRenderer();
34}
pbos@webrtc.orgadf23a52013-07-10 14:07:56 +000035} // namespace test
36} // namespace webrtc