• Isuru Pathirana's avatar
    Reland [Win Camera Capture]Use D3D11 with Media Foundation Video Capture · c36b0902
    Isuru Pathirana authored
    This is a reland of f2f4de88.
    The original version of this change caused crashes when running the
    capture unit tests on Win7 (due to the MF DXGI Device Manager not being
    supported on Win7).
    
    The capture unit tests have been updated to skip MF D3D11 tests on Win7
     or earlier.
    
    Original CL description:
    
    [Win Camera Capture] Use D3D11 with Media Foundation Video Capture
    
    This CL updates the VideoCaptureDeviceFactoryWin/VideoCaptureDeviceMFWin
    implementations to use D3D11 with the MF device source and capture
    engine. The VideoCaptureDeviceFactoryWin creates and manages an
    IMFDXGIDeviceManager and associated D3D11 device instance. It provides
    the IMFDXGIDeviceManager to the MF device source and also plumbs it to
    the VideoCaptureDeviceMFWin implementation. The VideoCaptureDeviceMFWin
    implementation subsequently provides the IMFDXGIDeviceManager to the MF
    capture engine on initialization.
    
    Providing a MF DXGI device manager to the MF device source and capture
    engine is required for zero-copy capture (it allows the Windows frame
    server service and MF capture engine to keep captured video frames in
    GPU memory and expose MF samples backed by D3D11 textures).
    
    Bug: 1120900
    Change-Id: I41f1ef14e7040c84fa63e0ad2618330d73e7cdc6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434469Reviewed-by: default avatarIlya Nikolaevskiy <ilnik@chromium.org>
    Reviewed-by: default avatarMarkus Handell <handellm@google.com>
    Reviewed-by: default avatarHenrik Andreasson <henrika@chromium.org>
    Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
    Commit-Queue: Isuru Pathirana <Isuru.Pathirana@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#811483}
    c36b0902
BUILD.gn 16.7 KB