Give the stream API core-owned types
Command and Event no longer carry voelin-stream's types. voelin-core owns StreamInfo, ViewerInfo, StreamSetup, StreamKind, ViewerState, EndReason and LeaveReason (stream_types.rs) with u16 client ids, a viewer's SRTP profile as its name and its codec as voelin_media::Codec; stream.rs converts at the boundary. Command::SetSrtpProfiles takes profile names, which the stream task parses. EncodedFrame, LayerSpec, LayerId and LayerSet move into voelin-media (stream::EncodedFrame, layer); voelin-stream depends on it and re-exports them, so the engine, the stream sessions and voelinctl share one type. The crate is now a plain dependency of voelin-core (feature media keeps the module and WHIP), and its str0m feature is gone with str0m always there. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b0f95a384f
commit
da372dfe10
28 files changed
+798
-342
No files matched your search
@@ -241,16 +241,13 @@ pub async fn run(args: GatewayArgs) -> Result<()> {
|
||||
}
|
||||
Event::StreamsChanged { session: SESSION, streams } => {
|
||||
for s in &streams {
|
||||
let nick = nicknames.get(&s.streamer.0).map_or("?", String::as_str);
|
||||
out.print(format!(
|
||||
"streams: {} by {nick} ({}) {:?}",
|
||||
s.id, s.streamer.0, s.name
|
||||
));
|
||||
let nick = nicknames.get(&s.streamer).map_or("?", String::as_str);
|
||||
out.print(format!("streams: {} by {nick} ({}) {:?}", s.id, s.streamer, s.name));
|
||||
}
|
||||
if let Some(wanted) = &args.watch_streamer
|
||||
&& !watching && let Some(s) = streams
|
||||
.iter()
|
||||
.find(|s| nicknames.get(&s.streamer.0).is_some_and(|n| n == wanted))
|
||||
.find(|s| nicknames.get(&s.streamer).is_some_and(|n| n == wanted))
|
||||
{
|
||||
watching = true;
|
||||
out.print(format!("watching {}", s.id));
|
||||
|
||||
Reference in new issue
Block a user