Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: webrtc/test/video_renderer.cc

Issue 1814763002: Cleanup of webrtc::VideoRenderer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use a more specific DEPS rule. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "webrtc/test/video_renderer.h" 10 #include "webrtc/test/video_renderer.h"
11 11
12 // TODO(pbos): Android renderer 12 // TODO(pbos): Android renderer
13 13
14 #include "webrtc/typedefs.h" 14 #include "webrtc/typedefs.h"
15 15
16 namespace webrtc { 16 namespace webrtc {
17 namespace test { 17 namespace test {
18 18
19 class NullRenderer : public VideoRenderer { 19 class NullRenderer : public VideoRenderer {
20 void RenderFrame(const VideoFrame& video_frame, 20 void OnFrame(const VideoFrame& video_frame) override {}
21 int time_to_render_ms) override {}
22 bool IsTextureSupported() const override { return false; }
23 }; 21 };
24 22
25 VideoRenderer* VideoRenderer::Create(const char* window_title, 23 VideoRenderer* VideoRenderer::Create(const char* window_title,
26 size_t width, 24 size_t width,
27 size_t height) { 25 size_t height) {
28 VideoRenderer* renderer = CreatePlatformRenderer(window_title, width, height); 26 VideoRenderer* renderer = CreatePlatformRenderer(window_title, width, height);
29 if (renderer != NULL) { 27 if (renderer != NULL) {
30 // TODO(mflodman) Add a warning log. 28 // TODO(mflodman) Add a warning log.
31 return renderer; 29 return renderer;
32 } 30 }
33 31
34 return new NullRenderer(); 32 return new NullRenderer();
35 } 33 }
36 } // namespace test 34 } // namespace test
37 } // namespace webrtc 35 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698