• Frank Liberato's avatar
    Add WIP Mojo D3D11VideoDecoder. · 33eeaea4
    Frank Liberato authored
    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 <liberato@chromium.org>
    Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#509615}
    33eeaea4
d3d11_video_decoder.cc 5.63 KB