Skip to content

Demonstration of ControlList queues#351

Draft
davidplowman wants to merge 5 commits into
nextfrom
pfc_2026
Draft

Demonstration of ControlList queues#351
davidplowman wants to merge 5 commits into
nextfrom
pfc_2026

Conversation

@davidplowman

Copy link
Copy Markdown
Collaborator

Not one to merge, but a demonstration of how ControlList queues might work. The synchronisation through the ControlListSequence metadata is updated to report ControlList queue ids, rather than request sequence numbers.

I think most of it is pretty obvious as far as it goes, only the final commit (reporting the ControlList queue id instead) is a bit tricky.

@davidplowman
davidplowman marked this pull request as draft July 22, 2026 16:16
Add `Camera::queueControls()` whose purpose is to apply controls as
soon as possible, without going through `Request::controls()`.

A new virtual function `PipelineHandler::queueControlsDevice()` is
provided for the pipeline handler to implement fast-tracked
application of controls.

If the pipeline handler does not support control queueing, an error is
signalled and applications should avoid using this mechanism. In
future we might consider an alternative fallback scheme where queued
controls are dispatched into the pipeline handler with the next
request. (Though note that the benefit of by-passing the request queue
is then lost.)

Note further that we make no attempt to remove controls from requests,
thereby maintaining backwards compatability. The controls in a
request, and the top ControlList from the queue are simply merged for
processing. Again, one could reconsider this at a later date.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Python Camera.queue_controls calls Camera::queueControls.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Allows control lists to be queued up independently of requests.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
The ControlListSequence is amended to identify the sequence number of
the ControlList, from the ControlList queue, that has just been
applied, and which was submitted using Camera::queueControls.

It no longer lists a request sequence number as ControlLists that
applications will want to synchronise with are more effectively
applied through the ControlList queue.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Previously, the ControlListSequence reported the request sequence
number of the ControlList that has just been applied. However,
ControlLists can now be applied more quickly and effectively using the
ControlList queue, and this is recommended to applications.

Therefore we switch over to reporting the sequence number of the
ControlList in the ControlList queue instead.

Applications can still put ControlLists into requests as before, so
the scheme is entirely backwards compatible, however you can't find
out when those controls are applied using this mechanism.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant