summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index de90615e..dcc787a8 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -64,6 +64,7 @@ public:
RkISP1FrameInfo *create(unsigned int frame, Request *request, Stream *stream);
int destroy(unsigned int frame);
+ void clear();
RkISP1FrameInfo *find(unsigned int frame);
RkISP1FrameInfo *find(FrameBuffer *buffer);
@@ -279,6 +280,20 @@ int RkISP1Frames::destroy(unsigned int frame)
return 0;
}
+void RkISP1Frames::clear()
+{
+ for (const auto &entry : frameInfo_) {
+ RkISP1FrameInfo *info = entry.second;
+
+ pipe_->availableParamBuffers_.push(info->paramBuffer);
+ pipe_->availableStatBuffers_.push(info->statBuffer);
+
+ delete info;
+ }
+
+ frameInfo_.clear();
+}
+
RkISP1FrameInfo *RkISP1Frames::find(unsigned int frame)
{
auto itInfo = frameInfo_.find(frame);
@@ -832,6 +847,8 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
data->timeline_.reset();
+ data->frameInfo_.clear();
+
freeBuffers(camera);
activeCamera_ = nullptr;