blob: 9b7c9b00fd4247215d982bc9d56a4925c3552e37 [file] [log] [blame]
Anders Carlsson9823ee42018-03-07 10:32:03 +01001/*
2 * Copyright 2018 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 SDK_OBJC_FRAMEWORK_NATIVE_SRC_OBJC_VIDEO_RENDERER_H_
12#define SDK_OBJC_FRAMEWORK_NATIVE_SRC_OBJC_VIDEO_RENDERER_H_
13
14#import <CoreGraphics/CoreGraphics.h>
15#import <Foundation/Foundation.h>
16
17#include "api/video/video_frame.h"
Niels Möllerc6ce9c52018-05-11 11:15:30 +020018#include "api/video/video_sink_interface.h"
Anders Carlsson9823ee42018-03-07 10:32:03 +010019
20@protocol RTCVideoRenderer;
21
22namespace webrtc {
23
24class ObjCVideoRenderer : public rtc::VideoSinkInterface<VideoFrame> {
25 public:
26 ObjCVideoRenderer(id<RTCVideoRenderer> renderer);
27 void OnFrame(const VideoFrame& nativeVideoFrame) override;
28
29 private:
30 id<RTCVideoRenderer> renderer_;
31 CGSize size_;
32};
33
34} // namespace webrtc
35
36#endif // SDK_OBJC_FRAMEWORK_NATIVE_SRC_OBJC_VIDEO_RENDERER_H_