RTCVideoViewShading.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 used in
  15. * rendering for the RTCEAGLVideoView/RTCNSGLVideoView.
  16. */
  17. RTC_OBJC_EXPORT
  18. @protocol RTCVideoViewShading <NSObject>
  19. /** Callback for I420 frames. Each plane is given as a texture. */
  20. - (void)applyShadingForFrameWithWidth:(int)width
  21. height:(int)height
  22. rotation:(RTCVideoRotation)rotation
  23. yPlane:(GLuint)yPlane
  24. uPlane:(GLuint)uPlane
  25. vPlane:(GLuint)vPlane;
  26. /** Callback for NV12 frames. Each plane is given as a texture. */
  27. - (void)applyShadingForFrameWithWidth:(int)width
  28. height:(int)height
  29. rotation:(RTCVideoRotation)rotation
  30. yPlane:(GLuint)yPlane
  31. uvPlane:(GLuint)uvPlane;
  32. @end
  33. NS_ASSUME_NONNULL_END