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