1*d9f75844SAndroid Build Coastguard Worker /* 2*d9f75844SAndroid Build Coastguard Worker * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 3*d9f75844SAndroid Build Coastguard Worker * 4*d9f75844SAndroid Build Coastguard Worker * Use of this source code is governed by a BSD-style license 5*d9f75844SAndroid Build Coastguard Worker * that can be found in the LICENSE file in the root of the source 6*d9f75844SAndroid Build Coastguard Worker * tree. An additional intellectual property rights grant can be found 7*d9f75844SAndroid Build Coastguard Worker * in the file PATENTS. All contributing project authors may 8*d9f75844SAndroid Build Coastguard Worker * be found in the AUTHORS file in the root of the source tree. 9*d9f75844SAndroid Build Coastguard Worker */ 10*d9f75844SAndroid Build Coastguard Worker #ifndef TEST_VIDEO_RENDERER_H_ 11*d9f75844SAndroid Build Coastguard Worker #define TEST_VIDEO_RENDERER_H_ 12*d9f75844SAndroid Build Coastguard Worker 13*d9f75844SAndroid Build Coastguard Worker #include <stddef.h> 14*d9f75844SAndroid Build Coastguard Worker 15*d9f75844SAndroid Build Coastguard Worker #include "api/video/video_sink_interface.h" 16*d9f75844SAndroid Build Coastguard Worker 17*d9f75844SAndroid Build Coastguard Worker namespace webrtc { 18*d9f75844SAndroid Build Coastguard Worker class VideoFrame; 19*d9f75844SAndroid Build Coastguard Worker 20*d9f75844SAndroid Build Coastguard Worker namespace test { 21*d9f75844SAndroid Build Coastguard Worker class VideoRenderer : public rtc::VideoSinkInterface<VideoFrame> { 22*d9f75844SAndroid Build Coastguard Worker public: 23*d9f75844SAndroid Build Coastguard Worker // Creates a platform-specific renderer if possible, or a null implementation 24*d9f75844SAndroid Build Coastguard Worker // if failing. 25*d9f75844SAndroid Build Coastguard Worker static VideoRenderer* Create(const char* window_title, 26*d9f75844SAndroid Build Coastguard Worker size_t width, 27*d9f75844SAndroid Build Coastguard Worker size_t height); 28*d9f75844SAndroid Build Coastguard Worker // Returns a renderer rendering to a platform specific window if possible, 29*d9f75844SAndroid Build Coastguard Worker // NULL if none can be created. 30*d9f75844SAndroid Build Coastguard Worker // Creates a platform-specific renderer if possible, returns NULL if a 31*d9f75844SAndroid Build Coastguard Worker // platform renderer could not be created. This occurs, for instance, when 32*d9f75844SAndroid Build Coastguard Worker // running without an X environment on Linux. 33*d9f75844SAndroid Build Coastguard Worker static VideoRenderer* CreatePlatformRenderer(const char* window_title, 34*d9f75844SAndroid Build Coastguard Worker size_t width, 35*d9f75844SAndroid Build Coastguard Worker size_t height); ~VideoRenderer()36*d9f75844SAndroid Build Coastguard Worker virtual ~VideoRenderer() {} 37*d9f75844SAndroid Build Coastguard Worker 38*d9f75844SAndroid Build Coastguard Worker protected: VideoRenderer()39*d9f75844SAndroid Build Coastguard Worker VideoRenderer() {} 40*d9f75844SAndroid Build Coastguard Worker }; 41*d9f75844SAndroid Build Coastguard Worker } // namespace test 42*d9f75844SAndroid Build Coastguard Worker } // namespace webrtc 43*d9f75844SAndroid Build Coastguard Worker 44*d9f75844SAndroid Build Coastguard Worker #endif // TEST_VIDEO_RENDERER_H_ 45