diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-07-13 11:35:11 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-06-29 11:40:25 +0100 |
commit | 715b3ac408bfc40f24b40f01c8271afbae972eb1 (patch) | |
tree | 3be4bef2140a7cff8c633ee4b796d34a695b9ffc | |
parent | 3c7f6f67c0f24157207cbe13fb6ec41fe05f92d5 (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 f179bee6..672b745c 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) |