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

Side by Side Diff: webrtc/modules/video_render/android/video_render_opengles20.h

Issue 1912143002: Delete video_render module. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Move -framework flags from legacy_objc_api_tests.gyp to legacy_objc_api.gyp. Created 4 years, 7 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
(Empty)
1 /*
2 * Copyright (c) 2012 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
11 #ifndef WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_ANDROID_VIDEO_RENDER_OPENGLES20_ H_
12 #define WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_ANDROID_VIDEO_RENDER_OPENGLES20_ H_
13
14 #include "webrtc/modules/video_render/video_render_defines.h"
15
16 #include <GLES2/gl2.h>
17 #include <GLES2/gl2ext.h>
18
19 namespace webrtc
20 {
21
22 class VideoRenderOpenGles20 {
23 public:
24 VideoRenderOpenGles20(int32_t id);
25 ~VideoRenderOpenGles20();
26
27 int32_t Setup(int32_t widht, int32_t height);
28 int32_t Render(const VideoFrame& frameToRender);
29 int32_t SetCoordinates(int32_t zOrder, const float left, const float top,
30 const float right, const float bottom);
31
32 private:
33 void printGLString(const char *name, GLenum s);
34 void checkGlError(const char* op);
35 GLuint loadShader(GLenum shaderType, const char* pSource);
36 GLuint createProgram(const char* pVertexSource,
37 const char* pFragmentSource);
38 void SetupTextures(const VideoFrame& frameToRender);
39 void UpdateTextures(const VideoFrame& frameToRender);
40
41 int32_t _id;
42 GLuint _textureIds[3]; // Texture id of Y,U and V texture.
43 GLuint _program;
44 GLsizei _textureWidth;
45 GLsizei _textureHeight;
46
47 GLfloat _vertices[20];
48 static const char g_indices[];
49
50 static const char g_vertextShader[];
51 static const char g_fragmentShader[];
52
53 };
54
55 } // namespace webrtc
56
57 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_ANDROID_VIDEO_RENDER_OPENGLES 20_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698