Anders Carlsson | 9823ee4 | 2018-03-07 10:32:03 +0100 | [diff] [blame] | 1 | /* |
| 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öller | c6ce9c5 | 2018-05-11 11:15:30 +0200 | [diff] [blame^] | 18 | #include "api/video/video_sink_interface.h" |
Anders Carlsson | 9823ee4 | 2018-03-07 10:32:03 +0100 | [diff] [blame] | 19 | |
| 20 | @protocol RTCVideoRenderer; |
| 21 | |
| 22 | namespace webrtc { |
| 23 | |
| 24 | class 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_ |