summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-26 14:53:31 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-04-14 00:28:28 +0200
commit7b66e5f76d97cc4584bc2c7f79ae5018d87adc65 (patch)
tree9a48c500a87f125ef6c8219dcc2fdb0ea0310004 /src
parent6d7a66dc4eb1a406010733aed63a2a3d37ce7508 (diff)
libcamera: pipeline: vimc: Call IPA start() and stop()
Call the IPA start()/stop() functions before/after the camera is started. This makes sure the IPA functions properly once thread management is moved into the start/stop interface. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index b04a9726..c5eea3a0 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -274,8 +274,15 @@ int PipelineHandlerVimc::start(Camera *camera)
if (ret < 0)
return ret;
+ ret = data->ipa_->start();
+ if (ret) {
+ data->video_->releaseBuffers();
+ return ret;
+ }
+
ret = data->video_->streamOn();
if (ret < 0) {
+ data->ipa_->stop();
data->video_->releaseBuffers();
return ret;
}
@@ -287,6 +294,7 @@ void PipelineHandlerVimc::stop(Camera *camera)
{
VimcCameraData *data = cameraData(camera);
data->video_->streamOff();
+ data->ipa_->stop();
data->video_->releaseBuffers();
}