Magnus Jedvert 6b9653e63b ObjC: Pass in frame resolution to GL shaders
Frame resolution might be interesting for a shader implementation.

Bug: webrtc:7473
Change-Id: If19278b3babe2e5bab1a1f7562fa8b06ab840517
Reviewed-on: https://chromium-review.googlesource.com/524452
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18466}
2017-06-07 10:05:16 +00:00

42 lines
1.4 KiB
Objective-C

/*
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#import <Foundation/Foundation.h>
#import <WebRTC/RTCVideoFrame.h>
NS_ASSUME_NONNULL_BEGIN
/**
* RTCVideoViewShading provides a way for apps to customize the OpenGL(ES) shaders used in
* rendering for the RTCEAGLVideoView/RTCNSGLVideoView.
*/
RTC_EXPORT
@protocol RTCVideoViewShading <NSObject>
/** Callback for I420 frames. Each plane is given as a texture. */
- (void)applyShadingForFrameWithWidth:(int)width
height:(int)height
rotation:(RTCVideoRotation)rotation
yPlane:(GLuint)yPlane
uPlane:(GLuint)uPlane
vPlane:(GLuint)vPlane;
/** Callback for NV12 frames. Each plane is given as a texture. */
- (void)applyShadingForFrameWithWidth:(int)width
height:(int)height
rotation:(RTCVideoRotation)rotation
yPlane:(GLuint)yPlane
uvPlane:(GLuint)uvPlane;
@end
NS_ASSUME_NONNULL_END