blob: fedd28b22edb15a9b9994fa70f3db4a29d76d1d7 [file] [log] [blame]
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +00001/*
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
11#ifndef WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_VIDEO_RENDERER_H_
12#define WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_VIDEO_RENDERER_H_
13
14namespace webrtc {
15
Miguel Casas-Sanchez47650702015-05-29 17:21:40 -070016class VideoFrame;
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +000017
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +000018class VideoRenderer {
19 public:
20 // This function should return as soon as possible and not block until it's
21 // time to render the frame.
Miguel Casas-Sanchez47650702015-05-29 17:21:40 -070022 // TODO(mflodman) Remove time_to_render_ms when VideoFrame contains NTP.
23 virtual void RenderFrame(const VideoFrame& video_frame,
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +000024 int time_to_render_ms) = 0;
25
pbos@webrtc.org0d852d52015-02-09 15:14:36 +000026 virtual bool IsTextureSupported() const = 0;
27
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +000028 protected:
29 virtual ~VideoRenderer() {}
30};
pbos@webrtc.org1ecee9a2013-05-29 11:34:32 +000031} // namespace webrtc
32
33#endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_VIDEO_RENDERER_H_