RTCVideoViewShading.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 "RTCVideoFrame.h"
  12. NS_ASSUME_NONNULL_BEGIN
  13. /**
  14. * RTCVideoViewShading provides a way for apps to customize the OpenGL(ES shaders
  15. * used in rendering for the RTCEAGLVideoView/RTCNSGLVideoView.
  16. */
  17. RTC_OBJC_EXPORT
  18. @protocol RTC_OBJC_TYPE
  19. (RTCVideoViewShading)<NSObject>
  20. /** Callback for I420 frames. Each plane is given as a texture. */
  21. - (void)applyShadingForFrameWithWidth : (int)width height : (int)height rotation
  22. : (RTCVideoRotation)rotation yPlane : (GLuint)yPlane uPlane : (GLuint)uPlane vPlane
  23. : (GLuint)vPlane;
  24. /** Callback for NV12 frames. Each plane is given as a texture. */
  25. - (void)applyShadingForFrameWithWidth:(int)width
  26. height:(int)height
  27. rotation:(RTCVideoRotation)rotation
  28. yPlane:(GLuint)yPlane
  29. uvPlane:(GLuint)uvPlane;
  30. @end
  31. NS_ASSUME_NONNULL_END