| 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 | 
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 788     bool key_frame, const webrtc::VideoFrame& frame, int input_buffer_index) { | 788     bool key_frame, const webrtc::VideoFrame& frame, int input_buffer_index) { | 
| 789   RTC_DCHECK(codec_thread_checker_.CalledOnValidThread()); | 789   RTC_DCHECK(codec_thread_checker_.CalledOnValidThread()); | 
| 790   RTC_CHECK(!use_surface_); | 790   RTC_CHECK(!use_surface_); | 
| 791 | 791 | 
| 792   jobject j_input_buffer = input_buffers_[input_buffer_index]; | 792   jobject j_input_buffer = input_buffers_[input_buffer_index]; | 
| 793   uint8_t* yuv_buffer = | 793   uint8_t* yuv_buffer = | 
| 794       reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_input_buffer)); | 794       reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_input_buffer)); | 
| 795   CHECK_EXCEPTION(jni); | 795   CHECK_EXCEPTION(jni); | 
| 796   RTC_CHECK(yuv_buffer) << "Indirect buffer??"; | 796   RTC_CHECK(yuv_buffer) << "Indirect buffer??"; | 
| 797   RTC_CHECK(!libyuv::ConvertFromI420( | 797   RTC_CHECK(!libyuv::ConvertFromI420( | 
| 798       frame.buffer(webrtc::kYPlane), frame.stride(webrtc::kYPlane), | 798       frame.video_frame_buffer()->DataY(), | 
| 799       frame.buffer(webrtc::kUPlane), frame.stride(webrtc::kUPlane), | 799       frame.video_frame_buffer()->StrideY(), | 
| 800       frame.buffer(webrtc::kVPlane), frame.stride(webrtc::kVPlane), | 800       frame.video_frame_buffer()->DataU(), | 
|  | 801       frame.video_frame_buffer()->StrideU(), | 
|  | 802       frame.video_frame_buffer()->DataV(), | 
|  | 803       frame.video_frame_buffer()->StrideV(), | 
| 801       yuv_buffer, width_, width_, height_, encoder_fourcc_)) | 804       yuv_buffer, width_, width_, height_, encoder_fourcc_)) | 
| 802       << "ConvertFromI420 failed"; | 805       << "ConvertFromI420 failed"; | 
| 803 | 806 | 
| 804   bool encode_status = jni->CallBooleanMethod(*j_media_codec_video_encoder_, | 807   bool encode_status = jni->CallBooleanMethod(*j_media_codec_video_encoder_, | 
| 805                                               j_encode_buffer_method_, | 808                                               j_encode_buffer_method_, | 
| 806                                               key_frame, | 809                                               key_frame, | 
| 807                                               input_buffer_index, | 810                                               input_buffer_index, | 
| 808                                               yuv_size_, | 811                                               yuv_size_, | 
| 809                                               current_timestamp_us_); | 812                                               current_timestamp_us_); | 
| 810   CHECK_EXCEPTION(jni); | 813   CHECK_EXCEPTION(jni); | 
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1269   return supported_codecs_; | 1272   return supported_codecs_; | 
| 1270 } | 1273 } | 
| 1271 | 1274 | 
| 1272 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 1275 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 
| 1273     webrtc::VideoEncoder* encoder) { | 1276     webrtc::VideoEncoder* encoder) { | 
| 1274   ALOGD << "Destroy video encoder."; | 1277   ALOGD << "Destroy video encoder."; | 
| 1275   delete encoder; | 1278   delete encoder; | 
| 1276 } | 1279 } | 
| 1277 | 1280 | 
| 1278 }  // namespace webrtc_jni | 1281 }  // namespace webrtc_jni | 
| OLD | NEW | 
|---|