summaryrefslogtreecommitdiff
path: root/test/log
diff options
context:
space:
mode:
authorBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-03-28 16:20:46 +0100
committerBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-04-02 17:14:54 +0200
commit66fc6d26567c8f16dbcae4fa09b5afff8b2ff554 (patch)
tree42b5314b608af163e842d32f5400a6f82b6b7d2a /test/log
parent7cd8818da8338b43e2a2c9f53cc4834124c5e766 (diff)
gstreamer: Use `Control<>` objects when setting controls
`g_value_get_boolean()` returns `gboolean`, which is actually `int`. Thus // ControlValue x; auto val = g_value_get_boolean(...); x.set(val); will cause `ControlValue::set<int, ...>(const int&)` to be called, which will save the value as `ControlTypeInteger32`, not `ControlTypeBoolean`. Then, if something tries to retrieve the boolean value, it will run into an assertion failure: Assertion `type_ == details::control_type<std::remove_cv_t<T>>::value' failed. in `ControlValue::set()`. Fix this by using the appropriately typed `Control<>` object when setting the value in the `ControlList` as this ensures that the value will be converted to the actual type of the control. Bug: https://bugs.libcamera.org/show_bug.cgi?id=261 Fixes: 27cece6653e530 ("gstreamer: Generate controls from control_ids_*.yaml files") Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/log')
0 files changed, 0 insertions, 0 deletions