Refactor capture engine architecture, rename PictureStream to PictureSource, and split API modules

- Separate CaptureEngine into stateless factory + stateful CaptureStream session
- Add LiveStream/LiveStreamManager for shared capture with reference counting
- Rename PictureStream to PictureSource across storage, API, and UI
- Remove legacy migration logic and unused compatibility code
- Split monolithic routes.py (1935 lines) into 5 focused route modules
- Split schemas.py (480 lines) into 7 schema modules with re-exports
- Extract dependency injection into dedicated dependencies.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 14:27:00 +03:00
parent b8389f080a
commit c3828e10fa
42 changed files with 4047 additions and 3797 deletions

View File

@@ -199,19 +199,19 @@
"confirm.no": "No",
"common.delete": "Delete",
"common.edit": "Edit",
"streams.title": "\uD83D\uDCFA Streams",
"streams.description": "Streams define the capture pipeline. A raw stream captures from a display using a capture template. A processed stream applies postprocessing to another stream. Assign streams to devices.",
"streams.title": "\uD83D\uDCFA Sources",
"streams.description": "Sources define the capture pipeline. A raw source captures from a display using a capture template. A processed source applies postprocessing to another source. Assign sources to devices.",
"streams.group.raw": "Screen Capture",
"streams.group.processed": "Processed",
"streams.section.streams": "\uD83D\uDCFA Streams",
"streams.add": "Add Stream",
"streams.section.streams": "\uD83D\uDCFA Sources",
"streams.add": "Add Source",
"streams.add.raw": "Add Screen Capture",
"streams.add.processed": "Add Processed Stream",
"streams.edit": "Edit Stream",
"streams.add.processed": "Add Processed Source",
"streams.edit": "Edit Source",
"streams.edit.raw": "Edit Screen Capture",
"streams.edit.processed": "Edit Processed Stream",
"streams.name": "Stream Name:",
"streams.name.placeholder": "My Stream",
"streams.edit.processed": "Edit Processed Source",
"streams.name": "Source Name:",
"streams.name.placeholder": "My Source",
"streams.type": "Type:",
"streams.type.raw": "Screen Capture",
"streams.type.processed": "Processed",
@@ -221,26 +221,26 @@
"streams.capture_template.hint": "Engine template defining how the screen is captured",
"streams.target_fps": "Target FPS:",
"streams.target_fps.hint": "Target frames per second for capture (10-90)",
"streams.source": "Source Stream:",
"streams.source.hint": "The stream to apply processing filters to",
"streams.source": "Source:",
"streams.source.hint": "The source to apply processing filters to",
"streams.pp_template": "Filter Template:",
"streams.pp_template.hint": "Filter template to apply to the source stream",
"streams.pp_template.hint": "Filter template to apply to the source",
"streams.description_label": "Description (optional):",
"streams.description_placeholder": "Describe this stream...",
"streams.created": "Stream created successfully",
"streams.updated": "Stream updated successfully",
"streams.deleted": "Stream deleted successfully",
"streams.delete.confirm": "Are you sure you want to delete this stream?",
"streams.error.load": "Failed to load streams",
"streams.description_placeholder": "Describe this source...",
"streams.created": "Source created successfully",
"streams.updated": "Source updated successfully",
"streams.deleted": "Source deleted successfully",
"streams.delete.confirm": "Are you sure you want to delete this source?",
"streams.error.load": "Failed to load sources",
"streams.error.required": "Please fill in all required fields",
"streams.error.delete": "Failed to delete stream",
"streams.test.title": "Test Stream",
"streams.error.delete": "Failed to delete source",
"streams.test.title": "Test Source",
"streams.test.run": "🧪 Run",
"streams.test.running": "Testing stream...",
"streams.test.running": "Testing source...",
"streams.test.duration": "Capture Duration (s):",
"streams.test.error.failed": "Stream test failed",
"streams.test.error.failed": "Source test failed",
"postprocessing.title": "\uD83D\uDCC4 Filter Templates",
"postprocessing.description": "Processing templates define image filters and color correction. Assign them to processed picture streams for consistent postprocessing across devices.",
"postprocessing.description": "Processing templates define image filters and color correction. Assign them to processed picture sources for consistent postprocessing across devices.",
"postprocessing.add": "Add Filter Template",
"postprocessing.edit": "Edit Filter Template",
"postprocessing.name": "Template Name:",
@@ -269,16 +269,16 @@
"postprocessing.error.delete": "Failed to delete processing template",
"postprocessing.config.show": "Show settings",
"postprocessing.test.title": "Test Filter Template",
"postprocessing.test.source_stream": "Source Stream:",
"postprocessing.test.source_stream": "Source:",
"postprocessing.test.running": "Testing processing template...",
"postprocessing.test.error.no_stream": "Please select a source stream",
"postprocessing.test.error.no_stream": "Please select a source",
"postprocessing.test.error.failed": "Processing template test failed",
"device.button.stream_selector": "Stream Settings",
"device.stream_settings.title": "📺 Stream Settings",
"device.stream_selector.label": "Stream:",
"device.stream_selector.hint": "Select a stream that defines what this device captures and processes",
"device.stream_selector.none": "-- No stream assigned --",
"device.stream_selector.saved": "Stream settings updated",
"device.button.stream_selector": "Source Settings",
"device.stream_settings.title": "📺 Source Settings",
"device.stream_selector.label": "Source:",
"device.stream_selector.hint": "Select a source that defines what this device captures and processes",
"device.stream_selector.none": "-- No source assigned --",
"device.stream_selector.saved": "Source settings updated",
"device.stream_settings.border_width": "Border Width (px):",
"device.stream_settings.border_width_hint": "How many pixels from the screen edge to sample for LED colors (1-100)",
"device.stream_settings.interpolation": "Interpolation Mode:",
@@ -288,10 +288,10 @@
"device.stream_settings.interpolation_hint": "How to calculate LED color from sampled pixels",
"device.stream_settings.smoothing": "Smoothing:",
"device.stream_settings.smoothing_hint": "Temporal blending between frames (0=none, 1=full). Reduces flicker.",
"device.tip.stream_selector": "Configure picture stream and LED projection settings for this device",
"device.tip.stream_selector": "Configure picture source and LED projection settings for this device",
"streams.group.static_image": "Static Image",
"streams.add.static_image": "Add Static Image",
"streams.edit.static_image": "Edit Static Image",
"streams.add.static_image": "Add Static Image Source",
"streams.edit.static_image": "Edit Static Image Source",
"streams.type.static_image": "Static Image",
"streams.image_source": "Image Source:",
"streams.image_source.placeholder": "https://example.com/image.jpg or C:\\path\\to\\image.png",