summaryrefslogtreecommitdiff
path: root/src/ipa/rpi
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2024-07-13 20:43:27 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-07-21 19:26:46 +0300
commit4661a7eedf81f00212956f0d396196b3eb4a417b (patch)
tree85446a863446daf1cf2c1c659d5109d5c1c7f6ac /src/ipa/rpi
parent644986c2b77eef28150f6ea2083f9b828c509d26 (diff)
libcamera: v4l2_videodevice: Use bufferType_ in [get|try|set]Format()
V4L2VideoDevice is using the caps to determine which kind of buffers to use with the video-device in 2 different cases: 1. V4L2VideoDevice::open() 2. V4L2VideoDevice::[get|try|set]Format() And the order in which the caps are checked is different between these 2 cases. This is a problem for /dev/video# nodes which support both video-capture and metadata buffers. open() sets bufferType_ to V4L2_BUF_TYPE_VIDEO_CAPTURE[_MPLANE] in this case, where as [get|try|set]Format() will call [get|set]FormatMeta() which does not work with V4L2_BUF_TYPE_VIDEO_CAPTURE[_MPLANE] buffers. Switch [get|try|set]Format() to use the bufferType_ to determine on what sort of buffers they should be operating, leaving the V4L2VideoDevice code with only a single place where the decision is made what sort of buffers it should operate on for a specific /dev/video# node. This will also allow to modify open() in the future to take a bufferType argument to allow overriding the default bufferType it selects for /dev/video# nodes which are capable of supporting more then 1 buffer type. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/rpi')
0 files changed, 0 insertions, 0 deletions
0 ipa_name = 'ipa_rpi' rpi_ipa_deps = [ libcamera_private, dependency('boost'), libatomic, ] rpi_ipa_includes = [ ipa_includes, libipa_includes, include_directories('controller') ] rpi_ipa_sources = files([ 'raspberrypi.cpp', 'md_parser_smia.cpp', 'cam_helper.cpp', 'cam_helper_ov5647.cpp', 'cam_helper_imx219.cpp', 'cam_helper_imx290.cpp', 'cam_helper_imx296.cpp', 'cam_helper_imx477.cpp', 'cam_helper_imx519.cpp', 'cam_helper_ov9281.cpp', 'controller/controller.cpp', 'controller/histogram.cpp', 'controller/algorithm.cpp', 'controller/rpi/alsc.cpp', 'controller/rpi/awb.cpp', 'controller/rpi/sharpen.cpp', 'controller/rpi/black_level.cpp', 'controller/rpi/focus.cpp', 'controller/rpi/geq.cpp', 'controller/rpi/noise.cpp', 'controller/rpi/lux.cpp', 'controller/rpi/agc.cpp', 'controller/rpi/dpc.cpp', 'controller/rpi/ccm.cpp', 'controller/rpi/contrast.cpp', 'controller/rpi/sdn.cpp', 'controller/pwl.cpp', 'controller/device_status.cpp', ]) mod = shared_module(ipa_name, [rpi_ipa_sources, libcamera_generated_ipa_headers], name_prefix : '', include_directories : rpi_ipa_includes, dependencies : rpi_ipa_deps, link_with : libipa, install : true, install_dir : ipa_install_dir) if ipa_sign_module custom_target(ipa_name + '.so.sign', input : mod, output : ipa_name + '.so.sign', command : [ipa_sign, ipa_priv_key, '@INPUT@', '@OUTPUT@'], install : false, build_by_default : true)