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