diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-07-13 09:51:51 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-06-10 14:19:28 +0100 |
commit | c2616fb8bbcd2845e210b7b4b221a4df0e71bf0d (patch) | |
tree | 5ec940e04eae7a34da7fc75f9cd703e133ef8d74 /test/media_device/media_device_link_test.cpp | |
parent | 4df1c79e1bb8dab57dbfe39edbabc697fbc0a62a (diff) |
libcamera: pipeline: vivid: Configure the device
When the configurations have been generated and validated, they can be
applied to a device.
Vivid supports only a single stream, so it directly obtains the first
StreamConfiguration from the CameraConfiguration.
The VIVID catpure device is a V4L2Video device, so we generate a
V4L2DeviceFormat to apply directly to the capture device node.
Note that we convert the libcamera Format stored in
cfg.pixelFormat to a V4L2PixelFormat using V4L2PixelFormat helper. This
currently defaults to the single-planar formats, and should be extended
to support the Multiplanar configuration from the V4L2Device.
[todo Repair the link between the multiplanar configuration of the
V4L2VideoDevice and the pixel format selection]
Following the call to set the format using the Kernel API, if the format
has been adjusted in any way by the kernel driver, then we have failed
to correctly handle the validation stages, and thus the configure
operation is idendified has having failed.
Finally stream specific data can be directly stored and set as
reflecting the state of the stream.
[NOTE: the cfg.setStream() call here associates the stream to the
StreamConfiguration however that should quite likely be done as part of
the validation process. TBD]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/media_device/media_device_link_test.cpp')
0 files changed, 0 insertions, 0 deletions