diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-07-13 11:35:11 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-11-01 18:09:18 +0000 |
commit | c20fdf740ae62ebc64d0b1ed2ba4d91e81bb07ef (patch) | |
tree | 73c9b33f3af648689426f1929bcb5d9946aa290b | |
parent | 8103e656e4cce4ee842eab20776c67fe910a5656 (diff) |
libcamera: pipeline: vivid: Queue requests
When a request is given to a pipeline handler, it must parse the request
and identify what actions the pipeline handler should take to enact on hardware.
In the case of the VIVID pipeline handler, we identify the buffer from the only
supported stream, and queue it to the video capture device.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | src/libcamera/pipeline/vivid/vivid.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp index f3f0a626..b0fe0230 100644 --- a/src/libcamera/pipeline/vivid/vivid.cpp +++ b/src/libcamera/pipeline/vivid/vivid.cpp @@ -223,7 +223,20 @@ void PipelineHandlerVivid::stopDevice(Camera *camera) int PipelineHandlerVivid::queueRequestDevice(Camera *camera, Request *request) { - return -1; + VividCameraData *data = cameraData(camera); + FrameBuffer *buffer = request->findBuffer(&data->stream_); + if (!buffer) { + LOG(VIVID, Error) + << "Attempt to queue request with invalid stream"; + + return -ENOENT; + } + + int ret = data->video_->queueBuffer(buffer); + if (ret < 0) + return ret; + + return 0; } bool PipelineHandlerVivid::match(DeviceEnumerator *enumerator) |