pub struct T2miEventStream<R> { /* private fields */ }Expand description
Async Stream of T2miEvents from a raw TS byte source.
Feed any tokio::io::AsyncRead byte source and receive one T2miEvent
per complete, CRC-valid T2-MI packet.
The adapter performs 188-byte TS packet alignment using the same resync
logic as SectionStream (see crate::resync).
§Cancellation
Drop the stream. No internal tasks are spawned.
Implementations§
Source§impl<R: AsyncRead + Unpin> T2miEventStream<R>
impl<R: AsyncRead + Unpin> T2miEventStream<R>
Source§impl T2miEventStream<UdpReader>
UDP/multicast convenience constructor — enabled by the udp feature.
impl T2miEventStream<UdpReader>
UDP/multicast convenience constructor — enabled by the udp feature.
Sourcepub async fn bind_multicast(
bind_addr: SocketAddrV4,
multicast_addr: Ipv4Addr,
pid: u16,
) -> Result<Self>
pub async fn bind_multicast( bind_addr: SocketAddrV4, multicast_addr: Ipv4Addr, pid: u16, ) -> Result<Self>
Bind a UDP socket to bind_addr and join multicast_addr.
pid is the 13-bit T2-MI PID from the PMT.
§Errors
Returns a std::io::Error if binding or joining the multicast group
fails.
Trait Implementations§
Source§impl<R: AsyncRead + Unpin> Stream for T2miEventStream<R>
impl<R: AsyncRead + Unpin> Stream for T2miEventStream<R>
Auto Trait Implementations§
impl<R> Freeze for T2miEventStream<R>where
R: Freeze,
impl<R> RefUnwindSafe for T2miEventStream<R>where
R: RefUnwindSafe,
impl<R> Send for T2miEventStream<R>where
R: Send,
impl<R> Sync for T2miEventStream<R>where
R: Sync,
impl<R> Unpin for T2miEventStream<R>where
R: Unpin,
impl<R> UnsafeUnpin for T2miEventStream<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for T2miEventStream<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more