| 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 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2228 | 2228 | 
| 2229   int ret = libyuv::I420Scale( | 2229   int ret = libyuv::I420Scale( | 
| 2230       src_y, j_src_stride_y, src_u, j_src_stride_u, src_v, j_src_stride_v, | 2230       src_y, j_src_stride_y, src_u, j_src_stride_u, src_v, j_src_stride_v, | 
| 2231       width, height, dst_y, dst_stride_y, dst_u, dst_stride_u, dst_v, | 2231       width, height, dst_y, dst_stride_y, dst_u, dst_stride_u, dst_v, | 
| 2232       dst_stride_v, dstWidth, dstHeight, libyuv::kFilterBilinear); | 2232       dst_stride_v, dstWidth, dstHeight, libyuv::kFilterBilinear); | 
| 2233   if (ret) { | 2233   if (ret) { | 
| 2234     LOG(LS_ERROR) << "Error scaling I420 frame: " << ret; | 2234     LOG(LS_ERROR) << "Error scaling I420 frame: " << ret; | 
| 2235   } | 2235   } | 
| 2236 } | 2236 } | 
| 2237 | 2237 | 
|  | 2238 JOW(jobject, VideoFileRenderer_nativeCreateNativeByteBuffer) | 
|  | 2239 (JNIEnv* jni, jclass, jint size) { | 
|  | 2240   void* new_data = ::operator new(size); | 
|  | 2241   jobject byte_buffer = jni->NewDirectByteBuffer(new_data, size); | 
|  | 2242   return byte_buffer; | 
|  | 2243 } | 
|  | 2244 | 
|  | 2245 JOW(void, VideoFileRenderer_nativeFreeNativeByteBuffer) | 
|  | 2246 (JNIEnv* jni, jclass, jobject byte_buffer) { | 
|  | 2247   void* data = jni->GetDirectBufferAddress(byte_buffer); | 
|  | 2248   ::operator delete(data); | 
|  | 2249 } | 
|  | 2250 | 
| 2238 JOW(jstring, MediaStreamTrack_nativeId)(JNIEnv* jni, jclass, jlong j_p) { | 2251 JOW(jstring, MediaStreamTrack_nativeId)(JNIEnv* jni, jclass, jlong j_p) { | 
| 2239   return JavaStringFromStdString( | 2252   return JavaStringFromStdString( | 
| 2240       jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->id()); | 2253       jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->id()); | 
| 2241 } | 2254 } | 
| 2242 | 2255 | 
| 2243 JOW(jstring, MediaStreamTrack_nativeKind)(JNIEnv* jni, jclass, jlong j_p) { | 2256 JOW(jstring, MediaStreamTrack_nativeKind)(JNIEnv* jni, jclass, jlong j_p) { | 
| 2244   return JavaStringFromStdString( | 2257   return JavaStringFromStdString( | 
| 2245       jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->kind()); | 2258       jni, reinterpret_cast<MediaStreamTrackInterface*>(j_p)->kind()); | 
| 2246 } | 2259 } | 
| 2247 | 2260 | 
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2594   reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer) | 2607   reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer) | 
| 2595       ->SetObserver(nullptr); | 2608       ->SetObserver(nullptr); | 
| 2596   RtpReceiverObserver* observer = | 2609   RtpReceiverObserver* observer = | 
| 2597       reinterpret_cast<RtpReceiverObserver*>(j_observer_pointer); | 2610       reinterpret_cast<RtpReceiverObserver*>(j_observer_pointer); | 
| 2598   if (observer) { | 2611   if (observer) { | 
| 2599     delete observer; | 2612     delete observer; | 
| 2600   } | 2613   } | 
| 2601 } | 2614 } | 
| 2602 | 2615 | 
| 2603 }  // namespace webrtc_jni | 2616 }  // namespace webrtc_jni | 
| OLD | NEW | 
|---|