[libcamera-devel,0/2] libcamera: Remove CameraManager::get(dev_t)
mbox series

Message ID 20230615225133.622612-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • libcamera: Remove CameraManager::get(dev_t)
Related show

Message

Kieran Bingham June 15, 2023, 10:51 p.m. UTC
Now that Cameras expose a SystemDevices property which reports any
associated dev_t identifiers, remove the now redundant implementation of
CameraManager::get(dev_t) which was provided purely for the V4L2
Adaptation layer.

The V4L2 adaptation layer reimplements the same functionality relying on
the SystemDevices data instead.

This series removes a public API function and is a clear break of
API/ABI.

It is (hopefully clearly) dependant upon the series " libcamera: Add new
Camera devices property " [0]

[0] https://patchwork.libcamera.org/project/libcamera/list/?series=3925

Kieran Bingham (2):
  v4l2: Use SystemDevices properties to identify cameras
  libcamera: CameraManager: Remove ::get(dev_t)

 include/libcamera/camera_manager.h          |  1 -
 include/libcamera/internal/camera_manager.h |  3 +-
 src/libcamera/camera_manager.cpp            | 42 ---------------------
 src/v4l2/v4l2_compat_manager.cpp            | 28 +++++++++++---
 4 files changed, 24 insertions(+), 50 deletions(-)

Comments

Laurent Pinchart June 16, 2023, 1:42 p.m. UTC | #1
Hi Kieran,

On Thu, Jun 15, 2023 at 11:51:31PM +0100, Kieran Bingham via libcamera-devel wrote:
> Now that Cameras expose a SystemDevices property which reports any
> associated dev_t identifiers, remove the now redundant implementation of
> CameraManager::get(dev_t) which was provided purely for the V4L2
> Adaptation layer.
> 
> The V4L2 adaptation layer reimplements the same functionality relying on
> the SystemDevices data instead.
> 
> This series removes a public API function and is a clear break of
> API/ABI.

This function was never meant to be used by applications, so hopefully
nobody will notice :-)

> It is (hopefully clearly) dependant upon the series " libcamera: Add new
> Camera devices property " [0]
> 
> [0] https://patchwork.libcamera.org/project/libcamera/list/?series=3925
> 
> Kieran Bingham (2):
>   v4l2: Use SystemDevices properties to identify cameras
>   libcamera: CameraManager: Remove ::get(dev_t)
> 
>  include/libcamera/camera_manager.h          |  1 -
>  include/libcamera/internal/camera_manager.h |  3 +-
>  src/libcamera/camera_manager.cpp            | 42 ---------------------
>  src/v4l2/v4l2_compat_manager.cpp            | 28 +++++++++++---
>  4 files changed, 24 insertions(+), 50 deletions(-)
Kieran Bingham June 17, 2023, 10:17 p.m. UTC | #2
Quoting Laurent Pinchart (2023-06-16 14:42:17)
> Hi Kieran,
> 
> On Thu, Jun 15, 2023 at 11:51:31PM +0100, Kieran Bingham via libcamera-devel wrote:
> > Now that Cameras expose a SystemDevices property which reports any
> > associated dev_t identifiers, remove the now redundant implementation of
> > CameraManager::get(dev_t) which was provided purely for the V4L2
> > Adaptation layer.
> > 
> > The V4L2 adaptation layer reimplements the same functionality relying on
> > the SystemDevices data instead.
> > 
> > This series removes a public API function and is a clear break of
> > API/ABI.
> 
> This function was never meant to be used by applications, so hopefully
> nobody will notice :-)

Indeed, and all the more reason why I wanted to make this break ;-)



> > It is (hopefully clearly) dependant upon the series " libcamera: Add new
> > Camera devices property " [0]
> > 
> > [0] https://patchwork.libcamera.org/project/libcamera/list/?series=3925
> > 
> > Kieran Bingham (2):
> >   v4l2: Use SystemDevices properties to identify cameras
> >   libcamera: CameraManager: Remove ::get(dev_t)
> > 
> >  include/libcamera/camera_manager.h          |  1 -
> >  include/libcamera/internal/camera_manager.h |  3 +-
> >  src/libcamera/camera_manager.cpp            | 42 ---------------------
> >  src/v4l2/v4l2_compat_manager.cpp            | 28 +++++++++++---
> >  4 files changed, 24 insertions(+), 50 deletions(-)
> 
> -- 
> Regards,
> 
> Laurent Pinchart
Kieran Bingham June 17, 2023, 10:34 p.m. UTC | #3
Quoting Kieran Bingham (2023-06-17 23:17:55)
> Quoting Laurent Pinchart (2023-06-16 14:42:17)
> > Hi Kieran,
> > 
> > On Thu, Jun 15, 2023 at 11:51:31PM +0100, Kieran Bingham via libcamera-devel wrote:
> > > Now that Cameras expose a SystemDevices property which reports any
> > > associated dev_t identifiers, remove the now redundant implementation of
> > > CameraManager::get(dev_t) which was provided purely for the V4L2
> > > Adaptation layer.
> > > 
> > > The V4L2 adaptation layer reimplements the same functionality relying on
> > > the SystemDevices data instead.
> > > 
> > > This series removes a public API function and is a clear break of
> > > API/ABI.
> > 
> > This function was never meant to be used by applications, so hopefully
> > nobody will notice :-)
> 
> Indeed, and all the more reason why I wanted to make this break ;-)
> 

Running:

./utils/abi-compat.sh # no args

produces a compat_report.html that correctly identifies the removal of
three symbols at the ABI

Added Symbols  1
  property_ids.h, libcamera.so.0.0.5
  namespace libcamera::properties
    SystemDevices [data]

Removed Symbols  3
  camera_manager.h, libcamera.so.0.0.5
  namespace libcamera
    CameraManager::addCamera ( std::shared_ptr<struct Camera> camera, std::vector<unsigned long>const& devnums )
    CameraManager::get ( dev_t devnum )
    CameraManager::removeCamera ( std::shared_ptr<struct Camera> camera )

--
Kieran


> > > It is (hopefully clearly) dependant upon the series " libcamera: Add new
> > > Camera devices property " [0]
> > > 
> > > [0] https://patchwork.libcamera.org/project/libcamera/list/?series=3925
> > > 
> > > Kieran Bingham (2):
> > >   v4l2: Use SystemDevices properties to identify cameras
> > >   libcamera: CameraManager: Remove ::get(dev_t)
> > > 
> > >  include/libcamera/camera_manager.h          |  1 -
> > >  include/libcamera/internal/camera_manager.h |  3 +-
> > >  src/libcamera/camera_manager.cpp            | 42 ---------------------
> > >  src/v4l2/v4l2_compat_manager.cpp            | 28 +++++++++++---
> > >  4 files changed, 24 insertions(+), 50 deletions(-)
> > 
> > -- 
> > Regards,
> > 
> > Laurent Pinchart