diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-09-25 00:53:18 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-09-30 14:24:42 +0200 |
commit | 94d2ea59741e0dc77c19454ed924dca1629be734 (patch) | |
tree | c49c139a0a41a74a875d2096560e1ac24aadaf0a /src/libcamera/pipeline/rkisp1/rkisp1.cpp | |
parent | 66c1aae8f485606e85efaa5ed73463b6d824dcc9 (diff) |
libcamera: pipeline: rkisp1: Use the media link to track if a path is enabled
Instead of manually tracking if a path is enable or not use the media
graph link status. There is no functional change.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rkisp1/rkisp1.cpp')
-rw-r--r-- | src/libcamera/pipeline/rkisp1/rkisp1.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index e9311b93..aec590ff 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -122,8 +122,7 @@ public: RkISP1CameraData(PipelineHandler *pipe, RkISP1MainPath *mainPath, RkISP1SelfPath *selfPath) : CameraData(pipe), sensor_(nullptr), frame_(0), - frameInfo_(pipe), mainPath_(mainPath), selfPath_(selfPath), - mainPathActive_(false), selfPathActive_(false) + frameInfo_(pipe), mainPath_(mainPath), selfPath_(selfPath) { } @@ -145,9 +144,6 @@ public: RkISP1MainPath *mainPath_; RkISP1SelfPath *selfPath_; - bool mainPathActive_; - bool selfPathActive_; - private: void queueFrameAction(unsigned int frame, const IPAOperationData &action); @@ -714,20 +710,14 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) LOG(RkISP1, Debug) << "ISP output pad configured with " << format.toString(); - data->mainPathActive_ = false; - data->selfPathActive_ = false; for (const StreamConfiguration &cfg : *config) { - if (cfg.stream() == &data->mainPathStream_) { + if (cfg.stream() == &data->mainPathStream_) ret = mainPath_.configure(cfg, format); - if (ret) - return ret; - data->mainPathActive_ = true; - } else { + else ret = selfPath_.configure(cfg, format); - if (ret) - return ret; - data->selfPathActive_ = true; - } + + if (ret) + return ret; } V4L2DeviceFormat paramFormat = {}; @@ -873,7 +863,7 @@ int PipelineHandlerRkISP1::start(Camera *camera) std::map<unsigned int, IPAStream> streamConfig; - if (data->mainPathActive_) { + if (data->mainPath_->isEnabled()) { ret = mainPath_.start(); if (ret) { param_->streamOff(); @@ -889,7 +879,7 @@ int PipelineHandlerRkISP1::start(Camera *camera) }; } - if (data->selfPathActive_) { + if (data->selfPath_->isEnabled()) { ret = selfPath_.start(); if (ret) { mainPath_.stop(); |