• Dan Sanders's avatar
    [media] Reland: Add interface for VDAs to Decode() media::DecoderBuffers. · 65496f51
    Dan Sanders authored
    Using DecoderBuffer removes the need to provided SharedMemoryHandles in
    cases that SharedMemory is not already allocated (in particular, when
    VDAs are used through MojoVideoDecoder+VdaVideoDecoder). Since
    base::SharedMemory is not an interface, a new type is required, and
    DecoderBuffer already implements a suitable interface for this use case.
    
    This CL adds:
      - A VideoDecodeAccelerator::Decode() overload for decoding
        DecoderBuffers, which VDAs may optionally implement.
        Note that VdaVideoDecoder will require this, and therefore all VDAs
        will be updated to support DecoderBuffers over time.
      - Support for SHM in DecoderBuffer. This eases the transition by
        allowing BitstreamBuffers to be easily converted to equivalent
        DecoderBuffers.
      - An implementation of the new VideoDecodeAccelerator::Decode()
        overload in VTVideoDecodeAccelerator.
      - Calling the new overload from VdaVideoDecoder.
    
    Originally landed as 4596c802. This
    reland removes a DCHECK() in unaligned_shared_memory_unittest.cc so that
    SHM is still allocated when DCHECKs are disabled.
    
    Bug: 522298
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
    Change-Id: Id5d6bb103070dfcb23e3db82c68d2ead23b9e3b5
    Reviewed-on: https://chromium-review.googlesource.com/1028834
    Commit-Queue: Dan Sanders <sandersd@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#553875}
    65496f51
vda_video_decoder_unittest.cc 13.7 KB