blob: 24b26cd602daf5639ca680fa3fa3bb36a94495d8 [file] [log] [blame]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001/*
2 * Copyright 2015 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#import <Foundation/Foundation.h>
12#import <UIKit/UIKit.h>
13
14#import "RTCMacros.h"
15#import "RTCVideoRenderer.h"
16#import "RTCVideoViewShading.h"
17
18NS_ASSUME_NONNULL_BEGIN
19
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020020@class RTC_OBJC_TYPE(RTCEAGLVideoView);
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020021
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020022/**
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020023 * RTCEAGLVideoView is an RTCVideoRenderer which renders video frames
24 * in its bounds using OpenGLES 2.0 or OpenGLES 3.0.
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020025 */
Mirko Bonadeie8d57242018-09-17 10:22:56 +020026RTC_OBJC_EXPORT
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020027NS_EXTENSION_UNAVAILABLE_IOS("Rendering not available in app extensions.")
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020028@interface RTC_OBJC_TYPE (RTCEAGLVideoView) : UIView <RTC_OBJC_TYPE(RTCVideoRenderer)>
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020029
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020030@property(nonatomic, weak) id<RTC_OBJC_TYPE(RTCVideoViewDelegate)> delegate;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020031
32- (instancetype)initWithFrame:(CGRect)frame
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020033 shader:(id<RTC_OBJC_TYPE(RTCVideoViewShading)>)shader
34 NS_DESIGNATED_INITIALIZER;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020035
36- (instancetype)initWithCoder:(NSCoder *)aDecoder
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020037 shader:(id<RTC_OBJC_TYPE(RTCVideoViewShading)>)shader
38 NS_DESIGNATED_INITIALIZER;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020039
CZ Theng41875aa2019-12-20 11:33:21 +080040/** @abstract Wrapped RTCVideoRotation, or nil.
41 */
42@property(nonatomic, nullable) NSValue *rotationOverride;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020043@end
44
45NS_ASSUME_NONNULL_END