Skip to content

Commit 124d7cb

Browse files
committed
Disable default timing logs and fix stats import
Turns off multi-camera, recorder, and Basler timing logs by default to reduce debug noise in normal runs. Also cleans up stale priority wording in main window comments, updates VideoRecorder docstrings to reflect `writer_options`, and fixes stats tests to import `RecorderStats` from `dlclivegui.utils.stats`.
1 parent 7bad67b commit 124d7cb

4 files changed

Lines changed: 8 additions & 11 deletions

File tree

dlclivegui/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
## Debug
2626
### Timing logs
2727
SINGLE_CAMERA_WORKER_DO_LOG_TIMING: bool = False
28-
MULTI_CAMERA_WORKER_DO_LOG_TIMING: bool = True
29-
REC_DO_LOG_TIMING: bool = True
28+
MULTI_CAMERA_WORKER_DO_LOG_TIMING: bool = False
29+
REC_DO_LOG_TIMING: bool = False
3030
# MAIN_WINDOW_DO_LOG_TIMING: bool = False
3131
#### Backends
32-
BASLER_DO_LOG_TIMING: bool = True
32+
BASLER_DO_LOG_TIMING: bool = False
3333

3434

3535
class CameraSettings(BaseModel):

dlclivegui/gui/main_window.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,7 @@ def _on_multi_frame_processing_ready(self, frame_data: MultiFrameData) -> None:
14181418
"""Handle frames from multiple cameras.
14191419
14201420
Priority:
1421-
1. DLC processing (highest priority - enqueue immediately, only for DLC camera)
1422-
2. Recording (queued writes, non-blocking)
1421+
- DLC processing (highest priority - enqueue immediately, only for DLC camera)
14231422
"""
14241423
self._multi_camera_frames = frame_data.frames
14251424
self._multi_camera_display_ids = frame_data.display_ids or {}
@@ -1460,7 +1459,7 @@ def _on_multi_frame_processing_ready(self, frame_data: MultiFrameData) -> None:
14601459
self._raw_frame = frame
14611460
self._dlc_tile_offset, self._dlc_tile_scale = compute_tile_info(dlc_cam_id, frame, frame_data.frames)
14621461

1463-
# PRIORITY 1: DLC processing - only enqueue when DLC camera frame arrives!
1462+
# PRIORITY: DLC processing - only enqueue when DLC camera frame arrives!
14641463
if self._dlc_active and is_dlc_camera_frame and dlc_cam_id in frame_data.frames:
14651464
frame = frame_data.frames[dlc_cam_id]
14661465
timestamp = frame_data.timestamps.get(dlc_cam_id, time.time())

dlclivegui/services/video_recorder.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ class VideoRecorder:
6161
convert_grayscale_to_rgb: Whether 2D grayscale frames should be expanded
6262
to 3-channel RGB before writing. Set to `False` to preserve mono
6363
frames when supported by the chosen writer/codec path.
64-
fast_encoding: Whether to apply faster FFmpeg encoder settings when
65-
supported by the selected codec. This can improve throughput at the
66-
cost of larger files and/or reduced compression efficiency.
64+
writer_options: Optional dictionary of additional keyword arguments passed
65+
to `WriteGear`. If provided, this overrides the default options.
6766
6867
Attributes:
6968
is_running: Whether the writer thread is currently alive.

tests/utils/test_stats.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
from hypothesis import given, settings
55
from hypothesis import strategies as st
66

7-
from dlclivegui.gui.recording_manager import RecorderStats
8-
from dlclivegui.utils.stats import format_dlc_stats, format_recorder_stats
7+
from dlclivegui.utils.stats import RecorderStats, format_dlc_stats, format_recorder_stats
98

109
pytestmark = pytest.mark.unit
1110

0 commit comments

Comments
 (0)