blob: 60c624e0d25dc523a9595ecef66dbecf58154556 [file] [log] [blame]
Jon Hjellee799bad2016-01-11 13:47:11 -08001/*
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
tkchin9eeb6242016-04-27 01:54:20 -070014#import <WebRTC/RTCMacros.h>
15#import <WebRTC/RTCVideoRenderer.h>
magjed13941912017-05-30 06:11:58 -070016#import <WebRTC/RTCVideoViewShading.h>
Jon Hjellee799bad2016-01-11 13:47:11 -080017
18NS_ASSUME_NONNULL_BEGIN
19
20@class RTCEAGLVideoView;
tkchin8b577ed2016-04-19 10:04:41 -070021RTC_EXPORT
Jon Hjellee799bad2016-01-11 13:47:11 -080022@protocol RTCEAGLVideoViewDelegate
23
24- (void)videoView:(RTCEAGLVideoView *)videoView didChangeVideoSize:(CGSize)size;
25
26@end
27
28/**
29 * RTCEAGLVideoView is an RTCVideoRenderer which renders video frames in its
magjed13941912017-05-30 06:11:58 -070030 * bounds using OpenGLES 2.0 or OpenGLES 3.0.
Jon Hjellee799bad2016-01-11 13:47:11 -080031 */
tkchin8b577ed2016-04-19 10:04:41 -070032RTC_EXPORT
Jon Hjellee799bad2016-01-11 13:47:11 -080033@interface RTCEAGLVideoView : UIView <RTCVideoRenderer>
34
35@property(nonatomic, weak) id<RTCEAGLVideoViewDelegate> delegate;
36
magjed13941912017-05-30 06:11:58 -070037- (instancetype)initWithFrame:(CGRect)frame
38 shader:(id<RTCVideoViewShading>)shader NS_DESIGNATED_INITIALIZER;
39
40- (instancetype)initWithCoder:(NSCoder *)aDecoder
41 shader:(id<RTCVideoViewShading>)shader NS_DESIGNATED_INITIALIZER;
42
Jon Hjellee799bad2016-01-11 13:47:11 -080043@end
44
45NS_ASSUME_NONNULL_END