| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 jobject j_wrapped_native_i420_buffer = jni->NewObject( | 39 jobject j_wrapped_native_i420_buffer = jni->NewObject( |
| 40 j_wrapped_native_i420_buffer_class, j_wrapped_native_i420_buffer_ctor_id, | 40 j_wrapped_native_i420_buffer_class, j_wrapped_native_i420_buffer_ctor_id, |
| 41 i420_buffer->width(), i420_buffer->height(), y_buffer, | 41 i420_buffer->width(), i420_buffer->height(), y_buffer, |
| 42 i420_buffer->StrideY(), u_buffer, i420_buffer->StrideU(), v_buffer, | 42 i420_buffer->StrideY(), u_buffer, i420_buffer->StrideU(), v_buffer, |
| 43 i420_buffer->StrideV(), jlongFromPointer(i420_buffer.get())); | 43 i420_buffer->StrideV(), jlongFromPointer(i420_buffer.get())); |
| 44 CHECK_EXCEPTION(jni); | 44 CHECK_EXCEPTION(jni); |
| 45 | 45 |
| 46 return j_wrapped_native_i420_buffer; | 46 return j_wrapped_native_i420_buffer; |
| 47 } | 47 } |
| 48 | 48 |
| 49 JOW(void, WrappedNativeI420Buffer_nativeAddRef) | 49 JNI_FUNCTION_DECLARATION(void, |
| 50 (JNIEnv* jni, jclass, jlong j_buffer_pointer) { | 50 WrappedNativeI420Buffer_nativeAddRef, |
| 51 JNIEnv* jni, |
| 52 jclass, |
| 53 jlong j_buffer_pointer) { |
| 51 reinterpret_cast<webrtc::VideoFrameBuffer*>(j_buffer_pointer)->AddRef(); | 54 reinterpret_cast<webrtc::VideoFrameBuffer*>(j_buffer_pointer)->AddRef(); |
| 52 } | 55 } |
| 53 | 56 |
| 54 JOW(void, WrappedNativeI420Buffer_nativeRelease) | 57 JNI_FUNCTION_DECLARATION(void, |
| 55 (JNIEnv* jni, jclass, jlong j_buffer_pointer) { | 58 WrappedNativeI420Buffer_nativeRelease, |
| 59 JNIEnv* jni, |
| 60 jclass, |
| 61 jlong j_buffer_pointer) { |
| 56 reinterpret_cast<webrtc::VideoFrameBuffer*>(j_buffer_pointer)->Release(); | 62 reinterpret_cast<webrtc::VideoFrameBuffer*>(j_buffer_pointer)->Release(); |
| 57 } | 63 } |
| 58 | 64 |
| 59 } // namespace webrtc_jni | 65 } // namespace webrtc_jni |
| OLD | NEW |