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 #ifndef WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_ | 11 #ifndef WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_ |
12 #define WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_ | 12 #define WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_ |
13 | 13 |
14 #include <jni.h> | 14 #include <jni.h> |
15 | 15 |
16 #include "webrtc/api/video/video_frame_buffer.h" | |
the sun
2016/11/24 10:36:59
nit: include order here as well (not going to comm
nisse-webrtc
2016/11/25 08:58:02
Done a git cl format, and manual review of include
| |
16 #include "webrtc/api/android/jni/jni_helpers.h" | 17 #include "webrtc/api/android/jni/jni_helpers.h" |
17 #include "webrtc/api/android/jni/native_handle_impl.h" | 18 #include "webrtc/api/android/jni/native_handle_impl.h" |
18 #include "webrtc/base/refcount.h" | 19 #include "webrtc/base/refcount.h" |
19 #include "webrtc/base/scoped_ref_ptr.h" | 20 #include "webrtc/base/scoped_ref_ptr.h" |
20 #include "webrtc/common_video/include/video_frame_buffer.h" | |
21 | 21 |
22 namespace webrtc_jni { | 22 namespace webrtc_jni { |
23 | 23 |
24 // Helper class to create and synchronize access to an Android SurfaceTexture. | 24 // Helper class to create and synchronize access to an Android SurfaceTexture. |
25 // It is used for creating webrtc::VideoFrameBuffers from a SurfaceTexture when | 25 // It is used for creating webrtc::VideoFrameBuffers from a SurfaceTexture when |
26 // the SurfaceTexture has been updated. | 26 // the SurfaceTexture has been updated. |
27 // When the VideoFrameBuffer is released, this class returns the buffer to the | 27 // When the VideoFrameBuffer is released, this class returns the buffer to the |
28 // java SurfaceTextureHelper so it can be updated safely. The VideoFrameBuffer | 28 // java SurfaceTextureHelper so it can be updated safely. The VideoFrameBuffer |
29 // can be released on an arbitrary thread. | 29 // can be released on an arbitrary thread. |
30 // SurfaceTextureHelper is reference counted to make sure that it is not | 30 // SurfaceTextureHelper is reference counted to make sure that it is not |
(...skipping 28 matching lines...) Loading... | |
59 SurfaceTextureHelper(JNIEnv* jni, jobject j_surface_texture_helper); | 59 SurfaceTextureHelper(JNIEnv* jni, jobject j_surface_texture_helper); |
60 | 60 |
61 private: | 61 private: |
62 const ScopedGlobalRef<jobject> j_surface_texture_helper_; | 62 const ScopedGlobalRef<jobject> j_surface_texture_helper_; |
63 const jmethodID j_return_texture_method_; | 63 const jmethodID j_return_texture_method_; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace webrtc_jni | 66 } // namespace webrtc_jni |
67 | 67 |
68 #endif // WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_ | 68 #endif // WEBRTC_API_JAVA_JNI_SURFACETEXTUREHELPER_JNI_H_ |
OLD | NEW |