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 | 10 |
11 #ifndef WEBRTC_VIDEO_RENDERER_H_ | 11 #ifndef WEBRTC_VIDEO_RENDERER_H_ |
12 #define WEBRTC_VIDEO_RENDERER_H_ | 12 #define WEBRTC_VIDEO_RENDERER_H_ |
13 | 13 |
| 14 #include "webrtc/media/base/videosinkinterface.h" |
| 15 |
14 namespace webrtc { | 16 namespace webrtc { |
15 | 17 |
16 class VideoFrame; | 18 class VideoFrame; |
17 | 19 |
18 class VideoRenderer { | 20 class VideoRenderer : public rtc::VideoSinkInterface<VideoFrame> { |
19 public: | 21 public: |
20 // This function should return as soon as possible and not block until it's | |
21 // time to render the frame. | |
22 // TODO(mflodman) Remove time_to_render_ms when VideoFrame contains NTP. | |
23 virtual void RenderFrame(const VideoFrame& video_frame, | |
24 int time_to_render_ms) = 0; | |
25 | |
26 virtual bool IsTextureSupported() const = 0; | |
27 | |
28 // This function returns true if WebRTC should not delay frames for | 22 // This function returns true if WebRTC should not delay frames for |
29 // smoothness. In general, this case means the renderer can schedule frames to | 23 // smoothness. In general, this case means the renderer can schedule frames to |
30 // optimize smoothness. | 24 // optimize smoothness. |
31 virtual bool SmoothsRenderedFrames() const { return false; } | 25 virtual bool SmoothsRenderedFrames() const { return false; } |
32 | 26 |
33 protected: | 27 protected: |
34 virtual ~VideoRenderer() {} | 28 virtual ~VideoRenderer() {} |
35 }; | 29 }; |
36 } // namespace webrtc | 30 } // namespace webrtc |
37 | 31 |
38 #endif // WEBRTC_VIDEO_RENDERER_H_ | 32 #endif // WEBRTC_VIDEO_RENDERER_H_ |
OLD | NEW |