[libcamera-devel] [PATCH 2/3] libcamera: buffer: Rename buffer.h to framebuffer.h

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jul 5 12:22:31 CEST 2021


Hi Umang,

On Mon, Jul 05, 2021 at 10:42:34AM +0530, Umang Jain wrote:
> On 7/5/21 4:58 AM, Laurent Pinchart wrote:
> > libcamera names header files based on the classes they define. The
> > buffer.h file is an exception. Rename it to framebuffer.h.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> >   include/libcamera/{buffer.h => framebuffer.h}      |  8 ++++----
> >   .../libcamera/internal/{buffer.h => framebuffer.h} | 10 +++++-----
> >   include/libcamera/internal/ipa_data_serializer.h   |  2 +-
> >   include/libcamera/internal/meson.build             |  2 +-
> >   include/libcamera/internal/tracepoints/request.tp  |  2 +-
> >   include/libcamera/internal/v4l2_videodevice.h      |  2 +-
> >   include/libcamera/ipa/ipa_interface.h              |  2 +-
> >   include/libcamera/meson.build                      |  2 +-
> >   include/libcamera/stream.h                         |  2 +-
> >   src/android/camera_device.h                        |  4 ++--
> >   src/android/camera_stream.h                        |  4 ++--
> >   src/android/camera_worker.h                        |  2 +-
> >   src/android/jpeg/encoder.h                         |  2 +-
> >   src/android/jpeg/encoder_libjpeg.h                 |  2 +-
> >   src/android/jpeg/post_processor_jpeg.h             |  2 +-
> >   src/android/jpeg/thumbnailer.h                     |  2 +-
> >   src/android/mm/generic_camera_buffer.cpp           |  2 +-
> >   src/android/post_processor.h                       |  4 ++--
> >   src/cam/buffer_writer.h                            |  2 +-
> >   src/cam/capture.h                                  |  2 +-
> >   src/ipa/ipu3/ipu3.cpp                              |  4 ++--
> >   src/ipa/raspberrypi/raspberrypi.cpp                |  4 ++--
> >   src/ipa/rkisp1/rkisp1.cpp                          |  2 +-
> >   src/libcamera/{buffer.cpp => framebuffer.cpp}      | 14 +++++++-------
> >   src/libcamera/framebuffer_allocator.cpp            |  2 +-
> >   src/libcamera/meson.build                          |  2 +-
> >   src/libcamera/pipeline/ipu3/frames.cpp             |  2 +-
> >   src/libcamera/pipeline/raspberrypi/raspberrypi.cpp |  2 +-
> >   src/libcamera/pipeline/rkisp1/rkisp1.cpp           |  2 +-
> >   src/libcamera/pipeline/simple/converter.cpp        |  2 +-
> >   src/libcamera/pipeline_handler.cpp                 |  2 +-
> >   src/libcamera/request.cpp                          |  2 +-
> >   src/qcam/dng_writer.h                              |  2 +-
> >   src/qcam/main_window.h                             |  2 +-
> >   src/qcam/viewfinder.h                              |  2 +-
> >   src/qcam/viewfinder_gl.h                           |  2 +-
> >   src/qcam/viewfinder_qt.h                           |  2 +-
> >   src/v4l2/v4l2_camera.h                             |  2 +-
> >   test/mapped-buffer.cpp                             |  2 +-
> >   test/v4l2_subdevice/v4l2_subdevice_test.h          |  2 +-
> >   test/v4l2_videodevice/buffer_sharing.cpp           |  2 +-
> >   test/v4l2_videodevice/capture_async.cpp            |  2 +-
> >   test/v4l2_videodevice/v4l2_m2mdevice.cpp           |  2 +-
> >   test/v4l2_videodevice/v4l2_videodevice_test.h      |  2 +-
> >   44 files changed, 62 insertions(+), 62 deletions(-)
> >   rename include/libcamera/{buffer.h => framebuffer.h} (89%)
> >   rename include/libcamera/internal/{buffer.h => framebuffer.h} (78%)
> 
> Are you sure you want to name it framebuffer.h for the internal header 
> also? I get the impression that the patch attempts to eliminates the 
> exception, filename vs class-name mismatch, but the internal header with 
> this change, will still be an exception. Why shouldn't we be leaning 
> towards
> 
>   rename include/libcamera/internal/{buffer.h => mappedbuffer.h} (78%) ?

