Expand description
SectionStream — async futures_core::Stream of owned SI section events.
Wraps dvb_si::demux::SiDemux over any tokio::io::AsyncRead source,
yielding one dvb_si::demux::SectionEvent per changed complete section.
Events are already owned (bytes::Bytes internally) and therefore 'static,
Clone, and Send + Sync — no yoke wrapping is required.
§Usage
use futures_core::Stream;
use std::pin::Pin;
// Stream from a file:
// let f = tokio::fs::File::open("stream.ts").await?;
// let mut s = dvb_stream::SectionStream::new(f);
// while let Some(event) = futures_util::StreamExt::next(&mut s).await { ... }§Cancellation
Dropping the SectionStream cancels cleanly — no internal tasks are
spawned. Any pending I/O is abandoned; partially reassembled sections are
discarded.
Structs§
- Section
Stream - Async
StreamofSectionEvents from a raw TS byte source. - UdpReader
- A thin
AsyncReadadapter over atokio::net::UdpSocket.