summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-13 11:35:11 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-05-14 23:57:48 +0100
commit5dca34e9678d9c084b9945eca1307101d1287b46 (patch)
treeacc7d74cced056987ff6caa0950954a95059010a /src
parent41894a044e3431f56492bbfa4bd25e2175dfe09a (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>
Diffstat (limited to 'src')
-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 f25af6a2..999eda34 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)