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 #ifndef WEBRTC_TEST_VIDEO_RENDERER_H_ 11 #define WEBRTC_TEST_VIDEO_RENDERER_H_ 12 13 #include <stddef.h> 14 15 #include "webrtc/video_renderer.h" 16 17 namespace webrtc { 18 namespace test { 19 class VideoRenderer : public webrtc::VideoRenderer { 20 public: 21 // Creates a platform-specific renderer if possible, or a null implementation 22 // if failing. 23 static VideoRenderer* Create(const char* window_title, size_t width, 24 size_t height); 25 // Returns a renderer rendering to a platform specific window if possible, 26 // NULL if none can be created. 27 // Creates a platform-specific renderer if possible, returns NULL if a 28 // platform renderer could not be created. This occurs, for instance, when 29 // running without an X environment on Linux. 30 static VideoRenderer* CreatePlatformRenderer(const char* window_title, 31 size_t width, size_t height); ~VideoRenderer()32 virtual ~VideoRenderer() {} 33 protected: VideoRenderer()34 VideoRenderer() {} 35 }; 36 } // namespace test 37 } // namespace webrtc 38 39 #endif // WEBRTC_TEST_VIDEO_RENDERER_H_ 40