12a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org/* 22a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 32a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org * 42a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org * Use of this source code is governed by a BSD-style license 52a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org * that can be found in the LICENSE file in the root of the source 62a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org * tree. An additional intellectual property rights grant can be found 72a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org * in the file PATENTS. All contributing project authors may 82a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org * be found in the AUTHORS file in the root of the source tree. 92a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org */ 102a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org#ifndef WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_ 112a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org#define WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_ 122a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org 134988d94bf043d7dff95e7dcb6716e6f4b16f5460pbos@webrtc.org#include <stddef.h> 144988d94bf043d7dff95e7dcb6716e6f4b16f5460pbos@webrtc.org 1524e2089750e9e51228b82d6c7ebf4fa064c797bapbos@webrtc.org#include "webrtc/video_renderer.h" 162a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org 172a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.orgnamespace webrtc { 182a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.orgnamespace test { 19c1797061756f40b9b1f3f3e82fc040ce18ecd43cpbos@webrtc.orgclass VideoRenderer : public webrtc::VideoRenderer { 202a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org public: 21a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org // Creates a platform-specific renderer if possible, or a null implementation 22a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org // if failing. 23a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org static VideoRenderer* Create(const char* window_title, size_t width, 24074eb20eec94381574b59b4b46e95d392222b450pbos@webrtc.org size_t height); 25a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org // Returns a renderer rendering to a platform specific window if possible, 26a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org // NULL if none can be created. 27a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org // Creates a platform-specific renderer if possible, returns NULL if a 28a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org // platform renderer could not be created. This occurs, for instance, when 29a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org // running without an X environment on Linux. 30a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org static VideoRenderer* CreatePlatformRenderer(const char* window_title, 31a93cbbf0c034d07912a7b5b65fb2a32b54903ccbmflodman@webrtc.org size_t width, size_t height); 322a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org virtual ~VideoRenderer() {} 3308f3ca9cd2cc6c1bc2da8f6b98178cd42e91debfpbos@webrtc.org protected: 3408f3ca9cd2cc6c1bc2da8f6b98178cd42e91debfpbos@webrtc.org VideoRenderer() {} 352a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org}; 36778a17273c957a68c17a613969a3d2475f209737pbos@webrtc.org} // namespace test 37778a17273c957a68c17a613969a3d2475f209737pbos@webrtc.org} // namespace webrtc 382a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org 392a9108f911ae7a758f16061ba06bb73b270dd170pbos@webrtc.org#endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_VIDEO_RENDERER_H_ 40