Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/RTCNativeNV12Shader.mm

Issue 2517173004: Move VideoFrame and related declarations to webrtc/api/video. (Closed)
Patch Set: Make rotation check clearer. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #import "RTCShader.h" 11 #import "RTCShader.h"
12 12
13 // Native CVPixelBufferRef rendering is only supported on iPhone because it 13 // Native CVPixelBufferRef rendering is only supported on iPhone because it
14 // depends on CVOpenGLESTextureCacheCreate. 14 // depends on CVOpenGLESTextureCacheCreate.
15 #if TARGET_OS_IPHONE 15 #if TARGET_OS_IPHONE
16 16
17 #import <CoreVideo/CVOpenGLESTextureCache.h> 17 #import <CoreVideo/CVOpenGLESTextureCache.h>
18 18
19 #import "RTCShader+Private.h" 19 #import "RTCShader+Private.h"
20 #import "WebRTC/RTCVideoFrame.h" 20 #import "WebRTC/RTCVideoFrame.h"
21 21
22 #include "webrtc/api/video/video_rotation.h"
22 #include "webrtc/base/checks.h" 23 #include "webrtc/base/checks.h"
23 #include "webrtc/base/optional.h" 24 #include "webrtc/base/optional.h"
24 #include "webrtc/common_video/rotation.h"
25 25
26 static const char kNV12FragmentShaderSource[] = 26 static const char kNV12FragmentShaderSource[] =
27 SHADER_VERSION 27 SHADER_VERSION
28 "precision mediump float;" 28 "precision mediump float;"
29 FRAGMENT_SHADER_IN " vec2 v_texcoord;\n" 29 FRAGMENT_SHADER_IN " vec2 v_texcoord;\n"
30 "uniform lowp sampler2D s_textureY;\n" 30 "uniform lowp sampler2D s_textureY;\n"
31 "uniform lowp sampler2D s_textureUV;\n" 31 "uniform lowp sampler2D s_textureUV;\n"
32 FRAGMENT_SHADER_OUT 32 FRAGMENT_SHADER_OUT
33 "void main() {\n" 33 "void main() {\n"
34 " mediump float y;\n" 34 " mediump float y;\n"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 162 glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
163 163
164 CFRelease(chromaTexture); 164 CFRelease(chromaTexture);
165 CFRelease(lumaTexture); 165 CFRelease(lumaTexture);
166 166
167 return YES; 167 return YES;
168 } 168 }
169 169
170 @end 170 @end
171 #endif // TARGET_OS_IPHONE 171 #endif // TARGET_OS_IPHONE
OLDNEW
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/RTCI420Shader.mm ('k') | webrtc/sdk/objc/Framework/Classes/RTCShader+Private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698