Pass the bitstream buffer timestamp to AndroidVideoDecodeAccelerator
commit5a0c5474bd3c7bffd0ea1573369533077e16773d
authorwatk <watk@chromium.org>
Fri, 4 Sep 2015 17:53:07 +0000 (4 10:53 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 4 Sep 2015 17:54:31 +0000 (4 17:54 +0000)
treeb8ffecea543502fc45dcf73caa9c490a21639a2a
parentdffdacb3fbb1619a988d1e2b593356e9f8350a07
Pass the bitstream buffer timestamp to AndroidVideoDecodeAccelerator

On certain devices MediaCodec relies on the input buffer timestamps to
order the output frames. Previously AVDA was abusing the timestamp
field to pass through the bitstream buffer id, which counts up in
decode order. This results in output frames being delivered in decode
order (bitstream buffer id order) by at least one decoder.

Now BitstreamBuffer has an optional timestamp field which AVDA
requires to be valid. Buffers are given to MediaCodec with the correct
timestamps and mapped back to ids when returning output Pictures to the
client.

This is can be cleaned up when the VDA interface is updated to include
the timestamp (http://crbug.com/522298)

BUG=523053
TEST=Manually, including apprtc.appspot.com

Review URL: https://codereview.chromium.org/1315323004

Cr-Commit-Position: refs/heads/master@{#347444}
content/common/gpu/client/gpu_video_decode_accelerator_host.cc
content/common/gpu/gpu_messages.h
content/common/gpu/media/android_video_decode_accelerator.cc
content/common/gpu/media/android_video_decode_accelerator.h
content/common/gpu/media/gpu_video_decode_accelerator.cc
content/common/gpu/media/gpu_video_decode_accelerator.h
content/renderer/media/rtc_video_decoder.cc
media/base/bitstream_buffer.h
media/filters/gpu_video_decoder.cc