summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-13 11:35:11 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-11-01 18:09:18 +0000
commitc20fdf740ae62ebc64d0b1ed2ba4d91e81bb07ef (patch)
tree73c9b33f3af648689426f1929bcb5d9946aa290b
parent8103e656e4cce4ee842eab20776c67fe910a5656 (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.cpp15
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)