tkchin | 04dbb34 | 2016-08-08 03:10:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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 | |
magjed | bf08452 | 2017-01-13 07:10:16 -0800 | [diff] [blame] | 11 | #import <Foundation/Foundation.h> |
| 12 | |
tkchin | 04dbb34 | 2016-08-08 03:10:07 -0700 | [diff] [blame] | 13 | #import "RTCOpenGLDefines.h" |
| 14 | |
| 15 | @class RTCVideoFrame; |
| 16 | |
| 17 | @protocol RTCShader <NSObject> |
| 18 | |
| 19 | - (BOOL)drawFrame:(RTCVideoFrame *)frame; |
| 20 | |
| 21 | @end |
| 22 | |
| 23 | // Shader for non-native I420 frames. |
| 24 | @interface RTCI420Shader : NSObject <RTCShader> |
| 25 | |
| 26 | - (instancetype)init NS_UNAVAILABLE; |
| 27 | - (instancetype)initWithContext:(GlContextType *)context NS_DESIGNATED_INITIALIZER; |
| 28 | - (BOOL)drawFrame:(RTCVideoFrame *)frame; |
| 29 | |
| 30 | @end |
| 31 | |
| 32 | // Native CVPixelBufferRef rendering is only supported on iPhone because it |
| 33 | // depends on CVOpenGLESTextureCacheCreate. |
| 34 | #if TARGET_OS_IPHONE |
| 35 | |
| 36 | // Shader for native NV12 frames. |
| 37 | @interface RTCNativeNV12Shader : NSObject <RTCShader> |
| 38 | |
| 39 | - (instancetype)init NS_UNAVAILABLE; |
| 40 | - (instancetype)initWithContext:(GlContextType *)context NS_DESIGNATED_INITIALIZER; |
| 41 | - (BOOL)drawFrame:(RTCVideoFrame *)frame; |
| 42 | |
| 43 | @end |
| 44 | |
| 45 | #endif // TARGET_OS_IPHONE |