• hshi's avatar
    VAAPI Wrapper: refactor management of drm file · 9583705f
    hshi authored
    Make sure we use the same file in all instances of VaapiWrapper.
    
    Define a refcounted global instance of VADisplayState that is only initialized
    (via vaInitialize()) once and destroyed upon release of the last refcount.
    This ensures a single drm_intel_bufmgr per fd, and avoids the double-close
    problem as seen in bug 464628.
    
    Pipe a PreSandboxInitialization to open the render node before starting sandbox.
    
    After this CL the VEA/VDA unittests need to invoke the PreSandboxInitialization
    as well.
    
    BUG=475250
    TEST=verify HW video works on link (check histograms) and VDA/VEA unittests
    
    Review URL: https://codereview.chromium.org/1137483002
    
    Cr-Commit-Position: refs/heads/master@{#329410}
    9583705f
vaapi_wrapper.h 14 KB