[libcamera-devel] [PATCH] include: ipa: Remove unused declaration

paul.elder at ideasonboard.com paul.elder at ideasonboard.com
Wed Mar 10 10:54:35 CET 2021


Hi Kieran,

On Wed, Mar 10, 2021 at 09:29:51AM +0000, Kieran Bingham wrote:
> The struct CameraSensorInfo forward declaration is not used by
> the ipa_interface.
> 

CameraSensorInfo is in the parameters of configure() for the raspberrypi
and rkisp1 IPA interfaces. rkisp1 doesn't seem to actually use it, but
raspberrypi does.

Now, CameraSensorInfo is defined in core.mojom, but it has the
skipHeader tag because CameraSensorInfo is also defined in
camera_sensor.h, and it has lots of member functions. This means that
core_ipa_interface.h will not have CameraSensorInfo in it.

Since we don't have a way to tell the generated files (proxy cpp+h,
proxy worker cpp, interface header, serializer) what specific files need
to be included, they all include ipa_interface.h, and any custom data
structures need to be defined in the respective mojom file.

This means that any struct defined in core.mojom that has skipHeader
needs to be defined in ipa_interface.h, or it has to be included by
ipa_interface.h.

So if you are to remove struct CameraSensorInfo here, then you need to
#include "libcamera/internal/camera_sensor.h"


Paul

> Remove it.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
>  include/libcamera/ipa/ipa_interface.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> index 47f81d1d2e8f..8554613e0217 100644
> --- a/include/libcamera/ipa/ipa_interface.h
> +++ b/include/libcamera/ipa/ipa_interface.h
> @@ -20,8 +20,6 @@
>  
>  namespace libcamera {
>  
> -struct CameraSensorInfo;
> -
>  class IPAInterface
>  {
>  public:
> -- 
> 2.25.1


More information about the libcamera-devel mailing list