diff --git a/RELEASE.md b/RELEASE.md index 6184ee5..505729f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,6 +4,7 @@ - cmd: accept `--camera-options=AfMode=auto` and alike - libcamera: expose all options with human readable settings - v4l2: expose all options with human readable settings +- libcamera: do not expose some options that should not be made configurable ## Variants diff --git a/device/libcamera/options.cc b/device/libcamera/options.cc index f1dbba5..1d76509 100644 --- a/device/libcamera/options.cc +++ b/device/libcamera/options.cc @@ -60,6 +60,11 @@ static std::map libcamera_control_ids = LIBCAMERA_DRAFT_CONTROL(TestPatternMode) }; +static std::set ignored_controls = +{ + &libcamera::controls::FrameDurationLimits +}; + static auto control_type_values = control_enum_values("ControlType"); static const std::map *libcamera_find_control_ids(unsigned control_id) @@ -151,6 +156,10 @@ void libcamera_device_dump_options(device_t *dev, FILE *stream) static int libcamera_device_dump_control_option(device_option_fn fn, void *opaque, const libcamera::ControlId &control_id, const libcamera::ControlInfo *control_info, const libcamera::ControlValue *control_value, bool read_only) { + if (ignored_controls.find(&control_id) != ignored_controls.end()) { + return 0; + } + device_option_t opt = { .control_id = control_id.id() };