Message ID | 20201020000310.3008-3-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Laurent, On Tue, Oct 20, 2020 at 03:03:07AM +0300, Laurent Pinchart wrote: > The pipeline-specific IPA headers are not part of the libcamera API, > they should thus be skipped when generating documentation. doxygen > doesn't complain currently due to the fact that types defined in those > headers are part of undocumented namespaces. In preparation for > documenting the libcamera namespace, make sure the headers don't get > parsed by doxygen. > > Only vimc.h needs a header guard, as rkisp1.h uses the global namespace > and raspberrypi.h uses the undocumented libcamera::RPi namespace, > neither of which cause issues. Still, for consistency, add header guards > to all headers. I'm not sure how I feel about putting the header files in a different directory... pipeline doesn't feel like the right subdirectory name, and if we use ipa instead it'll become a really nice <libcamera/ipa/ipa/raspberrypi.h> :) I think the #ifndef is fine. It's like an extension of the include guard. > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > --- > include/libcamera/ipa/raspberrypi.h | 4 ++++ > include/libcamera/ipa/rkisp1.h | 4 ++++ > include/libcamera/ipa/vimc.h | 4 ++++ > 3 files changed, 12 insertions(+) > > diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h > index b3041591ff7c..b23baf2f1330 100644 > --- a/include/libcamera/ipa/raspberrypi.h > +++ b/include/libcamera/ipa/raspberrypi.h > @@ -10,6 +10,8 @@ > #include <libcamera/control_ids.h> > #include <libcamera/controls.h> > > +#ifndef __DOXYGEN__ > + > namespace libcamera { > > namespace RPi { > @@ -66,4 +68,6 @@ static const ControlInfoMap Controls = { > > } /* namespace libcamera */ > > +#endif /* __DOXYGEN__ */ > + > #endif /* __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__ */ > diff --git a/include/libcamera/ipa/rkisp1.h b/include/libcamera/ipa/rkisp1.h > index 4fe0482b8de5..bb824f292032 100644 > --- a/include/libcamera/ipa/rkisp1.h > +++ b/include/libcamera/ipa/rkisp1.h > @@ -7,6 +7,8 @@ > #ifndef __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ > #define __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ > > +#ifndef __DOXYGEN__ > + > enum RkISP1Operations { > RKISP1_IPA_ACTION_V4L2_SET = 1, > RKISP1_IPA_ACTION_PARAM_FILLED = 2, > @@ -15,4 +17,6 @@ enum RkISP1Operations { > RKISP1_IPA_EVENT_QUEUE_REQUEST = 5, > }; > > +#endif /* __DOXYGEN__ */ > + > #endif /* __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ */ > diff --git a/include/libcamera/ipa/vimc.h b/include/libcamera/ipa/vimc.h > index 22d97992f80f..27a4a61df889 100644 > --- a/include/libcamera/ipa/vimc.h > +++ b/include/libcamera/ipa/vimc.h > @@ -8,6 +8,8 @@ > #ifndef __LIBCAMERA_IPA_VIMC_H__ > #define __LIBCAMERA_IPA_VIMC_H__ > > +#ifndef __DOXYGEN__ > + > namespace libcamera { > > #define VIMC_IPA_FIFO_PATH "/tmp/libcamera_ipa_vimc_fifo" > @@ -21,4 +23,6 @@ enum IPAOperationCode { > > } /* namespace libcamera */ > > +#endif /* __DOXYGEN__ */ > + > #endif /* __LIBCAMERA_IPA_VIMC_H__ */ > -- > Regards, > > Laurent Pinchart > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
Hi Laurent, On 20/10/2020 01:03, Laurent Pinchart wrote: > The pipeline-specific IPA headers are not part of the libcamera API, > they should thus be skipped when generating documentation. doxygen > doesn't complain currently due to the fact that types defined in those > headers are part of undocumented namespaces. In preparation for > documenting the libcamera namespace, make sure the headers don't get > parsed by doxygen. > > Only vimc.h needs a header guard, as rkisp1.h uses the global namespace > and raspberrypi.h uses the undocumented libcamera::RPi namespace, > neither of which cause issues. Still, for consistency, add header guards > to all headers. I sort of like the RPI implementation here. Giving each IPA it's own namespace ... ? But I won't object to this if you prefer it. I don't think the extra subdir in include/libcamera/ipa/<pipeline?> makes sense at the moment. Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > include/libcamera/ipa/raspberrypi.h | 4 ++++ > include/libcamera/ipa/rkisp1.h | 4 ++++ > include/libcamera/ipa/vimc.h | 4 ++++ > 3 files changed, 12 insertions(+) > > diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h > index b3041591ff7c..b23baf2f1330 100644 > --- a/include/libcamera/ipa/raspberrypi.h > +++ b/include/libcamera/ipa/raspberrypi.h > @@ -10,6 +10,8 @@ > #include <libcamera/control_ids.h> > #include <libcamera/controls.h> > > +#ifndef __DOXYGEN__ > + > namespace libcamera { > > namespace RPi { > @@ -66,4 +68,6 @@ static const ControlInfoMap Controls = { > > } /* namespace libcamera */ > > +#endif /* __DOXYGEN__ */ > + > #endif /* __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__ */ > diff --git a/include/libcamera/ipa/rkisp1.h b/include/libcamera/ipa/rkisp1.h > index 4fe0482b8de5..bb824f292032 100644 > --- a/include/libcamera/ipa/rkisp1.h > +++ b/include/libcamera/ipa/rkisp1.h > @@ -7,6 +7,8 @@ > #ifndef __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ > #define __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ > > +#ifndef __DOXYGEN__ > + > enum RkISP1Operations { > RKISP1_IPA_ACTION_V4L2_SET = 1, > RKISP1_IPA_ACTION_PARAM_FILLED = 2, > @@ -15,4 +17,6 @@ enum RkISP1Operations { > RKISP1_IPA_EVENT_QUEUE_REQUEST = 5, > }; > > +#endif /* __DOXYGEN__ */ > + > #endif /* __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ */ > diff --git a/include/libcamera/ipa/vimc.h b/include/libcamera/ipa/vimc.h > index 22d97992f80f..27a4a61df889 100644 > --- a/include/libcamera/ipa/vimc.h > +++ b/include/libcamera/ipa/vimc.h > @@ -8,6 +8,8 @@ > #ifndef __LIBCAMERA_IPA_VIMC_H__ > #define __LIBCAMERA_IPA_VIMC_H__ > > +#ifndef __DOXYGEN__ > + > namespace libcamera { > > #define VIMC_IPA_FIFO_PATH "/tmp/libcamera_ipa_vimc_fifo" > @@ -21,4 +23,6 @@ enum IPAOperationCode { > > } /* namespace libcamera */ > > +#endif /* __DOXYGEN__ */ > + > #endif /* __LIBCAMERA_IPA_VIMC_H__ */ >
Hi Kieran, On Tue, Oct 20, 2020 at 11:15:07AM +0100, Kieran Bingham wrote: > On 20/10/2020 01:03, Laurent Pinchart wrote: > > The pipeline-specific IPA headers are not part of the libcamera API, > > they should thus be skipped when generating documentation. doxygen > > doesn't complain currently due to the fact that types defined in those > > headers are part of undocumented namespaces. In preparation for > > documenting the libcamera namespace, make sure the headers don't get > > parsed by doxygen. > > > > Only vimc.h needs a header guard, as rkisp1.h uses the global namespace > > and raspberrypi.h uses the undocumented libcamera::RPi namespace, > > neither of which cause issues. Still, for consistency, add header guards > > to all headers. > > I sort of like the RPI implementation here. > > Giving each IPA it's own namespace ... ? I think that would make sense, but it's much more intrusive, so I'd like to keep it out of this series for now. > But I won't object to this if you prefer it. > > I don't think the extra subdir in include/libcamera/ipa/<pipeline?> > makes sense at the moment. > > Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > include/libcamera/ipa/raspberrypi.h | 4 ++++ > > include/libcamera/ipa/rkisp1.h | 4 ++++ > > include/libcamera/ipa/vimc.h | 4 ++++ > > 3 files changed, 12 insertions(+) > > > > diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h > > index b3041591ff7c..b23baf2f1330 100644 > > --- a/include/libcamera/ipa/raspberrypi.h > > +++ b/include/libcamera/ipa/raspberrypi.h > > @@ -10,6 +10,8 @@ > > #include <libcamera/control_ids.h> > > #include <libcamera/controls.h> > > > > +#ifndef __DOXYGEN__ > > + > > namespace libcamera { > > > > namespace RPi { > > @@ -66,4 +68,6 @@ static const ControlInfoMap Controls = { > > > > } /* namespace libcamera */ > > > > +#endif /* __DOXYGEN__ */ > > + > > #endif /* __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__ */ > > diff --git a/include/libcamera/ipa/rkisp1.h b/include/libcamera/ipa/rkisp1.h > > index 4fe0482b8de5..bb824f292032 100644 > > --- a/include/libcamera/ipa/rkisp1.h > > +++ b/include/libcamera/ipa/rkisp1.h > > @@ -7,6 +7,8 @@ > > #ifndef __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ > > #define __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ > > > > +#ifndef __DOXYGEN__ > > + > > enum RkISP1Operations { > > RKISP1_IPA_ACTION_V4L2_SET = 1, > > RKISP1_IPA_ACTION_PARAM_FILLED = 2, > > @@ -15,4 +17,6 @@ enum RkISP1Operations { > > RKISP1_IPA_EVENT_QUEUE_REQUEST = 5, > > }; > > > > +#endif /* __DOXYGEN__ */ > > + > > #endif /* __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ */ > > diff --git a/include/libcamera/ipa/vimc.h b/include/libcamera/ipa/vimc.h > > index 22d97992f80f..27a4a61df889 100644 > > --- a/include/libcamera/ipa/vimc.h > > +++ b/include/libcamera/ipa/vimc.h > > @@ -8,6 +8,8 @@ > > #ifndef __LIBCAMERA_IPA_VIMC_H__ > > #define __LIBCAMERA_IPA_VIMC_H__ > > > > +#ifndef __DOXYGEN__ > > + > > namespace libcamera { > > > > #define VIMC_IPA_FIFO_PATH "/tmp/libcamera_ipa_vimc_fifo" > > @@ -21,4 +23,6 @@ enum IPAOperationCode { > > > > } /* namespace libcamera */ > > > > +#endif /* __DOXYGEN__ */ > > + > > #endif /* __LIBCAMERA_IPA_VIMC_H__ */ > >
diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h index b3041591ff7c..b23baf2f1330 100644 --- a/include/libcamera/ipa/raspberrypi.h +++ b/include/libcamera/ipa/raspberrypi.h @@ -10,6 +10,8 @@ #include <libcamera/control_ids.h> #include <libcamera/controls.h> +#ifndef __DOXYGEN__ + namespace libcamera { namespace RPi { @@ -66,4 +68,6 @@ static const ControlInfoMap Controls = { } /* namespace libcamera */ +#endif /* __DOXYGEN__ */ + #endif /* __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__ */ diff --git a/include/libcamera/ipa/rkisp1.h b/include/libcamera/ipa/rkisp1.h index 4fe0482b8de5..bb824f292032 100644 --- a/include/libcamera/ipa/rkisp1.h +++ b/include/libcamera/ipa/rkisp1.h @@ -7,6 +7,8 @@ #ifndef __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ #define __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ +#ifndef __DOXYGEN__ + enum RkISP1Operations { RKISP1_IPA_ACTION_V4L2_SET = 1, RKISP1_IPA_ACTION_PARAM_FILLED = 2, @@ -15,4 +17,6 @@ enum RkISP1Operations { RKISP1_IPA_EVENT_QUEUE_REQUEST = 5, }; +#endif /* __DOXYGEN__ */ + #endif /* __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ */ diff --git a/include/libcamera/ipa/vimc.h b/include/libcamera/ipa/vimc.h index 22d97992f80f..27a4a61df889 100644 --- a/include/libcamera/ipa/vimc.h +++ b/include/libcamera/ipa/vimc.h @@ -8,6 +8,8 @@ #ifndef __LIBCAMERA_IPA_VIMC_H__ #define __LIBCAMERA_IPA_VIMC_H__ +#ifndef __DOXYGEN__ + namespace libcamera { #define VIMC_IPA_FIFO_PATH "/tmp/libcamera_ipa_vimc_fifo" @@ -21,4 +23,6 @@ enum IPAOperationCode { } /* namespace libcamera */ +#endif /* __DOXYGEN__ */ + #endif /* __LIBCAMERA_IPA_VIMC_H__ */
The pipeline-specific IPA headers are not part of the libcamera API, they should thus be skipped when generating documentation. doxygen doesn't complain currently due to the fact that types defined in those headers are part of undocumented namespaces. In preparation for documenting the libcamera namespace, make sure the headers don't get parsed by doxygen. Only vimc.h needs a header guard, as rkisp1.h uses the global namespace and raspberrypi.h uses the undocumented libcamera::RPi namespace, neither of which cause issues. Still, for consistency, add header guards to all headers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- include/libcamera/ipa/raspberrypi.h | 4 ++++ include/libcamera/ipa/rkisp1.h | 4 ++++ include/libcamera/ipa/vimc.h | 4 ++++ 3 files changed, 12 insertions(+)