Files
duck-preview/app/config.py

30 lines
813 B
Python

"""Application-wide constants and default settings."""
from pathlib import Path
APP_NAME = "Duck Preview"
APP_VERSION = "0.1.0"
# Default camera settings
DEFAULT_FPS = 30
DEFAULT_WIDTH = 1280
DEFAULT_HEIGHT = 720
# Telemetry
TELEMETRY_UPDATE_INTERVAL_MS = 500 # how often the metrics snapshot is refreshed
# Overlay
OVERLAY_BG_COLOR = (0, 0, 0, 160) # RGBA
OVERLAY_TEXT_COLOR = (255, 255, 255, 255)
OVERLAY_FONT_SIZE = 13
OVERLAY_PADDING = 10
OVERLAY_MARGIN = 10
# Frame dispatcher
DISPATCHER_MAX_QUEUE_SIZE = 2 # max pending frames per slow subscriber before drop
# Logging
LOG_DIR = Path("logs") # relative to CWD (project root)
MAX_LOG_FILES = 20 # oldest sessions are deleted when exceeded
TELEMETRY_CSV_INTERVAL_S = 5.0 # how often a CSV row is written (seconds)