feat(cam-helper): add decoupled czcamera-cam picamera2 worker and CZFR/JSON protocol

This commit is contained in:
2026-11-19 13:40:11 -05:00
parent f5e953e76c
commit 9c6c14f5dd
6 changed files with 2089 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
"""Decoupled camera helper worker and wire protocol for czcamera."""
from .picam2_worker import (
MockCameraDriver,
Picam2Worker,
compute_scaler_crop,
resolve_transform,
)
from .protocol import (
CZFR_HEADER_STRUCT,
CZFR_MAGIC,
FLAG_ASPECT_16_9,
PIXFMT_RGB24,
PIXFMT_YUV420,
PROTOCOL_VERSION,
FramePipeWriter,
JsonProtocolServer,
pack_czfr_header,
)
__all__ = [
"CZFR_HEADER_STRUCT",
"CZFR_MAGIC",
"FLAG_ASPECT_16_9",
"FramePipeWriter",
"JsonProtocolServer",
"MockCameraDriver",
"PIXFMT_RGB24",
"PIXFMT_YUV420",
"PROTOCOL_VERSION",
"Picam2Worker",
"compute_scaler_crop",
"pack_czfr_header",
"resolve_transform",
]