OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 | 11 |
12 #include "webrtc/sdk/android/src/jni/surfacetexturehelper_jni.h" | 12 #include "webrtc/sdk/android/src/jni/surfacetexturehelper_jni.h" |
13 | 13 |
| 14 #include "webrtc/rtc_base/bind.h" |
| 15 #include "webrtc/rtc_base/checks.h" |
| 16 #include "webrtc/rtc_base/logging.h" |
14 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" | 17 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" |
15 #include "webrtc/base/bind.h" | |
16 #include "webrtc/base/checks.h" | |
17 #include "webrtc/base/logging.h" | |
18 | 18 |
19 namespace webrtc_jni { | 19 namespace webrtc_jni { |
20 | 20 |
21 rtc::scoped_refptr<SurfaceTextureHelper> SurfaceTextureHelper::create( | 21 rtc::scoped_refptr<SurfaceTextureHelper> SurfaceTextureHelper::create( |
22 JNIEnv* jni, | 22 JNIEnv* jni, |
23 const char* thread_name, | 23 const char* thread_name, |
24 jobject j_egl_context) { | 24 jobject j_egl_context) { |
25 jobject j_surface_texture_helper = jni->CallStaticObjectMethod( | 25 jobject j_surface_texture_helper = jni->CallStaticObjectMethod( |
26 FindClass(jni, "org/webrtc/SurfaceTextureHelper"), | 26 FindClass(jni, "org/webrtc/SurfaceTextureHelper"), |
27 GetStaticMethodID(jni, FindClass(jni, "org/webrtc/SurfaceTextureHelper"), | 27 GetStaticMethodID(jni, FindClass(jni, "org/webrtc/SurfaceTextureHelper"), |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 rtc::scoped_refptr<webrtc::VideoFrameBuffer> | 74 rtc::scoped_refptr<webrtc::VideoFrameBuffer> |
75 SurfaceTextureHelper::CreateTextureFrame(int width, int height, | 75 SurfaceTextureHelper::CreateTextureFrame(int width, int height, |
76 const NativeHandleImpl& native_handle) { | 76 const NativeHandleImpl& native_handle) { |
77 return new rtc::RefCountedObject<AndroidTextureBuffer>( | 77 return new rtc::RefCountedObject<AndroidTextureBuffer>( |
78 width, height, native_handle, *j_surface_texture_helper_, | 78 width, height, native_handle, *j_surface_texture_helper_, |
79 rtc::Bind(&SurfaceTextureHelper::ReturnTextureFrame, this)); | 79 rtc::Bind(&SurfaceTextureHelper::ReturnTextureFrame, this)); |
80 } | 80 } |
81 | 81 |
82 } // namespace webrtc_jni | 82 } // namespace webrtc_jni |
OLD | NEW |