| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 #include <GLES2/gl2.h> | 11 #include <GLES2/gl2.h> |
| 12 #include <GLES2/gl2ext.h> | 12 #include <GLES2/gl2ext.h> |
| 13 | 13 |
| 14 #include <stdio.h> | 14 #include <stdio.h> |
| 15 #include <stdlib.h> | 15 #include <stdlib.h> |
| 16 | 16 |
| 17 #include "webrtc/modules/video_render/android/video_render_opengles20.h" | 17 #include "webrtc/modules/video_render/android/video_render_opengles20.h" |
| 18 | 18 |
| 19 //#define ANDROID_LOG | 19 //#define ANDROID_LOG |
| 20 | 20 |
| 21 #ifdef ANDROID_LOG | 21 #ifdef ANDROID_LOG |
| 22 #include <android/log.h> | 22 #include <android/log.h> |
| 23 #include <stdio.h> | 23 #include <stdio.h> |
| 24 | 24 |
| 25 #undef WEBRTC_TRACE | 25 #undef WEBRTC_TRACE |
| 26 #define WEBRTC_TRACE(a,b,c,...) __android_log_print(ANDROID_LOG_DEBUG, "*WEBRTC
N*", __VA_ARGS__) | 26 #define WEBRTC_TRACE(a,b,c,...) __android_log_print(ANDROID_LOG_DEBUG, "*WEBRTC
N*", __VA_ARGS__) |
| 27 #else | 27 #else |
| 28 #include "webrtc/system_wrappers/interface/trace.h" | 28 #include "webrtc/system_wrappers/include/trace.h" |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 namespace webrtc { | 31 namespace webrtc { |
| 32 | 32 |
| 33 const char VideoRenderOpenGles20::g_indices[] = { 0, 3, 2, 0, 2, 1 }; | 33 const char VideoRenderOpenGles20::g_indices[] = { 0, 3, 2, 0, 2, 1 }; |
| 34 | 34 |
| 35 const char VideoRenderOpenGles20::g_vertextShader[] = { | 35 const char VideoRenderOpenGles20::g_vertextShader[] = { |
| 36 "attribute vec4 aPosition;\n" | 36 "attribute vec4 aPosition;\n" |
| 37 "attribute vec2 aTextureCoord;\n" | 37 "attribute vec2 aTextureCoord;\n" |
| 38 "varying vec2 vTextureCoord;\n" | 38 "varying vec2 vTextureCoord;\n" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 glActiveTexture(GL_TEXTURE2); | 389 glActiveTexture(GL_TEXTURE2); |
| 390 glBindTexture(GL_TEXTURE_2D, _textureIds[2]); | 390 glBindTexture(GL_TEXTURE_2D, _textureIds[2]); |
| 391 GlTexSubImage2D(width / 2, height / 2, frameToRender.stride(kVPlane), | 391 GlTexSubImage2D(width / 2, height / 2, frameToRender.stride(kVPlane), |
| 392 frameToRender.buffer(kVPlane)); | 392 frameToRender.buffer(kVPlane)); |
| 393 | 393 |
| 394 checkGlError("UpdateTextures"); | 394 checkGlError("UpdateTextures"); |
| 395 } | 395 } |
| 396 | 396 |
| 397 } // namespace webrtc | 397 } // namespace webrtc |
| OLD | NEW |