voelin-stream: simulcast layer types and the layer seam between capture and streams
LayerSpec describes one encoding (size or scale, fps cap, bitrate range, minimum estimate, RID); LayerSet is a growable set of layers. Encoded frames carry their layer, FrameSource and MediaSink gain per-layer keyframe requests and bitrate targets, and StreamerOptions and StreamerConfig take the layer list. Behaviour is unchanged: one layer, 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
1 parent
b49ce78b15
commit
8b826da63d
9 files changed
+262
-10
No files matched your search
@@ -284,6 +284,8 @@ pub struct StreamerOptions {
|
||||
/// Accept every join request. Otherwise each one is reported as
|
||||
/// [`StreamerEvent::Request`] and answered with [`Streams::respond`].
|
||||
pub auto_accept: bool,
|
||||
/// The simulcast layers the source produces. Empty: one layer (0).
|
||||
pub layers: Vec<crate::LayerSpec>,
|
||||
}
|
||||
|
||||
struct ViewerSlot {
|
||||
@@ -1206,7 +1208,7 @@ mod tests {
|
||||
let config = PeerConfig::loopback();
|
||||
let mut s = Streams::new(OWN, config.clone());
|
||||
let setup = StreamSetup { name: "t".into(), ..Default::default() };
|
||||
s.start(StreamerOptions { setup, auto_accept: false }).unwrap();
|
||||
s.start(StreamerOptions { setup, auto_accept: false, ..Default::default() }).unwrap();
|
||||
assert_eq!(s.start(StreamerOptions::default()), Err(SessionError::AlreadyStreaming));
|
||||
let (requests, _) = drain(&mut s);
|
||||
assert_eq!(
|
||||
|
||||
Reference in new issue
Block a user