[libcamera-devel,v4,0/2] V4L2Device: Add basic V4L2 support class
mbox series

Message ID 20190117212703.24047-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • V4L2Device: Add basic V4L2 support class
Related show

Message

Kieran Bingham Jan. 17, 2019, 9:27 p.m. UTC
Define the beginnings of a V4L2 device management object.

This basic class supports opening the device and parsing the device
capabilities including obtaining the driver, device, and bus
information.

The device will reject ->open() calls on devices which are not either
CAPTURE or OUTPUT devices and those which do not support the streaming
I/O interface.

Kieran Bingham (2):
  libcamera: Add V4L2 Device object
  test: v4l2_device: Add test suite and initial test

 src/libcamera/include/v4l2_device.h   |  60 +++++++++
 src/libcamera/meson.build             |   2 +
 src/libcamera/v4l2_device.cpp         | 186 ++++++++++++++++++++++++++
 test/meson.build                      |   1 +
 test/v4l2_device/double_open.cpp      |  38 ++++++
 test/v4l2_device/meson.build          |  12 ++
 test/v4l2_device/v4l2_device_test.cpp |  43 ++++++
 test/v4l2_device/v4l2_device_test.h   |  27 ++++
 8 files changed, 369 insertions(+)
 create mode 100644 src/libcamera/include/v4l2_device.h
 create mode 100644 src/libcamera/v4l2_device.cpp
 create mode 100644 test/v4l2_device/double_open.cpp
 create mode 100644 test/v4l2_device/meson.build
 create mode 100644 test/v4l2_device/v4l2_device_test.cpp
 create mode 100644 test/v4l2_device/v4l2_device_test.h

Comments

Laurent Pinchart Jan. 17, 2019, 9:54 p.m. UTC | #1
Hi Kieran,

Thank you for the patches.

On Thu, Jan 17, 2019 at 09:27:01PM +0000, Kieran Bingham wrote:
> Define the beginnings of a V4L2 device management object.
> 
> This basic class supports opening the device and parsing the device
> capabilities including obtaining the driver, device, and bus
> information.
> 
> The device will reject ->open() calls on devices which are not either
> CAPTURE or OUTPUT devices and those which do not support the streaming
> I/O interface.
> 
> Kieran Bingham (2):
>   libcamera: Add V4L2 Device object
>   test: v4l2_device: Add test suite and initial test

For the whole series,

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

>  src/libcamera/include/v4l2_device.h   |  60 +++++++++
>  src/libcamera/meson.build             |   2 +
>  src/libcamera/v4l2_device.cpp         | 186 ++++++++++++++++++++++++++
>  test/meson.build                      |   1 +
>  test/v4l2_device/double_open.cpp      |  38 ++++++
>  test/v4l2_device/meson.build          |  12 ++
>  test/v4l2_device/v4l2_device_test.cpp |  43 ++++++
>  test/v4l2_device/v4l2_device_test.h   |  27 ++++
>  8 files changed, 369 insertions(+)
>  create mode 100644 src/libcamera/include/v4l2_device.h
>  create mode 100644 src/libcamera/v4l2_device.cpp
>  create mode 100644 test/v4l2_device/double_open.cpp
>  create mode 100644 test/v4l2_device/meson.build
>  create mode 100644 test/v4l2_device/v4l2_device_test.cpp
>  create mode 100644 test/v4l2_device/v4l2_device_test.h