libcamera/test
Jacopo Mondi 45736468c8 libcamera: v4l2_videodevice: Reintroduce toV4L2PixelFormat()
This is a partial revert of commit 395d43d6d7 ("libcamera:
v4l2_videodevice: Drop toV4L2PixelFormat()")

The function was removed because it incorrectly maps non-contiguous V4L2
format variants (ie V4L2_PIX_FMT_YUV420M) to the API version supported
by the video device (singleplanar API and multiplanar API).  It was
decided at the time to remove the function and let its users call
directly V4L2PixelFormat::fromPixelFormat() which accepts a
'multiplanar' flags.

As we aim to associate multiple V4L2PixelFormat to a single libcamera
format, the next patches will verify which of them is actually supported
by the video device. For now, return the contiguous version
unconditionally.

Re-introduce V4L2VideoDevice::toV4L2PixelFormat() and convert all
the V4L2PixelFormat::fromPixelFormat() users to use it.

The V4L2 compatibility layer is the only outlier as it doesn't have a
video device to poke, hence it still uses
V4L2PixelFormat::fromPixelFormat().

Next patches will implement the device format matching logic and handle
the non-contiguous plane issue in V4L2VideoDevice::toV4L2PixelFormat().

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
..
camera libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
controls test: control_list: Use get() to test for control presence 2022-07-20 13:25:02 +03:00
gstreamer test: gstreamer: Check availability of cameras before running 2022-07-24 19:39:14 +05:30
ipa libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
ipc libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
libtest libcamera: v4l2_videodevice: Reintroduce toV4L2PixelFormat() 2022-08-03 15:07:20 +02:00
log libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
media_device test: Convert to pragma once 2021-11-24 12:19:00 +00:00
pipeline libcamera/base: Validate internal headers as private 2021-06-25 16:11:11 +01:00
process libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
py py: Merge read_event() and get_ready_requests() 2022-06-04 02:21:05 +03:00
serialization meson: Use new project_*_root() functions 2022-05-10 13:53:43 +02:00
stream libcamera: Replace toString with operator<<() for geometry classes 2022-05-04 14:11:25 +03:00
v4l2_compat test: v4l2_compat: Add --verbose argument 2022-01-17 14:31:32 +02:00
v4l2_subdevice test: Convert to pragma once 2021-11-24 12:19:00 +00:00
v4l2_videodevice test: v4l2_videodevice: Fix format configuration in the vimc pipeline 2022-04-07 16:19:41 +03:00
bayer-format.cpp libcamera: Replace toString with operator<<() for format classes 2022-05-04 14:11:33 +03:00
byte-stream-buffer.cpp test: byte-stream-buffer: Initialize data array 2021-05-26 10:24:15 +02:00
camera-sensor.cpp libcamera: Replace toString with operator<<() for format classes 2022-05-04 14:11:33 +03:00
delayed_controls.cpp test: delayed_controls: Remove sequenceOffset 2022-07-06 09:03:46 +02:00
event-dispatcher.cpp libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
event-thread.cpp libcamera: Drop emitter object pointer from signal arguments 2021-09-02 01:16:45 +03:00
event.cpp libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
fence.cpp libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
file.cpp test: Replace "/proc/self/exe" with path to test binary 2021-12-01 08:54:24 +02:00
flags.cpp test: Add tests for the Flags class 2021-08-03 10:55:21 +03:00
geometry.cpp libcamera: Replace toString with operator<<() for geometry classes 2022-05-04 14:11:25 +03:00
hotplug-cameras.cpp libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
mapped-buffer.cpp test: Remove using namespace in header files 2021-10-15 05:05:43 +03:00
meson.build py: Add unittests.py 2022-05-10 13:53:43 +02:00
message.cpp test: message: Test recursive Thread::dispatchMessages() calls 2021-07-11 17:41:59 +03:00
object-delete.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
object-invoke.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
object.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
pixel-format.cpp libcamera/base: Move utils to the base library 2021-06-25 16:11:02 +01:00
public-api.cpp test: Ensure LIBCAMERA_BASE_PRIVATE isn't public 2021-06-25 16:11:11 +01:00
shared-fd.cpp libcamera: base: shared_fd: Rename fd() to get() 2021-12-04 23:05:07 +02:00
signal-threads.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
signal.cpp libcamera: base: object: Prevent the same signal being connected more than once 2022-02-04 10:13:29 +00:00
span.cpp libcamera/base: Move span to base library 2021-06-25 16:11:11 +01:00
threads.cpp libcamera/base: Move extended base functionality 2021-06-25 16:11:08 +01:00
timer-thread.cpp libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
timer.cpp libcamera: base: timer: Drop start() overload with int argument 2022-03-25 13:11:12 +02:00
unique-fd.cpp test: Add UniqueFD test 2021-12-03 19:20:41 +02:00
utils.cpp libcamera: base: utils: Provide defopt to simplify std::optional::value_or() usage 2022-07-28 14:54:41 +03:00
yaml-parser.cpp test: yaml-parser: Test YamlObject::get(const T &defaultValue) 2022-08-01 19:39:12 +03:00