Add WIP Mojo D3D11VideoDecoder

Desktop / Chromium - Frank Liberato [chromium.org] - 17 October 2017 20:10 EDT

This is a WIP. Basic playback works, though EOS is ignored. There is quite a bit of thread-hopping, since the accelerator / decoder is run on the GPU main thread rather than the mojo thread. This will be eliminated in a later CL.

Resource cleanup is of the "and the process will exit anyway" variety.

It's based heavily on D3D11VideoDecodeAccelerator. Re-uses the H264 Accelerated Video Decoder for D3D11. The accelerator was written with the VDA in mind, so the VideoDecoder jumps through some minor hoops to use it also. It is intended that this will replace the VDA as soon as it reaches parity with it, and the accelerator can be modified for easier use with the VideoDecoder.

Set "enable_d3d11_video_decoder=true" in gn config. This will enable the decoder, and:- enable MojoVideoDecoder- enable mojo CDM
- set the media mojo host to be the GPU process.

Also incorporates fixes to the d3d11_h264_accelerator from: https://chromium-review.googlesource.com/c/chromium/src/+/661237 by rkuroiwa@ .

Bug: Change-Id: Ie5f2b651895bc812e5e6bba7c5eb302f2702a1b6 Reviewed-on: https://chromium-review.googlesource.com/693284 Commit-Queue: Frank Liberato

33eeaea Add WIP Mojo D3D11VideoDecoder.
media/gpu/BUILD.gn | 9 +
media/gpu/d3d11_h264_accelerator.cc | 58 ++-
media/gpu/d3d11_h264_accelerator.h | 26 +-
media/gpu/windows/d3d11_video_decoder.cc | 145 ++++++++
media/gpu/windows/d3d11_video_decoder.h | 82 +++++
media/gpu/windows/d3d11_video_decoder_impl.cc | 406 +++++++++++++++++++++
media/gpu/windows/d3d11_video_decoder_impl.h | 97 +++++
media/gpu/windows/output_with_release_mailbox_cb.h | 22 ++
media/media_options.gni | 18 +-
media/mojo/services/gpu_mojo_media_client.cc | 20 +-
10 files changed, 866 insertions(+), 17 deletions(-)

Upstream: git.chromium.org


  • Share