proper tests
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Stream lifecycle — manages recording, scene detection, audio extraction, and transcription buffering."""
|
||||
|
||||
import logging
|
||||
import time
|
||||
from threading import Thread
|
||||
|
||||
from gi.repository import GLib
|
||||
@@ -66,6 +67,7 @@ class StreamLifecycle:
|
||||
"""
|
||||
self._streaming = True
|
||||
self._gone_live = False
|
||||
self._start_monotonic = time.monotonic()
|
||||
self._rust_transport = rust_transport
|
||||
|
||||
if rust_transport:
|
||||
@@ -177,13 +179,16 @@ class StreamLifecycle:
|
||||
GLib.idle_add(self._go_live_once)
|
||||
if self._stream_mgr:
|
||||
self._stream_mgr.capture_now(on_new_frames=self._handle_new_scene_frames)
|
||||
if self._stream_mgr:
|
||||
self._stream_mgr.capture_now(on_new_frames=self._handle_new_scene_frames)
|
||||
|
||||
def _go_live_once(self):
|
||||
if self._stream_mgr:
|
||||
elapsed = time.monotonic() - self._start_monotonic
|
||||
log.info("Going LIVE (startup delay elapsed)")
|
||||
self._timeline.go_live()
|
||||
if self._stream_mgr.telemetry:
|
||||
self._stream_mgr.telemetry.metric("first_live", {
|
||||
"elapsed_s": round(elapsed, 2),
|
||||
})
|
||||
return False
|
||||
|
||||
def _tick_live(self):
|
||||
|
||||
Reference in New Issue
Block a user