That's a good point. Note however how patch 3/3 adds the
FrameBuffer::Private class to internal/framebuffer.h. The MappedBuffer
class is hijacking framebuffer.h a little bit, maybe it should be split
into a separate header. It has been added to buffer.h out of simplicity,
and we have other headers that have a main purpose and also carry
auxiliary classes.

In any case, I think this should be addressed in a separate patch if we
decide to go that route.

> Other than that, patch looks good to me,
> 
> Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
> 
> >   rename src/libcamera/{buffer.cpp => framebuffer.cpp} (97%)
> >
> > diff --git a/include/libcamera/buffer.h b/include/libcamera/framebuffer.h
> > similarity index 89%
> > rename from include/libcamera/buffer.h
> > rename to include/libcamera/framebuffer.h
> > index 323d1cba41a9..baf22a466907 100644
> > --- a/include/libcamera/buffer.h
> > +++ b/include/libcamera/framebuffer.h
> > @@ -2,10 +2,10 @@
> >   /*
> >    * Copyright (C) 2019, Google Inc.
> >    *
> > - * buffer.h - Buffer handling
> > + * framebuffer.h - Frame buffer handling
> >    */
> > -#ifndef __LIBCAMERA_BUFFER_H__
> > -#define __LIBCAMERA_BUFFER_H__
> > +#ifndef __LIBCAMERA_FRAMEBUFFER_H__
> > +#define __LIBCAMERA_FRAMEBUFFER_H__
> >   
> >   #include <stdint.h>
> >   #include <vector>
> > @@ -71,4 +71,4 @@ private:
> >   
> >   } /* namespace libcamera */
> >   
> > -#endif /* __LIBCAMERA_BUFFER_H__ */
> > +#endif /* __LIBCAMERA_FRAMEBUFFER_H__ */
> > diff --git a/include/libcamera/internal/buffer.h b/include/libcamera/internal/framebuffer.h
> > similarity index 78%
> > rename from include/libcamera/internal/buffer.h
> > rename to include/libcamera/internal/framebuffer.h
> > index beae0cb98544..0c76fc62af1d 100644
> > --- a/include/libcamera/internal/buffer.h
> > +++ b/include/libcamera/internal/framebuffer.h
> > @@ -2,10 +2,10 @@
> >   /*
> >    * Copyright (C) 2020, Google Inc.
> >    *
> > - * buffer.h - Internal buffer handling
> > + * framebuffer.h - Internal frame buffer handling
> >    */
> > -#ifndef __LIBCAMERA_INTERNAL_BUFFER_H__
> > -#define __LIBCAMERA_INTERNAL_BUFFER_H__
> > +#ifndef __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__
> > +#define __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__
> >   
> >   #include <sys/mman.h>
> >   #include <vector>
> > @@ -13,7 +13,7 @@
> >   #include <libcamera/base/class.h>
> >   #include <libcamera/base/span.h>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   namespace libcamera {
> >   
> > @@ -49,4 +49,4 @@ public:
> >   
> >   } /* namespace libcamera */
> >   
> > -#endif /* __LIBCAMERA_INTERNAL_BUFFER_H__ */
> > +#endif /* __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__ */
> > diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
> > index 76325b1d109f..519093bd314f 100644
> > --- a/include/libcamera/internal/ipa_data_serializer.h
> > +++ b/include/libcamera/internal/ipa_data_serializer.h
> > @@ -16,8 +16,8 @@
> >   
> >   #include <libcamera/base/log.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/control_ids.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/geometry.h>
> >   #include <libcamera/ipa/ipa_interface.h>
> >   
> > diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build
> > index 16a76ebdf9cc..6d4eb7ed3df6 100644
> > --- a/include/libcamera/internal/meson.build
> > +++ b/include/libcamera/internal/meson.build
> > @@ -11,7 +11,6 @@ libcamera_tracepoint_header = custom_target(
> >   
> >   libcamera_internal_headers = files([
> >       'bayer_format.h',
> > -    'buffer.h',
> >       'byte_stream_buffer.h',
> >       'camera_controls.h',
> >       'camera_sensor.h',
> > @@ -23,6 +22,7 @@ libcamera_internal_headers = files([
> >       'device_enumerator_sysfs.h',
> >       'device_enumerator_udev.h',
> >       'formats.h',
> > +    'framebuffer.h',
> >       'ipa_manager.h',
> >       'ipa_module.h',
> >       'ipa_proxy.h',
> > diff --git a/include/libcamera/internal/tracepoints/request.tp b/include/libcamera/internal/tracepoints/request.tp
> > index 9c841b97438a..37d8c46f4d96 100644
> > --- a/include/libcamera/internal/tracepoints/request.tp
> > +++ b/include/libcamera/internal/tracepoints/request.tp
> > @@ -5,7 +5,7 @@
> >    * request.tp - Tracepoints for the request object
> >    */
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/request.h>
> >   
> >   TRACEPOINT_EVENT_CLASS(
> > diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
> > index a7c3d5290d92..e767ec84c4da 100644
> > --- a/include/libcamera/internal/v4l2_videodevice.h
> > +++ b/include/libcamera/internal/v4l2_videodevice.h
> > @@ -20,7 +20,7 @@
> >   #include <libcamera/base/log.h>
> >   #include <libcamera/base/signal.h>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/geometry.h>
> >   #include <libcamera/pixel_format.h>
> >   
> > diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> > index 9a15c86b16e2..1590584c1fb4 100644
> > --- a/include/libcamera/ipa/ipa_interface.h
> > +++ b/include/libcamera/ipa/ipa_interface.h
> > @@ -15,8 +15,8 @@
> >   
> >   #include <libcamera/base/signal.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/controls.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/geometry.h>
> >   
> >   namespace libcamera {
> > diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
> > index e4d5c655c1e9..5b25ef847ed4 100644
> > --- a/include/libcamera/meson.build
> > +++ b/include/libcamera/meson.build
> > @@ -1,12 +1,12 @@
> >   # SPDX-License-Identifier: CC0-1.0
> >   
> >   libcamera_public_headers = files([
> > -    'buffer.h',
> >       'camera.h',
> >       'camera_manager.h',
> >       'compiler.h',
> >       'controls.h',
> >       'file_descriptor.h',
> > +    'framebuffer.h',
> >       'framebuffer_allocator.h',
> >       'geometry.h',
> >       'logging.h',
> > diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
> > index bb47c390f8a1..0c55e7164592 100644
> > --- a/include/libcamera/stream.h
> > +++ b/include/libcamera/stream.h
> > @@ -12,7 +12,7 @@
> >   #include <string>
> >   #include <vector>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/geometry.h>
> >   #include <libcamera/pixel_format.h>
> >   
> > diff --git a/src/android/camera_device.h b/src/android/camera_device.h
> > index 3361918d4484..32ba15566621 100644
> > --- a/src/android/camera_device.h
> > +++ b/src/android/camera_device.h
> > @@ -18,12 +18,12 @@
> >   #include <libcamera/base/message.h>
> >   #include <libcamera/base/thread.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/request.h>
> >   #include <libcamera/stream.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   #include "camera_capabilities.h"
> >   #include "camera_metadata.h"
> > diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
> > index 8ecc6e345414..629d9e00e08d 100644
> > --- a/src/android/camera_stream.h
> > +++ b/src/android/camera_stream.h
> > @@ -13,13 +13,13 @@
> >   
> >   #include <hardware/camera3.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/framebuffer_allocator.h>
> >   #include <libcamera/geometry.h>
> >   #include <libcamera/pixel_format.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   class CameraDevice;
> >   class CameraMetadata;
> > diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h
> > index 6e1aee4a3247..67ae50bd9288 100644
> > --- a/src/android/camera_worker.h
> > +++ b/src/android/camera_worker.h
> > @@ -12,8 +12,8 @@
> >   #include <libcamera/base/object.h>
> >   #include <libcamera/base/thread.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/request.h>
> >   #include <libcamera/stream.h>
> >   
> > diff --git a/src/android/jpeg/encoder.h b/src/android/jpeg/encoder.h
> > index 28e7f92a3ecb..a28522f41714 100644
> > --- a/src/android/jpeg/encoder.h
> > +++ b/src/android/jpeg/encoder.h
> > @@ -9,7 +9,7 @@
> >   
> >   #include <libcamera/base/span.h>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/stream.h>
> >   
> >   class Encoder
> > diff --git a/src/android/jpeg/encoder_libjpeg.h b/src/android/jpeg/encoder_libjpeg.h
> > index 838da7728382..14bf89223982 100644
> > --- a/src/android/jpeg/encoder_libjpeg.h
> > +++ b/src/android/jpeg/encoder_libjpeg.h
> > @@ -9,8 +9,8 @@
> >   
> >   #include "encoder.h"
> >   
> > -#include "libcamera/internal/buffer.h"
> >   #include "libcamera/internal/formats.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   #include <jpeglib.h>
> >   
> > diff --git a/src/android/jpeg/post_processor_jpeg.h b/src/android/jpeg/post_processor_jpeg.h
> > index 5d2d4ab224b1..5c399be9eb6a 100644
> > --- a/src/android/jpeg/post_processor_jpeg.h
> > +++ b/src/android/jpeg/post_processor_jpeg.h
> > @@ -13,7 +13,7 @@
> >   
> >   #include <libcamera/geometry.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   class CameraDevice;
> >   
> > diff --git a/src/android/jpeg/thumbnailer.h b/src/android/jpeg/thumbnailer.h
> > index 4e9226c34104..68cbf74329a9 100644
> > --- a/src/android/jpeg/thumbnailer.h
> > +++ b/src/android/jpeg/thumbnailer.h
> > @@ -9,8 +9,8 @@
> >   
> >   #include <libcamera/geometry.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> >   #include "libcamera/internal/formats.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   class Thumbnailer
> >   {
> > diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp
> > index 326fdc066499..166be36efd5b 100644
> > --- a/src/android/mm/generic_camera_buffer.cpp
> > +++ b/src/android/mm/generic_camera_buffer.cpp
> > @@ -11,7 +11,7 @@
> >   
> >   #include <libcamera/base/log.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   using namespace libcamera;
> >   
> > diff --git a/src/android/post_processor.h b/src/android/post_processor.h
> > index 547fda379ed8..689f85d9d3b8 100644
> > --- a/src/android/post_processor.h
> > +++ b/src/android/post_processor.h
> > @@ -7,10 +7,10 @@
> >   #ifndef __ANDROID_POST_PROCESSOR_H__
> >   #define __ANDROID_POST_PROCESSOR_H__
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/stream.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   #include "camera_buffer.h"
> >   
> > diff --git a/src/cam/buffer_writer.h b/src/cam/buffer_writer.h
> > index 47e26103e13e..604ce8702ec7 100644
> > --- a/src/cam/buffer_writer.h
> > +++ b/src/cam/buffer_writer.h
> > @@ -10,7 +10,7 @@
> >   #include <map>
> >   #include <string>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   class BufferWriter
> >   {
> > diff --git a/src/cam/capture.h b/src/cam/capture.h
> > index 59d138766b1e..de478c98e9c1 100644
> > --- a/src/cam/capture.h
> > +++ b/src/cam/capture.h
> > @@ -11,8 +11,8 @@
> >   #include <stdint.h>
> >   #include <vector>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/framebuffer_allocator.h>
> >   #include <libcamera/request.h>
> >   #include <libcamera/stream.h>
> > diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> > index f43f862085bb..71698d36e50f 100644
> > --- a/src/ipa/ipu3/ipu3.cpp
> > +++ b/src/ipa/ipu3/ipu3.cpp
> > @@ -13,14 +13,14 @@
> >   
> >   #include <libcamera/base/log.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/control_ids.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/ipa/ipa_interface.h>
> >   #include <libcamera/ipa/ipa_module_info.h>
> >   #include <libcamera/ipa/ipu3_ipa_interface.h>
> >   #include <libcamera/request.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   #include "ipu3_agc.h"
> >   #include "ipu3_awb.h"
> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> > index 4d09a84f6532..4ae81f352596 100644
> > --- a/src/ipa/raspberrypi/raspberrypi.cpp
> > +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> > @@ -18,17 +18,17 @@
> >   #include <libcamera/base/log.h>
> >   #include <libcamera/base/span.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/control_ids.h>
> >   #include <libcamera/controls.h>
> >   #include <libcamera/file_descriptor.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/ipa/ipa_interface.h>
> >   #include <libcamera/ipa/ipa_module_info.h>
> >   #include <libcamera/ipa/raspberrypi.h>
> >   #include <libcamera/ipa/raspberrypi_ipa_interface.h>
> >   #include <libcamera/request.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   #include "agc_algorithm.hpp"
> >   #include "agc_status.h"
> > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> > index cdfb4d139e41..b881d42ea131 100644
> > --- a/src/ipa/rkisp1/rkisp1.cpp
> > +++ b/src/ipa/rkisp1/rkisp1.cpp
> > @@ -17,8 +17,8 @@
> >   
> >   #include <libcamera/base/log.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/control_ids.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/ipa/ipa_interface.h>
> >   #include <libcamera/ipa/ipa_module_info.h>
> >   #include <libcamera/ipa/rkisp1_ipa_interface.h>
> > diff --git a/src/libcamera/buffer.cpp b/src/libcamera/framebuffer.cpp
> > similarity index 97%
> > rename from src/libcamera/buffer.cpp
> > rename to src/libcamera/framebuffer.cpp
> > index e4c345d518da..4bde556c4013 100644
> > --- a/src/libcamera/buffer.cpp
> > +++ b/src/libcamera/framebuffer.cpp
> > @@ -2,11 +2,11 @@
> >   /*
> >    * Copyright (C) 2019, Google Inc.
> >    *
> > - * buffer.cpp - Buffer handling
> > + * framebuffer.cpp - Frame buffer handling
> >    */
> >   
> > -#include <libcamera/buffer.h>
> > -#include "libcamera/internal/buffer.h"
> > +#include <libcamera/framebuffer.h>
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   #include <errno.h>
> >   #include <string.h>
> > @@ -16,11 +16,11 @@
> >   #include <libcamera/base/log.h>
> >   
> >   /**
> > - * \file libcamera/buffer.h
> > - * \brief Buffer handling
> > + * \file libcamera/framebuffer.h
> > + * \brief Frame buffer handling
> >    *
> > - * \file libcamera/internal/buffer.h
> > - * \brief Internal buffer handling support
> > + * \file libcamera/internal/framebuffer.h
> > + * \brief Internal frame buffer handling support
> >    */
> >   
> >   namespace libcamera {
> > diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
> > index 86a57923286c..695073fd1c1c 100644
> > --- a/src/libcamera/framebuffer_allocator.cpp
> > +++ b/src/libcamera/framebuffer_allocator.cpp
> > @@ -11,8 +11,8 @@
> >   
> >   #include <libcamera/base/log.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/stream.h>
> >   
> >   #include "libcamera/internal/pipeline_handler.h"
> > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> > index 517e763d40f0..4f08580157f9 100644
> > --- a/src/libcamera/meson.build
> > +++ b/src/libcamera/meson.build
> > @@ -2,7 +2,6 @@
> >   
> >   libcamera_sources = files([
> >       'bayer_format.cpp',
> > -    'buffer.cpp',
> >       'byte_stream_buffer.cpp',
> >       'camera.cpp',
> >       'camera_controls.cpp',
> > @@ -17,6 +16,7 @@ libcamera_sources = files([
> >       'device_enumerator_sysfs.cpp',
> >       'file_descriptor.cpp',
> >       'formats.cpp',
> > +    'framebuffer.cpp',
> >       'framebuffer_allocator.cpp',
> >       'geometry.cpp',
> >       'ipa_controls.cpp',
> > diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp
> > index d9a2249b81ff..ce5ccbf18e41 100644
> > --- a/src/libcamera/pipeline/ipu3/frames.cpp
> > +++ b/src/libcamera/pipeline/ipu3/frames.cpp
> > @@ -7,7 +7,7 @@
> >   
> >   #include "frames.h"
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/request.h>
> >   
> >   #include "libcamera/internal/pipeline_handler.h"
> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> > index 082eb1ee1c23..4f1a5985d62f 100644
> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> > @@ -30,10 +30,10 @@
> >   #include <linux/videodev2.h>
> >   
> >   #include "libcamera/internal/bayer_format.h"
> > -#include "libcamera/internal/buffer.h"
> >   #include "libcamera/internal/camera_sensor.h"
> >   #include "libcamera/internal/delayed_controls.h"
> >   #include "libcamera/internal/device_enumerator.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   #include "libcamera/internal/ipa_manager.h"
> >   #include "libcamera/internal/media_device.h"
> >   #include "libcamera/internal/pipeline_handler.h"
> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> > index 00df4f0b3e6b..42911a8fdfdb 100644
> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> > @@ -17,10 +17,10 @@
> >   #include <libcamera/base/log.h>
> >   #include <libcamera/base/utils.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> >   #include <libcamera/control_ids.h>
> >   #include <libcamera/formats.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/ipa/core_ipa_interface.h>
> >   #include <libcamera/ipa/rkisp1_ipa_interface.h>
> >   #include <libcamera/ipa/rkisp1_ipa_proxy.h>
> > diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
> > index 3baf78f9364c..b5e34c4cd0c5 100644
> > --- a/src/libcamera/pipeline/simple/converter.cpp
> > +++ b/src/libcamera/pipeline/simple/converter.cpp
> > @@ -14,7 +14,7 @@
> >   #include <libcamera/base/signal.h>
> >   #include <libcamera/base/utils.h>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/geometry.h>
> >   #include <libcamera/stream.h>
> >   
> > diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
> > index 0ed172dcd750..c9928d444b04 100644
> > --- a/src/libcamera/pipeline_handler.cpp
> > +++ b/src/libcamera/pipeline_handler.cpp
> > @@ -12,9 +12,9 @@
> >   #include <libcamera/base/log.h>
> >   #include <libcamera/base/utils.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> >   #include <libcamera/camera_manager.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   #include "libcamera/internal/device_enumerator.h"
> >   #include "libcamera/internal/media_device.h"
> > diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> > index 518384eb8cf6..5faf3c71ff02 100644
> > --- a/src/libcamera/request.cpp
> > +++ b/src/libcamera/request.cpp
> > @@ -12,9 +12,9 @@
> >   
> >   #include <libcamera/base/log.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> >   #include <libcamera/control_ids.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/stream.h>
> >   
> >   #include "libcamera/internal/camera_controls.h"
> > diff --git a/src/qcam/dng_writer.h b/src/qcam/dng_writer.h
> > index bf44c879aff7..20905f37ab94 100644
> > --- a/src/qcam/dng_writer.h
> > +++ b/src/qcam/dng_writer.h
> > @@ -10,9 +10,9 @@
> >   #ifdef HAVE_TIFF
> >   #define HAVE_DNG
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> >   #include <libcamera/controls.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/stream.h>
> >   
> >   using namespace libcamera;
> > diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
> > index 271314614391..85d56ce49abe 100644
> > --- a/src/qcam/main_window.h
> > +++ b/src/qcam/main_window.h
> > @@ -18,10 +18,10 @@
> >   #include <QQueue>
> >   #include <QTimer>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> >   #include <libcamera/camera_manager.h>
> >   #include <libcamera/controls.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/framebuffer_allocator.h>
> >   #include <libcamera/request.h>
> >   #include <libcamera/stream.h>
> > diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h
> > index e33dc4525224..46747c227d0c 100644
> > --- a/src/qcam/viewfinder.h
> > +++ b/src/qcam/viewfinder.h
> > @@ -11,8 +11,8 @@
> >   #include <QList>
> >   #include <QSize>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/formats.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   struct MappedBuffer {
> >   	void *memory;
> > diff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h
> > index bce94c87f2fb..4a0f8ca58f29 100644
> > --- a/src/qcam/viewfinder_gl.h
> > +++ b/src/qcam/viewfinder_gl.h
> > @@ -21,8 +21,8 @@
> >   #include <QOpenGLWidget>
> >   #include <QSize>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/formats.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   #include "viewfinder.h"
> >   
> > diff --git a/src/qcam/viewfinder_qt.h b/src/qcam/viewfinder_qt.h
> > index d755428887c0..501c72a70dec 100644
> > --- a/src/qcam/viewfinder_qt.h
> > +++ b/src/qcam/viewfinder_qt.h
> > @@ -14,8 +14,8 @@
> >   #include <QSize>
> >   #include <QWidget>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/formats.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/pixel_format.h>
> >   
> >   #include "format_converter.h"
> > diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
> > index dbe0573bd3a4..a095f4e27524 100644
> > --- a/src/v4l2/v4l2_camera.h
> > +++ b/src/v4l2/v4l2_camera.h
> > @@ -14,9 +14,9 @@
> >   
> >   #include <libcamera/base/semaphore.h>
> >   
> > -#include <libcamera/buffer.h>
> >   #include <libcamera/camera.h>
> >   #include <libcamera/file_descriptor.h>
> > +#include <libcamera/framebuffer.h>
> >   #include <libcamera/framebuffer_allocator.h>
> >   
> >   using namespace libcamera;
> > diff --git a/test/mapped-buffer.cpp b/test/mapped-buffer.cpp
> > index 5de8201e45f6..c9479194cb68 100644
> > --- a/test/mapped-buffer.cpp
> > +++ b/test/mapped-buffer.cpp
> > @@ -9,7 +9,7 @@
> >   
> >   #include <libcamera/framebuffer_allocator.h>
> >   
> > -#include "libcamera/internal/buffer.h"
> > +#include "libcamera/internal/framebuffer.h"
> >   
> >   #include "camera_test.h"
> >   #include "test.h"
> > diff --git a/test/v4l2_subdevice/v4l2_subdevice_test.h b/test/v4l2_subdevice/v4l2_subdevice_test.h
> > index 00c6399d3b8a..e981abf79225 100644
> > --- a/test/v4l2_subdevice/v4l2_subdevice_test.h
> > +++ b/test/v4l2_subdevice/v4l2_subdevice_test.h
> > @@ -8,7 +8,7 @@
> >   #ifndef __LIBCAMERA_V4L2_SUBDEVICE_TEST_H__
> >   #define __LIBCAMERA_V4L2_SUBDEVICE_TEST_H__
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   #include "libcamera/internal/device_enumerator.h"
> >   #include "libcamera/internal/media_device.h"
> > diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp
> > index 91b3e4a0dad6..6af96a983cd0 100644
> > --- a/test/v4l2_videodevice/buffer_sharing.cpp
> > +++ b/test/v4l2_videodevice/buffer_sharing.cpp
> > @@ -12,7 +12,7 @@
> >   
> >   #include <iostream>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   #include <libcamera/base/event_dispatcher.h>
> >   #include <libcamera/base/thread.h>
> > diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp
> > index f12c8bef97f6..805cb610296f 100644
> > --- a/test/v4l2_videodevice/capture_async.cpp
> > +++ b/test/v4l2_videodevice/capture_async.cpp
> > @@ -7,7 +7,7 @@
> >   
> >   #include <iostream>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   #include <libcamera/base/event_dispatcher.h>
> >   #include <libcamera/base/thread.h>
> > diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> > index fe4b3cc6487f..ebf3e245f86b 100644
> > --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> > +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> > @@ -7,7 +7,7 @@
> >   
> >   #include <iostream>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   #include <libcamera/base/event_dispatcher.h>
> >   #include <libcamera/base/thread.h>
> > diff --git a/test/v4l2_videodevice/v4l2_videodevice_test.h b/test/v4l2_videodevice/v4l2_videodevice_test.h
> > index 21054561e068..d46540d4861e 100644
> > --- a/test/v4l2_videodevice/v4l2_videodevice_test.h
> > +++ b/test/v4l2_videodevice/v4l2_videodevice_test.h
> > @@ -9,7 +9,7 @@
> >   
> >   #include <memory>
> >   
> > -#include <libcamera/buffer.h>
> > +#include <libcamera/framebuffer.h>
> >   
> >   #include "libcamera/internal/camera_sensor.h"
> >   #include "libcamera/internal/device_enumerator.h"

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list