summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp14
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp16
2 files changed, 17 insertions, 13 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 0bbe9ed8..98008862 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -87,6 +87,7 @@ public:
{
}
+ PipelineHandlerRkISP1 *pipe();
int loadIPA(unsigned int hwRevision);
Stream mainPathStream_;
@@ -304,6 +305,11 @@ RkISP1FrameInfo *RkISP1Frames::find(Request *request)
return nullptr;
}
+PipelineHandlerRkISP1 *RkISP1CameraData::pipe()
+{
+ return static_cast<PipelineHandlerRkISP1 *>(Camera::Private::pipe());
+}
+
int RkISP1CameraData::loadIPA(unsigned int hwRevision)
{
ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(pipe(), 1, 1);
@@ -332,8 +338,7 @@ void RkISP1CameraData::queueFrameAction(unsigned int frame,
break;
}
case ipa::rkisp1::ActionParamFilled: {
- PipelineHandlerRkISP1 *pipe =
- static_cast<PipelineHandlerRkISP1 *>(this->pipe());
+ PipelineHandlerRkISP1 *pipe = RkISP1CameraData::pipe();
RkISP1FrameInfo *info = frameInfo_.find(frame);
if (!info)
break;
@@ -360,9 +365,6 @@ void RkISP1CameraData::queueFrameAction(unsigned int frame,
void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &metadata)
{
- PipelineHandlerRkISP1 *pipe =
- static_cast<PipelineHandlerRkISP1 *>(this->pipe());
-
RkISP1FrameInfo *info = frameInfo_.find(frame);
if (!info)
return;
@@ -370,7 +372,7 @@ void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &meta
info->request->metadata().merge(metadata);
info->metadataProcessed = true;
- pipe->tryCompleteRequest(info->request);
+ pipe()->tryCompleteRequest(info->request);
}
RkISP1CameraConfiguration::RkISP1CameraConfiguration(Camera *camera,
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index ef7687ea..8ff95472 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -155,6 +155,7 @@ public:
MediaEntity *sensor);
bool isValid() const { return sensor_ != nullptr; }
+ SimplePipelineHandler *pipe();
int init();
int setupLinks();
@@ -352,11 +353,14 @@ SimpleCameraData::SimpleCameraData(SimplePipelineHandler *pipe,
[](const Entity &e) { return e.entity->name(); });
}
+SimplePipelineHandler *SimpleCameraData::pipe()
+{
+ return static_cast<SimplePipelineHandler *>(Camera::Private::pipe());
+}
+
int SimpleCameraData::init()
{
- SimplePipelineHandler *pipe =
- static_cast<SimplePipelineHandler *>(this->pipe());
- SimpleConverter *converter = pipe->converter();
+ SimpleConverter *converter = pipe()->converter();
int ret;
/*
@@ -480,8 +484,7 @@ int SimpleCameraData::setupLinks()
int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format,
V4L2Subdevice::Whence whence)
{
- SimplePipelineHandler *pipe =
- static_cast<SimplePipelineHandler *>(this->pipe());
+ SimplePipelineHandler *pipe = SimpleCameraData::pipe();
int ret;
/*
@@ -582,8 +585,7 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()
}
/* Adjust the requested streams. */
- SimplePipelineHandler *pipe = static_cast<SimplePipelineHandler *>(data_->pipe());
- SimpleConverter *converter = pipe->converter();
+ SimpleConverter *converter = data_->pipe()->converter();
/*
* Enable usage of the converter when producing multiple streams, as