summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-03-19 16:27:14 +0100
committerJacopo Mondi <jacopo@jmondi.org>2019-04-19 16:00:03 +0200
commit9f2bf7ba1e3e2647605da8bbc23d63fc0a4fb1c2 (patch)
tree461a5ab24c2f22f8ac2321cff3c567e84ba73e19 /src
parent57c84b4f3f691be97e319b7b9fa9076440b1a4f9 (diff)
libcamera: ipu3: Queue requests for multiple streams
Add support for queueing requests for multiple streams in the IPU3 pipeline handler class. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index fad7f140..73e06a91 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -577,25 +577,20 @@ void PipelineHandlerIPU3::stop(Camera *camera)
int PipelineHandlerIPU3::queueRequest(Camera *camera, Request *request)
{
- IPU3CameraData *data = cameraData(camera);
- V4L2Device *output = data->imgu_->output_.dev;
- IPU3Stream *stream = &data->outStream_;
+ int error = 0;
- /* Queue a buffer to the ImgU output for capture. */
- Buffer *buffer = request->findBuffer(stream);
- if (!buffer) {
- LOG(IPU3, Error)
- << "Attempt to queue request with invalid stream";
- return -ENOENT;
- }
+ for (auto it : request->buffers()) {
+ IPU3Stream *stream = static_cast<IPU3Stream *>(it.first);
+ Buffer *buffer = it.second;
- int ret = output->queueBuffer(buffer);
- if (ret < 0)
- return ret;
+ int ret = stream->device_->dev->queueBuffer(buffer);
+ if (ret < 0)
+ error = ret;
+ }
PipelineHandler::queueRequest(camera, request);
- return 0;
+ return error;
}
bool PipelineHandlerIPU3::match(DeviceEnumerator *enumerator)