| 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 | #ifdef WEBRTC_IOS |
| 13 | #import <UIKit/UIKit.h> |
| 14 | #else |
| 15 | #import <AppKit/AppKit.h> |
| 16 | #endif |
| 17 |
| 18 | #import "RTCMacros.h" |
| 19 | #import "RTCVideoRenderer.h" |
| 20 | #import "RTCVideoViewShading.h" |
| 21 |
| 22 | #import "api/media_stream_interface.h" |
| 23 |
| 24 | #include <memory> |
| 25 |
| 26 | NS_ASSUME_NONNULL_BEGIN |
| 27 |
| 28 | @class GLVideoView; |
| 29 |
| 30 | /** |
| 31 | * GLVideoView is an RTCVideoRenderer which renders video frames in its |
| 32 | * bounds using OpenGLES 2.0 or OpenGLES 3.0. |
| 33 | */ |
| 34 | RTC_OBJC_EXPORT |
| 35 | @interface GLVideoView : |
| 36 | #ifdef WEBRTC_IOS |
| 37 | UIView |
| 38 | #else |
| 39 | NSView |
| 40 | #endif |
| 41 | <RTCVideoRenderer> |
| 42 |
| 43 | @property(nonatomic, weak) id<RTCVideoViewDelegate> delegate; |
| 44 |
| 45 | - (instancetype)initWithFrame:(CGRect)frame |
| 46 | shader:(id<RTCVideoViewShading>)shader NS_DESIGNATED_INITIALIZER; |
| 47 |
| 48 | - (instancetype)initWithCoder:(NSCoder *)aDecoder |
| 49 | shader:(id<RTCVideoViewShading>)shader NS_DESIGNATED_INITIALIZER; |
| 50 |
| 51 | /** @abstract Wrapped RTCVideoRotation, or nil. |
| 52 | */ |
| 53 | @property(nonatomic, nullable) NSValue *rotationOverride; |
| 54 |
| 55 | @property (nonatomic, readwrite) int internalOrientation; |
| 56 |
| 57 | - (std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>>)getSink; |
| 58 | - (void)setOnFirstFrameReceived:(void (^ _Nullable)())onFirstFrameReceived; |
| 59 | - (void)internalSetOnOrientationUpdated:(void (^ _Nullable)(int))onOrientationUpdated; |
| 60 | - (void)internalSetOnIsMirroredUpdated:(void (^ _Nullable)(bool))onIsMirroredUpdated; |
| 61 |
| 62 | @end |
| 63 |
| 64 | NS_ASSUME_NONNULL_END |
| 65 |