• Alexandre Courbot's avatar
    media/gpu/v4l2: add GetVideoFrame() method to buffer references · 86def151
    Alexandre Courbot authored
    Creating a VideoFrame instance from a V4L2 buffer reference is a common
    operation. The best place to do this is in the buffer reference itself,
    since it can export the required DMABUFs itself, has a reference to its
    own device, knows about its own layout, and can cache and reuse the
    VideoFrame instance instead of creating a new one for each request.
    
    This CL adds (and uses) such a method. Although it only works for MMAP
    buffers, it will probably be extended in the future to other kinds of
    buffers when they support queueing a VideoFrame directly.
    
    Bug: 792790
    Test: VDA unittest passed in regular and import mode on Hana.
    Test: VEA unittest passed on Peach_pit.
    
    Change-Id: If387d8f11f8a5c72d7fc26907f5c9bea4835d8b6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1517503
    Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
    Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#642386}
    86def151
v4l2_video_decode_accelerator.h 24.9 KB