reactor-runtime 3.2.6__tar.gz → 3.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/PKG-INFO +1 -1
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/pyproject.toml +1 -1
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/pyproject.toml.orig +1 -1
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/recording/recorder.py +20 -2
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/LICENSE +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/NOTICE +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/README.md +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/codes.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/fields.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/model.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/naming.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/service.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/session.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/transport.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/typespec.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/core/values.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/event_stream.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/http/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/http/events.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/http/routes.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/http/server.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/http/spec.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/client.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/events/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/events/decorators.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/events/errors.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/events/messages.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/internal/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/internal/bridge.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/internal/input_buffer.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/internal/reactor_core.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/model/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/model/contract.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/model/reactor_model.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/model/schema.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/pipeline/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/pipeline/idle.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/pipeline/input_state.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/pipeline/reactor_pipeline.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/tracks/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/tracks/descriptors.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/tracks/input.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/tracks/output.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/log.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/manifest.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/message_gateway.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/metrics.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/paths.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/protocol/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/protocol/base.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/protocol/common.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/protocol/v0/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/protocol/v0/codec.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/protocol/v1/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/protocol/v1/codec.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/py.typed +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/recording/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/recording/chunk_encoder.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/recording/markers.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/runner/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/runner/connection_manager.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/runner/offer_epochs.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/runner/runner.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/runner/state_machine.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/schema.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/serve.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/service.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/acceptor.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/router.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/__init__.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/acceptor.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/config.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/connection.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/frames.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/pacer.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/peer.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/router.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/sdp.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/signaling.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/stats.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/version.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/upload_store.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/common_pb2.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/common_pb2.pyi +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/control_pb2.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/control_pb2.pyi +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/data_pb2.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/data_pb2.pyi +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/model_pb2.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/model_pb2.pyi +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/platform_pb2.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/platform_pb2.pyi +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/track_pb2.py +0 -0
- {reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_wire/v1/track_pb2.pyi +0 -0
|
@@ -59,6 +59,14 @@ _FEED_WAIT_SECONDS = 1.0
|
|
|
59
59
|
# frames on every emission, so the count is carried on every recording's summary
|
|
60
60
|
# and only the periodic warning is rate-limited.
|
|
61
61
|
_DROP_LOG_INTERVAL_SECONDS = 5.0
|
|
62
|
+
# How much audio may sit in the jitter buffer on top of the emission just handed
|
|
63
|
+
# over, in grid slots. A model's audio is framed on its own boundaries rather
|
|
64
|
+
# than the video's, so an emission carries a little more or less than its slots
|
|
65
|
+
# drain; two slots absorb that wobble without the buffer running dry on the
|
|
66
|
+
# short ones. Past that the audio belongs to frames the encoder was too far
|
|
67
|
+
# behind to take — their video is not in the recording, so pairing it with later
|
|
68
|
+
# video would hold the rest of the session that far out of sync.
|
|
69
|
+
_AUDIO_BACKLOG_FRAMES = 2
|
|
62
70
|
|
|
63
71
|
_INIT_FILENAME = "init.mp4"
|
|
64
72
|
# Written into a recording's directory once it is finished, so its final segment
|
|
@@ -669,11 +677,20 @@ class Recorder:
|
|
|
669
677
|
return
|
|
670
678
|
|
|
671
679
|
def _buffer_audio(self, bundle: MediaBundle) -> None:
|
|
672
|
-
"""Append a chunk's audio to the jitter buffer,
|
|
680
|
+
"""Append a chunk's audio to the jitter buffer, keeping the newest samples.
|
|
673
681
|
|
|
674
682
|
The whole chunk's audio is buffered once; :meth:`_take_audio` then pulls a
|
|
675
683
|
grid slot's worth per recorded frame, so the audio DTS tracks the video
|
|
676
684
|
PTS regardless of how the chunk's frames map onto the grid.
|
|
685
|
+
|
|
686
|
+
The bound is one authoritative limit, never applied below the emission
|
|
687
|
+
just appended, so however much audio a model hands over at once, all of
|
|
688
|
+
it is kept and the grid slots that drain it find real samples rather than
|
|
689
|
+
silence. Above the emission sits :data:`_AUDIO_BACKLOG_FRAMES` of slack
|
|
690
|
+
and no more, which keeps each emission's video paired with its own audio:
|
|
691
|
+
trimming takes the oldest samples, so audio orphaned by frames the
|
|
692
|
+
encoder never took is discarded with them instead of displacing the
|
|
693
|
+
audio that belongs to the video still to be fed.
|
|
677
694
|
"""
|
|
678
695
|
if self._audio_track is None:
|
|
679
696
|
return
|
|
@@ -683,7 +700,8 @@ class Recorder:
|
|
|
683
700
|
flat = np.ascontiguousarray(track.data, dtype=np.int16).reshape(-1)
|
|
684
701
|
self._audio_jitter_buf.append(flat)
|
|
685
702
|
self._audio_buffered_samples += int(flat.size)
|
|
686
|
-
|
|
703
|
+
slack = _AUDIO_BACKLOG_FRAMES * round(self._audio_sample_rate / RECORDING_FPS)
|
|
704
|
+
cap = int(flat.size) + slack
|
|
687
705
|
while self._audio_buffered_samples > cap:
|
|
688
706
|
head = self._audio_jitter_buf[0]
|
|
689
707
|
drop = self._audio_buffered_samples - cap
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/events/__init__.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/events/decorators.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/events/errors.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/events/messages.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/internal/__init__.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/internal/bridge.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/model/__init__.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/model/contract.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/model/reactor_model.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/model/schema.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/pipeline/__init__.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/pipeline/idle.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/tracks/__init__.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/tracks/descriptors.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/tracks/input.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/interface/tracks/output.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/recording/chunk_encoder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/runner/connection_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/__init__.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/acceptor.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/config.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/connection.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/frames.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/pacer.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/peer.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/router.py
RENAMED
|
File without changes
|
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/signaling.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/stats.py
RENAMED
|
File without changes
|
{reactor_runtime-3.2.6 → reactor_runtime-3.2.7}/src/reactor_runtime/transport/webrtc/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|