[PATCH v3 14/17] libcamera: rkisp1: make RkISP1CameraConfiguration a friend of the pipeline handler

Jacopo Mondi jacopo.mondi at ideasonboard.com
Wed Dec 11 15:44:53 CET 2024


Hi Stefan

On Fri, Dec 06, 2024 at 11:13:36AM +0100, Stefan Klug wrote:
> For the validate() implementation, the RkISP1CameraConfiguration needs
> access to dewarper related members of the PipelineHandlerRkISP1 object.
> Allow this access by adding const versions of the pipe accessors and
> making RkISP1CameraConfiguration a friend of PipelineHandlerRkISP1.
>
> Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
> ---
> Changes in v3:
> - Added this patch
> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 2c8d670768b1..c582e164670c 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -98,6 +98,7 @@ public:
>  	}
>
>  	PipelineHandlerRkISP1 *pipe();
> +	const PipelineHandlerRkISP1 *pipe() const;
>  	int loadIPA(unsigned int hwRevision);
>
>  	Stream mainPathStream_;
> @@ -176,6 +177,7 @@ private:
>  	}
>
>  	friend RkISP1CameraData;
> +	friend RkISP1CameraConfiguration;

Alternatively, a
        V4L2M2MConverter *dewarper();

function could be added.

I don't mind either ways
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>

Thanks
  j

>  	friend RkISP1Frames;
>
>  	int initLinks(Camera *camera, const CameraSensor *sensor,
> @@ -363,6 +365,11 @@ PipelineHandlerRkISP1 *RkISP1CameraData::pipe()
>  	return static_cast<PipelineHandlerRkISP1 *>(Camera::Private::pipe());
>  }
>
> +const PipelineHandlerRkISP1 *RkISP1CameraData::pipe() const
> +{
> +	return static_cast<const PipelineHandlerRkISP1 *>(Camera::Private::pipe());
> +}
> +
>  int RkISP1CameraData::loadIPA(unsigned int hwRevision)
>  {
>  	ipa_ = IPAManager::createIPA<ipa::rkisp1::IPAProxyRkISP1>(pipe(), 1, 1);
> --
> 2.43.0
>


More information about the libcamera-devel mailing list