media/gpu/v4l2: add GetVideoFrame() method to buffer references
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:Hirokazu Honda <hiroh@chromium.org> Cr-Commit-Position: refs/heads/master@{#642386}
Showing
Please register or sign in to comment