Re-land "Convert native handles to buffers before encoding."

This reverts commit a67675506c9057bd9ffd4d76aae8b743343d434d.

BUG=webrtc:4081
TBR=magjed@webrtc.org

Review URL: https://codereview.webrtc.org/1158273010

Cr-Commit-Position: refs/heads/master@{#9381}
This commit is contained in:
Peter Boström
2015-06-05 11:08:03 +02:00
parent 3fbf3f8841
commit eb66e800d1
19 changed files with 211 additions and 143 deletions

View File

@ -654,9 +654,9 @@ bool MediaCodecVideoDecoder::DeliverPendingOutputs(
int32_t callback_status = WEBRTC_VIDEO_CODEC_OK;
if (use_surface_) {
native_handle_.SetTextureObject(surface_texture_, texture_id);
VideoFrame texture_image(&native_handle_, width, height, output_timestamp_,
0, webrtc::kVideoRotation_0,
rtc::Callback0<void>());
VideoFrame texture_image(new rtc::RefCountedObject<JniNativeHandleBuffer>(
&native_handle_, width, height),
output_timestamp_, 0, webrtc::kVideoRotation_0);
texture_image.set_ntp_time_ms(output_ntp_time_ms_);
callback_status = callback_->Decoded(texture_image);
} else {