Streams drives one connection's TS6 streams without doing connection IO: it takes stream notifications and app decisions, owns the str0m peers and queues requests (to send as commands) and events. - StreamerSession: setupstream, join requests (auto-accept or ask the app), one peer per viewer with the offer in respondjoinstreamrequest, answers and trickled candidates, withdrawal, reconnect (new offer as reconnectOffer), kick, stop (also before the stream went live), merged keyframe requests, frame fan-out to connected viewers - ViewerSession: joinstreamrequest, answer the offer from the response or an offer/reconnectOffer signal, candidates, denial, stop, removal, leave, reconnect after a lost connection (up to three times) - StreamDirectory: streams in the channel from notifications and client_is_streaming - FrameSource + SyntheticSource: decodable 1x1 VP8 keyframes (padded) and Opus silence in real time, for tests and tsctl - Peer: poll_event for driving many peers from one task; trickled local candidates carry the bundle mid Transcript unit tests and an end-to-end test through a fake relay server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
29 lines
1.2 KiB
Rust
29 lines
1.2 KiB
Rust
//! TeamSpeak 6 streams (screen sharing): the signalling commands the server
|
|
//! relays, the JSON signal messages, and str0m WebRTC peer connections.
|
|
//!
|
|
//! Only TeamSpeak 6 servers support streams. Media flows peer to peer; the
|
|
//! server only forwards `respondjoinstreamrequest` (the streamer's offer) and
|
|
//! `streamsignaling` (answer and ICE candidates).
|
|
//!
|
|
//! [`Streams`] (module [`session`]) ties it together for one connection: the
|
|
//! streams in our channel, our own stream with a peer per viewer, and the
|
|
//! streams we watch. [`FrameSource`] is where a streamer's encoded frames come from.
|
|
|
|
pub mod peer;
|
|
pub mod proto;
|
|
pub mod session;
|
|
pub mod signal;
|
|
pub mod source;
|
|
pub mod stun;
|
|
|
|
pub use peer::{MediaFrame, Peer, PeerConfig, PeerError, PeerEvent, VideoCodec};
|
|
pub use proto::{LeaveReason, StreamInfo, StreamKind, StreamNotification, StreamSetup};
|
|
pub use session::{
|
|
EndReason, Output, Request, SessionError, StreamDirectory, StreamEvent, StreamerEvent,
|
|
StreamerOptions, Streams, ViewerInfo, ViewerState, WatchEvent, WatchState,
|
|
};
|
|
pub use signal::{Signal, SignalError};
|
|
pub use source::{EncodedFrame, FrameSource, SyntheticSource};
|
|
pub use str0m::format::Codec;
|
|
pub use str0m::media::{Frequency, MediaKind, MediaTime};
|