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}