[v1] apps: cam: file_sink: Add missing include
diff mbox series

Message ID 20250303193345.785661-1-barnabas.pocze@ideasonboard.com
State Superseded
Headers show
Series
  • [v1] apps: cam: file_sink: Add missing include
Related show

Commit Message

Barnabás Pőcze March 3, 2025, 7:33 p.m. UTC
The `ControlList` is needed for the member function declarations,
but it is not included, so include it. This has not bee noticed
because `file_sink.cpp` does not include `file_sink.hpp` first,
so change that as well.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 src/apps/cam/file_sink.cpp | 4 ++--
 src/apps/cam/file_sink.h   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Laurent Pinchart March 3, 2025, 8:58 p.m. UTC | #1
Hi Barnabás,

Thank you for the patch.

On Mon, Mar 03, 2025 at 08:33:45PM +0100, Barnabás Pőcze wrote:
> The `ControlList` is needed for the member function declarations,
> but it is not included, so include it. This has not bee noticed

s/bee/been/

> because `file_sink.cpp` does not include `file_sink.hpp` first,

s/hpp/h/

> so change that as well.
> 
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/apps/cam/file_sink.cpp | 4 ++--
>  src/apps/cam/file_sink.h   | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp
> index 76e21db9b..65794a2f9 100644
> --- a/src/apps/cam/file_sink.cpp
> +++ b/src/apps/cam/file_sink.cpp
> @@ -5,6 +5,8 @@
>   * File Sink
>   */
>  
> +#include "file_sink.h"
> +
>  #include <array>
>  #include <assert.h>
>  #include <fcntl.h>
> @@ -21,8 +23,6 @@
>  #include "../common/image.h"
>  #include "../common/ppm_writer.h"
>  
> -#include "file_sink.h"
> -
>  using namespace libcamera;
>  
>  FileSink::FileSink([[maybe_unused]] const libcamera::Camera *camera,
> diff --git a/src/apps/cam/file_sink.h b/src/apps/cam/file_sink.h
> index 71b7fe0fe..26cd61b36 100644
> --- a/src/apps/cam/file_sink.h
> +++ b/src/apps/cam/file_sink.h
> @@ -11,6 +11,7 @@
>  #include <memory>
>  #include <string>
>  
> +#include <libcamera/controls.h>
>  #include <libcamera/stream.h>
>  
>  #include "frame_sink.h"
Kieran Bingham March 4, 2025, 10:06 a.m. UTC | #2
Quoting Laurent Pinchart (2025-03-03 20:58:16)
> Hi Barnabás,
> 
> Thank you for the patch.
> 
> On Mon, Mar 03, 2025 at 08:33:45PM +0100, Barnabás Pőcze wrote:
> > The `ControlList` is needed for the member function declarations,
> > but it is not included, so include it. This has not bee noticed
> 
> s/bee/been/
> 
> > because `file_sink.cpp` does not include `file_sink.hpp` first,
> 
> s/hpp/h/
> 
> > so change that as well.
> > 
> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> > ---
> >  src/apps/cam/file_sink.cpp | 4 ++--
> >  src/apps/cam/file_sink.h   | 1 +
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp
> > index 76e21db9b..65794a2f9 100644
> > --- a/src/apps/cam/file_sink.cpp
> > +++ b/src/apps/cam/file_sink.cpp
> > @@ -5,6 +5,8 @@
> >   * File Sink
> >   */
> >  
> > +#include "file_sink.h"
> > +
> >  #include <array>
> >  #include <assert.h>
> >  #include <fcntl.h>
> > @@ -21,8 +23,6 @@
> >  #include "../common/image.h"
> >  #include "../common/ppm_writer.h"
> >  
> > -#include "file_sink.h"
> > -
> >  using namespace libcamera;
> >  
> >  FileSink::FileSink([[maybe_unused]] const libcamera::Camera *camera,
> > diff --git a/src/apps/cam/file_sink.h b/src/apps/cam/file_sink.h
> > index 71b7fe0fe..26cd61b36 100644
> > --- a/src/apps/cam/file_sink.h
> > +++ b/src/apps/cam/file_sink.h
> > @@ -11,6 +11,7 @@
> >  #include <memory>
> >  #include <string>
> >  
> > +#include <libcamera/controls.h>
> >  #include <libcamera/stream.h>
> >  
> >  #include "frame_sink.h"
> 
> -- 
> Regards,
> 
> Laurent Pinchart

Patch
diff mbox series

diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp
index 76e21db9b..65794a2f9 100644
--- a/src/apps/cam/file_sink.cpp
+++ b/src/apps/cam/file_sink.cpp
@@ -5,6 +5,8 @@ 
  * File Sink
  */
 
+#include "file_sink.h"
+
 #include <array>
 #include <assert.h>
 #include <fcntl.h>
@@ -21,8 +23,6 @@ 
 #include "../common/image.h"
 #include "../common/ppm_writer.h"
 
-#include "file_sink.h"
-
 using namespace libcamera;
 
 FileSink::FileSink([[maybe_unused]] const libcamera::Camera *camera,
diff --git a/src/apps/cam/file_sink.h b/src/apps/cam/file_sink.h
index 71b7fe0fe..26cd61b36 100644
--- a/src/apps/cam/file_sink.h
+++ b/src/apps/cam/file_sink.h
@@ -11,6 +11,7 @@ 
 #include <memory>
 #include <string>
 
+#include <libcamera/controls.h>
 #include <libcamera/stream.h>
 
 #include "frame_sink.h"