[libcamera-devel] android: camera_stream: Rectify internal header's #include path
diff mbox series

Message ID 20210429105741.59236-1-umang.jain@ideasonboard.com
State Superseded
Headers show
Series
  • [libcamera-devel] android: camera_stream: Rectify internal header's #include path
Related show

Commit Message

Umang Jain April 29, 2021, 10:57 a.m. UTC
libcamera internal headers are not installed system-wide. Hence, any
inclusion of internal headers should be follow the #include directive
form:
	#include "libcamera/internal/header.h"

This was not the case with buffer.h internal header. Fix it.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
 src/android/camera_stream.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Niklas Söderlund April 29, 2021, 11:26 a.m. UTC | #1
Hi Umang,

Thanks for your work.

On 2021-04-29 16:27:41 +0530, Umang Jain wrote:
> libcamera internal headers are not installed system-wide. Hence, any
> inclusion of internal headers should be follow the #include directive
> form:
> 	#include "libcamera/internal/header.h"

This also needs fixing in generic_camera_buffer.cpp and 
post_processor.h.

> 
> This was not the case with buffer.h internal header. Fix it.
> 
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>  src/android/camera_stream.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
> index f68fdd3a..34016722 100644
> --- a/src/android/camera_stream.h
> +++ b/src/android/camera_stream.h
> @@ -19,7 +19,7 @@
>  #include <libcamera/geometry.h>
>  #include <libcamera/pixel_format.h>
>  
> -#include <libcamera/internal/buffer.h>
> +#include "libcamera/internal/buffer.h"
>  
>  class CameraDevice;
>  class CameraMetadata;
> -- 
> 2.29.2
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Hirokazu Honda April 30, 2021, 4:07 a.m. UTC | #2
Hi Umang, thanks for the patch.

On Thu, Apr 29, 2021 at 8:26 PM Niklas Söderlund <
niklas.soderlund@ragnatech.se> wrote:
>
> Hi Umang,
>
> Thanks for your work.
>
> On 2021-04-29 16:27:41 +0530, Umang Jain wrote:
> > libcamera internal headers are not installed system-wide. Hence, any
> > inclusion of internal headers should be follow the #include directive
> > form:
> >       #include "libcamera/internal/header.h"
>
> This also needs fixing in generic_camera_buffer.cpp and
> post_processor.h.
>

My quick grep shows the following result. Would you fix them as well?

$ rg "#include <libcamera/internal"
test/bayer-format.cpp
10:#include <libcamera/internal/bayer_format.h>
src/android/post_processor.h
13:#include <libcamera/internal/buffer.h>
src/android/camera_stream.h
22:#include <libcamera/internal/buffer.h>
src/android/mm/generic_camera_buffer.cpp
10:#include <libcamera/internal/buffer.h>


-Hiro

> >
> > This was not the case with buffer.h internal header. Fix it.
> >
> > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> > ---
> >  src/android/camera_stream.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
> > index f68fdd3a..34016722 100644
> > --- a/src/android/camera_stream.h
> > +++ b/src/android/camera_stream.h
> > @@ -19,7 +19,7 @@
> >  #include <libcamera/geometry.h>
> >  #include <libcamera/pixel_format.h>
> >
> > -#include <libcamera/internal/buffer.h>
> > +#include "libcamera/internal/buffer.h"
> >
> >  class CameraDevice;
> >  class CameraMetadata;
> > --
> > 2.29.2
> >
> > _______________________________________________
> > libcamera-devel mailing list
> > libcamera-devel@lists.libcamera.org
> > https://lists.libcamera.org/listinfo/libcamera-devel
>
> --
> Regards,
> Niklas Söderlund
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch
diff mbox series

diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
index f68fdd3a..34016722 100644
--- a/src/android/camera_stream.h
+++ b/src/android/camera_stream.h
@@ -19,7 +19,7 @@ 
 #include <libcamera/geometry.h>
 #include <libcamera/pixel_format.h>
 
-#include <libcamera/internal/buffer.h>
+#include "libcamera/internal/buffer.h"
 
 class CameraDevice;
 class CameraMetadata;