| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 *j_frame_class_, j_i420_frame_ctor_id_, | 788 *j_frame_class_, j_i420_frame_ctor_id_, |
| 789 frame->width(), frame->height(), | 789 frame->width(), frame->height(), |
| 790 static_cast<int>(frame->rotation()), | 790 static_cast<int>(frame->rotation()), |
| 791 strides, planes, javaShallowCopy(frame)); | 791 strides, planes, javaShallowCopy(frame)); |
| 792 } | 792 } |
| 793 | 793 |
| 794 // Return a VideoRenderer.I420Frame referring texture object in |frame|. | 794 // Return a VideoRenderer.I420Frame referring texture object in |frame|. |
| 795 jobject CricketToJavaTextureFrame(const cricket::VideoFrame* frame) { | 795 jobject CricketToJavaTextureFrame(const cricket::VideoFrame* frame) { |
| 796 NativeHandleImpl* handle = reinterpret_cast<NativeHandleImpl*>( | 796 NativeHandleImpl* handle = reinterpret_cast<NativeHandleImpl*>( |
| 797 frame->video_frame_buffer()->native_handle()); | 797 frame->video_frame_buffer()->native_handle()); |
| 798 jfloatArray sampling_matrix = jni()->NewFloatArray(16); | 798 jfloatArray sampling_matrix = handle->sampling_matrix.ToJava(jni()); |
| 799 jni()->SetFloatArrayRegion(sampling_matrix, 0, 16, handle->sampling_matrix); | 799 |
| 800 return jni()->NewObject( | 800 return jni()->NewObject( |
| 801 *j_frame_class_, j_texture_frame_ctor_id_, | 801 *j_frame_class_, j_texture_frame_ctor_id_, |
| 802 frame->width(), frame->height(), | 802 frame->width(), frame->height(), |
| 803 static_cast<int>(frame->rotation()), | 803 static_cast<int>(frame->rotation()), |
| 804 handle->oes_texture_id, sampling_matrix, javaShallowCopy(frame)); | 804 handle->oes_texture_id, sampling_matrix, javaShallowCopy(frame)); |
| 805 } | 805 } |
| 806 | 806 |
| 807 JNIEnv* jni() { | 807 JNIEnv* jni() { |
| 808 return AttachCurrentThreadIfNeeded(); | 808 return AttachCurrentThreadIfNeeded(); |
| 809 } | 809 } |
| (...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2248 return JavaStringFromStdString( | 2248 return JavaStringFromStdString( |
| 2249 jni, | 2249 jni, |
| 2250 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 2250 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); |
| 2251 } | 2251 } |
| 2252 | 2252 |
| 2253 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 2253 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { |
| 2254 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 2254 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); |
| 2255 } | 2255 } |
| 2256 | 2256 |
| 2257 } // namespace webrtc_jni | 2257 } // namespace webrtc_jni |
| OLD | NEW |