39 lines
2.4 KiB
Markdown
39 lines
2.4 KiB
Markdown
# complete-encoded-frame-transport Specification
|
|
|
|
## Purpose
|
|
Define complete encoded-frame transport and the bounded native media queues required to preserve frame bytes and boundaries through the gateway.
|
|
## Requirements
|
|
### Requirement: Production transport preserves complete encoded frames
|
|
The gateway SHALL carry each recovered Apollo encoded frame as one Protocol datagram-v2 sequence, preserve exact bytes and frame boundaries through the production media queue, pacer, QUIC transport, and independent reassembler, and reject frames outside Protocol bounds before forwarding.
|
|
|
|
#### Scenario: Large source-shaped frame
|
|
- **WHEN** Apollo UDP/FEC recovers a valid encoded frame above 18,864 bytes within the reviewed maximum
|
|
- **THEN** the independent client receives one byte-identical frame with the same boundary
|
|
|
|
#### Scenario: Invalid fragment stream
|
|
- **WHEN** fragments are oversized, inconsistent, conflicting duplicates, outside the reorder/state/time bounds, or claim an oversized frame
|
|
- **THEN** the client emits no partial payload and bounded state is released
|
|
|
|
### Requirement: Native video queue has count byte and latency bounds
|
|
The native provider video queue SHALL retain at most 16 complete frames, at
|
|
most 4 MiB of encoded frame bytes, and no frame for more than 250 milliseconds.
|
|
It SHALL replace the oldest entry when full, expire stale entries independently
|
|
of queue activity, and increment truthful drop telemetry for every replacement
|
|
or expiry. Cleanup and cancellation MUST stop expiry work and release all queued
|
|
payload references.
|
|
|
|
#### Scenario: Sustained realistic frames
|
|
- **WHEN** a provider produces realistic variable-size complete frames faster than a slow Verse reader can forward them
|
|
- **THEN** retained entries, bytes, and age remain within the reviewed per-session limits and newer frames continue to progress
|
|
|
|
#### Scenario: Session cleanup
|
|
- **WHEN** a session terminates, disconnects, or is cancelled with queued video
|
|
- **THEN** queued frames are released, blocked readers wake, and no media crosses after quiescence
|
|
|
|
### Requirement: Other provider queues remain independently bounded
|
|
Audio and provider event queues SHALL retain independent count and payload bounds and MUST NOT share the video byte budget.
|
|
|
|
#### Scenario: Video saturation
|
|
- **WHEN** the video queue reaches its byte or age bound
|
|
- **THEN** audio and terminal event delivery retain their existing independent bounded capacity
|