summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-10-09 13:08:56 +0200
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-10-11 12:45:34 +0200
commit3030ffc9f21ce5ed3a160d514c94417a1dabf397 (patch)
tree0f4eef7e06c0b98441db42eaeebb8e625fb98ca3 /src
parent19698ea27c826a1daefe4e396ba7eb58da850b25 (diff)
rkisp1: Export buffers from main and self paths
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 42961c12..83ac666c 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -200,6 +200,11 @@ private:
std::queue<FrameBuffer *> availableParamBuffers_;
std::queue<FrameBuffer *> availableStatBuffers_;
+ std::vector<std::unique_ptr<FrameBuffer>> mainPathBuffers_;
+ std::vector<std::unique_ptr<FrameBuffer>> selfPathBuffers_;
+ std::queue<FrameBuffer *> availableMainPathBuffers_;
+ std::queue<FrameBuffer *> availableSelfPathBuffers_;
+
Camera *activeCamera_;
const MediaPad *ispSink_;
@@ -901,11 +906,30 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)
data->ipa_->mapBuffers(data->ipaBuffers_);
+ /* Allocate scratch buffers for the two output video devices. */
+ ret = mainPath_.exportBuffers(maxCount, &mainPathBuffers_);
+ if (ret < 0)
+ goto error;
+
+ for (std::unique_ptr<FrameBuffer> &buffer : mainPathBuffers_)
+ availableMainPathBuffers_.push(buffer.get());
+
+ if (hasSelfPath_) {
+ ret = selfPath_.exportBuffers(maxCount, &selfPathBuffers_);
+ if (ret < 0)
+ goto error;
+
+ for (std::unique_ptr<FrameBuffer> &buffer : selfPathBuffers_)
+ availableSelfPathBuffers_.push(buffer.get());
+ }
+
return 0;
error:
paramBuffers_.clear();
statBuffers_.clear();
+ mainPathBuffers_.clear();
+ selfPathBuffers_.clear();
return ret;
}