| Index: media/base/android/media_decoder_job.cc
|
| diff --git a/media/base/android/media_decoder_job.cc b/media/base/android/media_decoder_job.cc
|
| index b7eef0cdfbfbdb0769aaab6b621fda43f2948108..4102d97f0c5cbb13e48fef0c0302d1ec8c95d938 100644
|
| --- a/media/base/android/media_decoder_job.cc
|
| +++ b/media/base/android/media_decoder_job.cc
|
| @@ -73,7 +73,8 @@ void MediaDecoderJob::OnDataReceived(const DemuxerData& data) {
|
|
|
| base::Closure done_cb = base::ResetAndReturn(&on_data_received_cb_);
|
| if (stop_decode_pending_) {
|
| - OnDecodeCompleted(MEDIA_CODEC_STOPPED, kNoTimestamp(), 0);
|
| + OnDecodeCompleted(MEDIA_CODEC_STOPPED, kNoTimestamp(), 0, 0,
|
| + base::TimeTicks());
|
| return;
|
| }
|
|
|
| @@ -270,7 +271,7 @@ void MediaDecoderJob::DecodeCurrentAccessUnit(
|
| base::Unretained(this),
|
| MEDIA_CODEC_DEQUEUE_INPUT_AGAIN_LATER,
|
| kNoTimestamp(),
|
| - 0));
|
| + 0, 0, base::TimeTicks()));
|
| return;
|
| }
|
|
|
| @@ -299,7 +300,7 @@ void MediaDecoderJob::DecodeInternal(
|
| output_eos_encountered_ = false;
|
| MediaCodecStatus reset_status = media_codec_bridge_->Reset();
|
| if (MEDIA_CODEC_OK != reset_status) {
|
| - callback.Run(reset_status, kNoTimestamp(), 0);
|
| + callback.Run(reset_status, kNoTimestamp(), 0, 0, base::TimeTicks());
|
| return;
|
| }
|
| }
|
| @@ -312,7 +313,7 @@ void MediaDecoderJob::DecodeInternal(
|
| // For aborted access unit, just skip it and inform the player.
|
| if (unit.status == DemuxerStream::kAborted) {
|
| // TODO(qinmin): use a new enum instead of MEDIA_CODEC_STOPPED.
|
| - callback.Run(MEDIA_CODEC_STOPPED, kNoTimestamp(), 0);
|
| + callback.Run(MEDIA_CODEC_STOPPED, kNoTimestamp(), 0, 0, base::TimeTicks());
|
| return;
|
| }
|
|
|
| @@ -320,7 +321,8 @@ void MediaDecoderJob::DecodeInternal(
|
| if (unit.end_of_stream || unit.data.empty()) {
|
| input_eos_encountered_ = true;
|
| output_eos_encountered_ = true;
|
| - callback.Run(MEDIA_CODEC_OUTPUT_END_OF_STREAM, kNoTimestamp(), 0);
|
| + callback.Run(MEDIA_CODEC_OUTPUT_END_OF_STREAM, kNoTimestamp(), 0, 0,
|
| + base::TimeTicks());
|
| return;
|
| }
|
|
|
| @@ -333,7 +335,7 @@ void MediaDecoderJob::DecodeInternal(
|
| if (input_status == MEDIA_CODEC_INPUT_END_OF_STREAM) {
|
| input_eos_encountered_ = true;
|
| } else if (input_status != MEDIA_CODEC_OK) {
|
| - callback.Run(input_status, kNoTimestamp(), 0);
|
| + callback.Run(input_status, kNoTimestamp(), 0, 0, base::TimeTicks());
|
| return;
|
| }
|
| }
|
| @@ -360,7 +362,7 @@ void MediaDecoderJob::DecodeInternal(
|
| !media_codec_bridge_->GetOutputBuffers()) {
|
| status = MEDIA_CODEC_ERROR;
|
| }
|
| - callback.Run(status, kNoTimestamp(), 0);
|
| + callback.Run(status, kNoTimestamp(), 0, 0, base::TimeTicks());
|
| return;
|
| }
|
|
|
| @@ -412,7 +414,8 @@ void MediaDecoderJob::DecodeInternal(
|
|
|
| void MediaDecoderJob::OnDecodeCompleted(
|
| MediaCodecStatus status, base::TimeDelta presentation_timestamp,
|
| - size_t audio_output_bytes) {
|
| + size_t audio_output_bytes, int64 audio_head_position,
|
| + base::TimeTicks audio_render_time) {
|
| DCHECK(ui_task_runner_->BelongsToCurrentThread());
|
|
|
| if (destroy_pending_) {
|
| @@ -447,8 +450,9 @@ void MediaDecoderJob::OnDecodeCompleted(
|
| };
|
|
|
| stop_decode_pending_ = false;
|
| - base::ResetAndReturn(&decode_cb_).Run(status, presentation_timestamp,
|
| - audio_output_bytes);
|
| + base::ResetAndReturn(&decode_cb_).Run(
|
| + status, presentation_timestamp, audio_output_bytes, audio_head_position,
|
| + audio_render_time);
|
| }
|
|
|
| const AccessUnit& MediaDecoderJob::CurrentAccessUnit() const {
|
|
|