| 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 |
| 13 | #if !TARGET_OS_IPHONE |
| 14 |
| 15 | #import <AppKit/NSOpenGLView.h> |
| 16 | #import "api/media_stream_interface.h" |
| 17 | #import "RTCVideoRenderer.h" |
| 18 | #import "RTCVideoViewShading.h" |
| 19 |
| 20 | NS_ASSUME_NONNULL_BEGIN |
| 21 |
| 22 | @class GLVideoView; |
| 23 |
| 24 | @protocol GLVideoViewDelegate<RTCVideoViewDelegate> @end |
| 25 |
| 26 | @interface GLVideoView : NSView <RTCVideoRenderer> |
| 27 |
| 28 | @property(nonatomic, weak) id<GLVideoViewDelegate> delegate; |
| 29 |
| 30 | - (instancetype)initWithFrame:(NSRect)frameRect |
| 31 | pixelFormat:(NSOpenGLPixelFormat *)format |
| 32 | shader:(id<RTCVideoViewShading>)shader |
| 33 | NS_DESIGNATED_INITIALIZER; |
| 34 |
| 35 |
| 36 | @property(nonatomic, nullable) NSValue *rotationOverride; |
| 37 |
| 38 | @property (nonatomic, readwrite) int internalOrientation; |
| 39 |
| 40 | - (std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>>)getSink; |
| 41 | - (void)setOnFirstFrameReceived:(void (^ _Nullable)(float))onFirstFrameReceived; |
| 42 | - (void)internalSetOnOrientationUpdated:(void (^ _Nullable)(int))onOrientationUpdated; |
| 43 | - (void)internalSetOnIsMirroredUpdated:(void (^ _Nullable)(bool))onIsMirroredUpdated; |
| 44 | - (void)setVideoContentMode:(CALayerContentsGravity)mode; |
| 45 | - (void)setIsForceMirrored:(BOOL)forceMirrored; |
| 46 | @end |
| 47 |
| 48 | NS_ASSUME_NONNULL_END |
| 49 |
| 50 | #endif |
| 51 |