A stream task per voice connection runs tsc-stream's Streams: the voice
task forwards stream notifications and command failures to it and sends
its requests on the connection. It starts only when the server flavor has
the streams capability; stream commands elsewhere give an Error event.
Commands: StartStream{setup, auto_accept}, StopStream, AcceptViewer,
KickViewer, SendStreamFrame, WatchStream, LeaveStream,
RequestStreamKeyframe.
Events: StreamsChanged, StreamState (Starting / Live{id, sink} /
Ended), StreamViewerRequest, StreamViewers, StreamKeyframeRequest,
WatchState (Requested / Connecting / Connected / Ended).
Encoded frames of our stream go in through the StreamSink handed out
with StreamState::Live (or SendStreamFrame); received frames of watched
streams come on their own bus, Engine::subscribe_frames, to keep the
event bus light. VoiceOptions::stream_peer sets the peer network config.
Tests: two stream tasks through a fake relay server (unit), and a
TSC_LIVE test with two engine sessions streaming synthetic frames on the
TS6 dev server plus the error on TS3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
38 lines
1.1 KiB
TOML
38 lines
1.1 KiB
TOML
[package]
|
|
name = "tsc-core"
|
|
version = "0.1.0"
|
|
description = "Client engine: server sessions merging voice, gateway and query sources; the API the UI drives."
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
|
|
[features]
|
|
default = ["audio-device"]
|
|
# Capture and play audio through the system's devices.
|
|
audio-device = ["tsc-audio/device"]
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
futures = "0.3"
|
|
serde_json = "1"
|
|
thiserror = "2"
|
|
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time"] }
|
|
tokio-tungstenite = "0.30"
|
|
tracing = "0.1"
|
|
tsc-audio = { path = "../tsc-audio", default-features = false }
|
|
tsc-gateway-proto = { path = "../tsc-gateway-proto" }
|
|
tsc-model = { path = "../tsc-model" }
|
|
tsc-observer = { path = "../tsc-observer" }
|
|
tsc-query = { path = "../tsc-query" }
|
|
tsc-stream = { path = "../tsc-stream" }
|
|
tsclientlib = { path = "../proto/tsclientlib" }
|
|
tsproto-packets = { path = "../proto/tsproto-packets" }
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "1", features = ["macros", "rt-multi-thread", "test-util"] }
|
|
|
|
[lints]
|
|
workspace = true
|