Record slice 1 in the design; consume a host that is no TeamSpeak one
- docs/session-seam.md: the status line, and section 13 with how the code differs from the design, a follow-up for the protocol repository (P12), and what ran against the baseline. - docs/architecture.md and the crate docs describe the engine on the Session. - A departed client's talk state is dropped before the new snapshot replaces the table it is looked up in. - The backend of a host that names none is its product and version. - A unit test drives the engine over the protocol repository's FakeSession through the registry: connect, presence, a move, chat in the channel, disconnect. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c473ab216e
commit
1b7abdf4c7
7 files changed
+244
-20
No files matched your search
+27
-5
@@ -72,7 +72,7 @@ fuzz/ cargo-fuzz targets
|
||||
| `voelin-store` | Identities (TeamSpeak, a Voelin key, the signed-in account, each with its account binding, as a `voelin-identity` `KeyStore`; see Identities), bookmarks, settings, chat history (dedupe, paging, sync cursors, where each chat was read), contacts, secrets (keyring / Android Keystore); versioned schema | done |
|
||||
| `voelin-audio` | Capture/playback, Opus, echo cancellation, resampling, jitter buffer, mixer, VAD/push-to-talk; the voice packet types (`TalkerId`, `VoicePacket`, `EncodedVoice`), so it depends on no voice transport | v0 (no AEC yet) |
|
||||
| `voelin-stream` | TS6 stream commands, JSON signalling, str0m peer connections, host/STUN candidates, streamer/viewer sessions, frame-source seam; its frame and simulcast layer types are `voelin-media`'s | sessions + transport |
|
||||
| `voelin-core` | Engine: runtime, per-server sessions, merge of voice/gateway/query sources, the `ServerLink` seam the voice source sits behind (`link.rs`; `TsLink` is the TeamSpeak implementation, for now in this crate), event bus, command API, chat history, the gateway's features, audio settings and volumes, streams on TS6, files, avatar and icon cache, pokes, offline messages, contacts; `media` module (capture → encoder → stream, stream → decoder); the stream types of its API are its own (`stream_types`, see Streams) | done |
|
||||
| `voelin-core` | Engine: runtime, per-server sessions, merge of voice/gateway/query sources, the `ServerLink` seam the voice source sits behind and the `voelin_proto::link::Session` the engine holds (`link/`: `SessionLink`, `Backends`; `ts_session.rs`: `TsLink` as a `Session`; both still in this crate), event bus, command API, chat history, the gateway's features, audio settings and volumes, streams on TS6, files, avatar and icon cache, pokes, offline messages, contacts; `media` module (capture → encoder → stream, stream → decoder); the stream types of its API are its own (`stream_types`, see Streams) | done |
|
||||
| `voelin-ui` | Slint UI and the desktop binary: streams panel, viewer, share dialog, audio / hotkey / codec settings | done (desktop) |
|
||||
| `voelin-media` | Screen and system-audio capture backends (PipeWire portal, X11, Windows Graphics Capture, Android MediaProjection), video codecs; the frame and simulcast layer types of a stream (`stream::EncodedFrame`, `LayerSpec`, `LayerId`, `LayerSet`) | done (desktop hardware encoders through FFmpeg loaded at runtime, not run on a GPU yet; MediaCodec not run on a device yet) |
|
||||
| `voelin-platform` | Global hotkeys, notifications, paths, crash reports, notices | done |
|
||||
@@ -129,10 +129,32 @@ frames, friends, the gateway directory, shutdown) and which reports our own
|
||||
stream's life back as `LinkEvent::OwnStream`. The stream task's requests
|
||||
and the server's stream notifications never leave the link.
|
||||
|
||||
`Engine::start_with_link(settings, history, link)` takes the link;
|
||||
`Engine::start` and `start_with` use `TsLink` (`ts_link.rs`), the
|
||||
TeamSpeak 3 and 6 connection of `tsclientlib`, which runs `voice.rs` with
|
||||
`book.rs`, `stream.rs`, `versions.rs` and `identity.rs`. `tests/link_fake.rs`
|
||||
**The engine holds a `voelin_proto::link::Session`.** The `ServerLink` the
|
||||
session spawns is the engine's own `link::SessionLink` (`link/session_link.rs`,
|
||||
with `project.rs` and `media.rs`). It opens a `Session` through
|
||||
`link::Backends`, the registry of connectors by address scheme, runs the
|
||||
connect sequence (the server, the HOME, SERVER and LIVE scopes, the seat in
|
||||
voice), keeps a `voelin_model::replica::Replica` of what the host pushes,
|
||||
projects it into the older model the UI still uses (`Presence`, `ClientInfo`
|
||||
and so on, with the fix-ups F1 to F10 of [session-seam.md](session-seam.md)),
|
||||
frames voice as RTP and derives who is talking from the media, and turns each
|
||||
`LinkCmd` into the `Session` call it stands for. `session.rs` is unchanged.
|
||||
`TsLink` stays a `ServerLink` of the older vocabulary and is a `Session` too:
|
||||
`ts_session.rs` wraps any `ServerLink` in a `LinkSession`, which writes the
|
||||
link's snapshots, messages, pokes and voice as v1 entities, pushes and RTP and
|
||||
answers requests with the link's help (`TsConnector` makes them for
|
||||
`ts3server://` and `teamspeak://` addresses and addresses without a scheme).
|
||||
TeamSpeak 6 streams are peer to peer, so their commands and events still pass
|
||||
the session through a local `StreamPort`. See [session-seam.md](session-seam.md)
|
||||
for the mapping row by row.
|
||||
|
||||
`Engine::start_with_backends(settings, history, backends)` takes the
|
||||
connectors; `Engine::start_with_link(settings, history, link)` takes a link
|
||||
and reaches it as a `Session` for every address; `Engine::start` and
|
||||
`start_with` use `Backends::default()`, whose TeamSpeak connector has `TsLink`
|
||||
(`ts_link.rs`), the TeamSpeak 3 and 6 connection of `tsclientlib`, inside: it
|
||||
runs `voice.rs` with `book.rs`, `stream.rs`, `versions.rs` and `identity.rs`.
|
||||
`tests/link_fake.rs`
|
||||
drives the session with an in-memory link instead: it plays scripted
|
||||
`LinkEvent`s (connect, presence, a message twice, a disconnect, a replaced
|
||||
connection) and checks the presence, chat, dedup and history the session
|
||||
|
||||
Reference in new issue
Block a user