[libcamera-devel] [RFC PATCH 02/10] libcamera: ipa_module: add path getter
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Jun 6 11:38:58 CEST 2019
Hi Paul,
Thank you for the patch.
On Wed, Jun 05, 2019 at 06:18:09PM -0400, Paul Elder wrote:
> Add a method to IPAModule to get the path of the IPA module shared
> object that the IPAModule was constructed from.
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> src/libcamera/include/ipa_module.h | 1 +
> src/libcamera/ipa_module.cpp | 13 +++++++++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/src/libcamera/include/ipa_module.h b/src/libcamera/include/ipa_module.h
> index fec4237..f6904fa 100644
> --- a/src/libcamera/include/ipa_module.h
> +++ b/src/libcamera/include/ipa_module.h
> @@ -26,6 +26,7 @@ public:
> bool isValid() const;
>
> const struct IPAModuleInfo &info() const;
> + const char *path() const;
You can return a const std::string & as we have an std::string
internally already.
>
> bool load();
>
> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
> index 2663b9e..e1d4b27 100644
> --- a/src/libcamera/ipa_module.cpp
> +++ b/src/libcamera/ipa_module.cpp
> @@ -321,6 +321,19 @@ const struct IPAModuleInfo &IPAModule::info() const
> return info_;
> }
>
> +/**
> + * \brief Retrieve the IPA module path
> + *
> + * The IPA module path is the file name and path of the IPA module shared
> + * object from which the IPA module was created.
> + *
> + * \return the IPA module path
s/the/The/
With these small issues fixed,
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> + */
> +const char *IPAModule::path() const
> +{
> + return libPath_.c_str();
> +}
> +
> /**
> * \brief Load the IPA implementation factory from the shared object
> *
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list