restructure and test, pure python and rust transport both _work_

This commit is contained in:
2026-04-10 16:25:54 -03:00
parent 9d3ff2c6ba
commit e906b0a963
11 changed files with 1146 additions and 67 deletions

View File

@@ -168,10 +168,11 @@ class StreamManager:
return self.recorder.alive() if self.recorder else True # Rust owns it
def start_scene_detector(self, on_new_frames=None):
if self.recorder:
self.recorder.set_on_new_scene_frames(on_new_frames)
else:
self.processor.set_on_new_frames(on_new_frames)
# GUI callback always goes to the processor — it fires on_new_frames
# after writing the JPEG to disk, regardless of how it got the frame.
self.processor.set_on_new_frames(on_new_frames)
if not self.recorder:
# Rust transport: processor connects to scene.sock and runs its own ffmpeg.
self.processor.start_scene_detector(threshold=SCENE_THRESHOLD)
def capture_now(self, on_new_frames=None):