pub struct Track { /* private fields */ }Expand description
A subscribed moq-mux track, normalized to the bitstream shape str0m’s Frame API expects.
One Track per m= line on the egress side. The egress source spawns
a pump task per track that polls Track::next and forwards frames to
the session loop.
Implementations§
Source§impl Track
impl Track
Sourcepub async fn opus(broadcast: &BroadcastConsumer, name: &str) -> Result<Self>
pub async fn opus(broadcast: &BroadcastConsumer, name: &str) -> Result<Self>
Audio track for an Opus rendition.
Sourcepub async fn video(
broadcast: &BroadcastConsumer,
name: &str,
config: &VideoConfig,
) -> Result<Self>
pub async fn video( broadcast: &BroadcastConsumer, name: &str, config: &VideoConfig, ) -> Result<Self>
Video track. Codec inferred from config.codec; for H.264 / H.265 the
bitstream shape (inline vs out-of-band parameter sets) is inferred from
config.description (avc1/hvc1 vs avc3/hev1).
pub fn codec(&self) -> Codec
Sourcepub async fn next(&mut self) -> Result<Option<PacketizedFrame>>
pub async fn next(&mut self) -> Result<Option<PacketizedFrame>>
Pull the next RTP-ready frame. Returns None when the track ends.
Auto Trait Implementations§
impl !Freeze for Track
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnsafeUnpin for Track
impl UnwindSafe for Track
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