Offers list the stream codec first, then the codecs of hardware encoders, VP8 through libvpx and HEVC last; software encoders other than VP8 are only ever the stream codec, so no answer starts an expensive one. The streamer's peer reports the codec each answer chose, the session sends video only to viewers of its codec and tells the encoders through LayerFeedback which codecs are needed. Each layer's encoder thread keeps one encoder per such codec, made when a viewer needs it and dropped when none does; the stream codec is skipped while nobody takes it. The H.264 profile-level-id is computed from macroblocks per second, frame size and bitrate (Table A-1), at least 3.1 as before. Streamer takes an encoder preference (hardware on/off, auto / software / a named backend) that reconfigure can change live. HEVC is negotiable (str0m packetizes it) and only offered when a hardware encoder has it. Work in progress: committed early so it cannot be lost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
39 lines
1.5 KiB
Rust
39 lines
1.5 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 discovery;
|
|
pub mod dtls;
|
|
pub mod feedback;
|
|
pub mod h264;
|
|
pub mod layer;
|
|
pub mod peer;
|
|
pub mod proto;
|
|
pub mod session;
|
|
pub mod signal;
|
|
pub mod source;
|
|
pub mod stun;
|
|
|
|
pub use discovery::{ClientState, StreamLookup};
|
|
pub use dtls::SrtpProfile;
|
|
pub use feedback::LayerFeedback;
|
|
pub use h264::H264Profile;
|
|
pub use layer::{LayerId, LayerSet, LayerSpec};
|
|
pub use peer::{MediaFrame, OfferOptions, 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, Rid};
|