Skip to content

Commit 02e29e3

Browse files
committed
Suggest mono preserve instead of auto-enable
Camera probing no longer silently turns on `preserve_mono` when a mono pixel format is detected. Instead, it records `recommended_preserve_mono` and shows a status message explaining why enabling “Preserve mono frames” is recommended for performance, keeping configuration changes explicit and user-controlled.
1 parent 973b9bf commit 02e29e3

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

‎dlclivegui/gui/camera_config/camera_config_dialog.py‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,14 +1454,17 @@ def _on_probe_success(self, payload) -> None:
14541454
preserve_mono_cap = caps.get("preserve_mono")
14551455
preserve_mono_supported = preserve_mono_cap is not None and preserve_mono_cap.value != "unsupported"
14561456

1457-
if preserve_mono_supported and recommended_preserve_mono is True:
1458-
if not bool(getattr(c, "preserve_mono", False)):
1459-
c.preserve_mono = True
1460-
self._append_status("[Probe] Mono pixel format detected; enabled Preserve mono frames.")
1461-
1462-
if actual_pixel_format and str(actual_pixel_format).startswith("Mono"):
1463-
ns["detected_output_format"] = "Mono8"
1464-
1457+
mono_recommended = (
1458+
preserve_mono_supported
1459+
and recommended_preserve_mono is True
1460+
and not bool(getattr(c, "preserve_mono", False))
1461+
)
1462+
if mono_recommended:
1463+
ns["recommended_preserve_mono"] = True
1464+
self._append_status(
1465+
"[Probe] Mono pixel format detected. "
1466+
"Enable 'Preserve mono frames' to avoid expanding frames to color (for performance)."
1467+
)
14651468
# ---- Apply detected -> requested (Reset behavior) ----
14661469
if self._probe_apply_to_requested and self._probe_target_row == i:
14671470
# Only apply resolution if we actually got it

0 commit comments

Comments
 (0)