Home | History | Annotate | Download | only in test
      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 #include "webrtc/test/video_renderer.h"
     11 
     12 // TODO(pbos): Android renderer
     13 
     14 #include "webrtc/typedefs.h"
     15 
     16 namespace webrtc {
     17 namespace test {
     18 
     19 class NullRenderer : public VideoRenderer {
     20   void RenderFrame(const VideoFrame& video_frame,
     21                    int time_to_render_ms) override {}
     22   bool IsTextureSupported() const override { return false; }
     23 };
     24 
     25 VideoRenderer* VideoRenderer::Create(const char* window_title,
     26                                      size_t width,
     27                                      size_t height) {
     28   VideoRenderer* renderer = CreatePlatformRenderer(window_title, width, height);
     29   if (renderer != NULL) {
     30     // TODO(mflodman) Add a warning log.
     31     return renderer;
     32   }
     33 
     34   return new NullRenderer();
     35 }
     36 }  // namespace test
     37 }  // namespace webrtc
     38