libcamera/include/libcamera
Jacopo Mondi d1abe2bdc8 libcamera: v4l2_videodevice: Match formats supported by the device
Now that V4L2PixelFormat::fromPixelFormat() returns a list of formats
to chose from, select the one supported by the video device by matching
against the list of supported pixel formats.

The first format found to match one of the device supported ones is
returned.

As the list of pixel formats supported by the video device does not
change at run-time, cache it at device open() time. Maximize the
lookup efficiency by storing the list of supported V4L2PixelFormat in an
std::unordered_set<>.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
2022-08-03 15:07:20 +02:00
..
base libcamera: Drop unnecessary typename keyword used with std::enable_if_t 2022-07-28 18:47:17 +03:00
internal libcamera: v4l2_videodevice: Match formats supported by the device 2022-08-03 15:07:20 +02:00
ipa pipeline: ipa: raspberrypi: Correctly report available control limits 2022-06-29 13:55:17 +01:00
camera.h libcamera: camera: Add validateColorSpaces to CameraConfiguration class 2021-12-13 11:29:02 +02:00
camera_manager.h libcamera: Convert to pragma once 2021-11-24 12:17:35 +00:00
color_space.h raspberrypi: Update Copyright statement in all Raspberry Pi source files 2022-07-27 18:12:15 +03:00
control_ids.h.in libcamera: Convert to pragma once 2021-11-24 12:17:35 +00:00
controls.h libcamera: Drop unnecessary typename keyword used with std::enable_if_t 2022-07-28 18:47:17 +03:00
fence.h libcamera: fence: Introduce Fence 2021-12-11 17:53:40 +01:00
formats.h.in libcamera: Convert to pragma once 2021-11-24 12:17:35 +00:00
framebuffer.h libcamera: framebuffer: Turn the cookie into a 64-bit integer 2022-07-04 23:07:29 +03:00
framebuffer_allocator.h libcamera: Convert to pragma once 2021-11-24 12:17:35 +00:00
geometry.h libcamera: geometry: Add missing ostream header in geometry.h 2022-05-04 14:11:29 +03:00
logging.h libcamera: base: log: Add coloring to the log output 2022-06-06 15:09:42 +03:00
meson.build libcamera: Add ColorSpace class 2021-12-13 11:29:01 +02:00
pixel_format.h libcamera: Add operator<<() for pixel format classes 2022-05-04 14:11:30 +03:00
property_ids.h.in libcamera: Convert to pragma once 2021-11-24 12:17:35 +00:00
request.h libcamera: request: Add operator<<() 2022-06-05 14:48:08 +02:00
stream.h libcamera: stream: Add ColorSpace fields to StreamConfiguration 2021-12-13 11:29:01 +02:00
transform.h raspberrypi: Update Copyright statement in all Raspberry Pi source files 2022-07-27 18:12:15 +03:00
version.h.in libcamera: Convert to pragma once 2021-11-24 12:17:35 +00:00