Commit 660e3c77 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Commit Bot

media/gpu/v4l2: add queue management classes

Add the V4L2Queue class, that manages buffers allocations and queuing.
Users of this class don't have to manage the set of free buffers
themselves, which will help factorizing a considerable amount of code
and reduce the potential for bugs.

Users of V4L2Queue can obtain a unique reference to a free buffer that
they can prepare and queue. Dequeued buffers come in the form of a
refcounted buffer instance, which puts the V4L2 buffer back into the
list of free buffer as it is destroyed. This greatly simplifies V4L2
buffers lifecycle, which is now managed by short functions which
invariants can be precisely enforced.

BUG=792790
TEST=Make sure VDA test was compiling and running

Change-Id: I7b4724fbc444c4cd8ed077617a1aaadcbe4c8011
Reviewed-on: https://chromium-review.googlesource.com/1170706
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595014}
parent 084a6653
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment