Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: webrtc/api/java/jni/androidmediaencoder_jni.cc

Issue 1900673002: Delete webrtc::VideoFrame methods buffer and stride. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/common_video/i420_video_frame_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 bool key_frame, const webrtc::VideoFrame& frame, int input_buffer_index) { 786 bool key_frame, const webrtc::VideoFrame& frame, int input_buffer_index) {
787 RTC_DCHECK(codec_thread_checker_.CalledOnValidThread()); 787 RTC_DCHECK(codec_thread_checker_.CalledOnValidThread());
788 RTC_CHECK(!use_surface_); 788 RTC_CHECK(!use_surface_);
789 789
790 jobject j_input_buffer = input_buffers_[input_buffer_index]; 790 jobject j_input_buffer = input_buffers_[input_buffer_index];
791 uint8_t* yuv_buffer = 791 uint8_t* yuv_buffer =
792 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_input_buffer)); 792 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_input_buffer));
793 CHECK_EXCEPTION(jni); 793 CHECK_EXCEPTION(jni);
794 RTC_CHECK(yuv_buffer) << "Indirect buffer??"; 794 RTC_CHECK(yuv_buffer) << "Indirect buffer??";
795 RTC_CHECK(!libyuv::ConvertFromI420( 795 RTC_CHECK(!libyuv::ConvertFromI420(
796 frame.buffer(webrtc::kYPlane), frame.stride(webrtc::kYPlane), 796 frame.video_frame_buffer()->DataY(),
797 frame.buffer(webrtc::kUPlane), frame.stride(webrtc::kUPlane), 797 frame.video_frame_buffer()->StrideY(),
798 frame.buffer(webrtc::kVPlane), frame.stride(webrtc::kVPlane), 798 frame.video_frame_buffer()->DataU(),
799 frame.video_frame_buffer()->StrideU(),
800 frame.video_frame_buffer()->DataV(),
801 frame.video_frame_buffer()->StrideV(),
799 yuv_buffer, width_, width_, height_, encoder_fourcc_)) 802 yuv_buffer, width_, width_, height_, encoder_fourcc_))
800 << "ConvertFromI420 failed"; 803 << "ConvertFromI420 failed";
801 804
802 bool encode_status = jni->CallBooleanMethod(*j_media_codec_video_encoder_, 805 bool encode_status = jni->CallBooleanMethod(*j_media_codec_video_encoder_,
803 j_encode_buffer_method_, 806 j_encode_buffer_method_,
804 key_frame, 807 key_frame,
805 input_buffer_index, 808 input_buffer_index,
806 yuv_size_, 809 yuv_size_,
807 current_timestamp_us_); 810 current_timestamp_us_);
808 CHECK_EXCEPTION(jni); 811 CHECK_EXCEPTION(jni);
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 return supported_codecs_; 1270 return supported_codecs_;
1268 } 1271 }
1269 1272
1270 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( 1273 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder(
1271 webrtc::VideoEncoder* encoder) { 1274 webrtc::VideoEncoder* encoder) {
1272 ALOGD << "Destroy video encoder."; 1275 ALOGD << "Destroy video encoder.";
1273 delete encoder; 1276 delete encoder;
1274 } 1277 }
1275 1278
1276 } // namespace webrtc_jni 1279 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_video/i420_video_frame_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698