RTCMTLVideoView.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright 2017 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. #import <Foundation/Foundation.h>
  11. #import <WebRTC/RTCMacros.h>
  12. #import <WebRTC/RTCVideoFrame.h>
  13. #import <WebRTC/RTCVideoRenderer.h>
  14. NS_ASSUME_NONNULL_BEGIN
  15. /**
  16. * RTCMTLVideoView is thin wrapper around MTKView.
  17. *
  18. * It has id<RTCVideoRenderer> property that renders video frames in the view's
  19. * bounds using Metal.
  20. */
  21. NS_CLASS_AVAILABLE_IOS(9)
  22. RTC_OBJC_EXPORT
  23. @interface RTC_OBJC_TYPE (RTCMTLVideoView) : UIView<RTC_OBJC_TYPE(RTCVideoRenderer)>
  24. @property(nonatomic, weak) id<RTC_OBJC_TYPE(RTCVideoViewDelegate)> delegate;
  25. @property(nonatomic) UIViewContentMode videoContentMode;
  26. /** @abstract Enables/disables rendering.
  27. */
  28. @property(nonatomic, getter=isEnabled) BOOL enabled;
  29. /** @abstract Wrapped RTCVideoRotation, or nil.
  30. */
  31. @property(nonatomic, nullable) NSValue* rotationOverride;
  32. @end
  33. NS_ASSUME_NONNULL_END