| 5 | #import <AppKit/AppKit.h> |
| 6 |
| 7 | #import "api/media_stream_interface.h" |
| 8 |
| 9 | #include <memory> |
| 10 |
| 11 | @class RTCVideoFrame; |
| 12 |
| 13 | @interface VideoMetalView : NSView |
| 14 |
| 15 | + (bool)isSupported; |
| 16 |
| 17 | @property(nonatomic) CALayerContentsGravity _Nullable videoContentMode; |
| 18 | @property(nonatomic, getter=isEnabled) BOOL enabled; |
| 19 | @property(nonatomic, nullable) NSValue* rotationOverride; |
| 20 |
| 21 | @property (nonatomic, readwrite) int internalOrientation; |
| 22 | @property (nonatomic, readwrite) CGFloat internalAspect; |
| 23 |
| 24 |
| 25 | - (void)setSize:(CGSize)size; |
| 26 | - (void)renderFrame:(nullable RTCVideoFrame *)frame; |
| 27 |
| 28 |
| 29 | - (std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>>)getSink; |
| 30 | - (void)setOnFirstFrameReceived:(void (^ _Nullable)(float))onFirstFrameReceived; |
| 31 | - (void)internalSetOnOrientationUpdated:(void (^ _Nullable)(int, CGFloat))onOrientationUpdated; |
| 32 | - (void)internalSetOnIsMirroredUpdated:(void (^ _Nullable)(bool))onIsMirroredUpdated; |
| 33 | - (void)setForceMirrored:(BOOL)forceMirrored; |
| 34 |
| 35 | -(void)setIsPaused:(bool)paused; |
| 36 | -(void)renderToSize:(NSSize)size animated: (bool)animated; |
| 37 |
| 38 | @end |
| 39 |
| 40 | #endif // WEBRTC_MAC |
| 41 | #endif |
| 42 |