pub struct Wire(/* private fields */);Expand description
Runtime-dispatched wire format for a track described by a hang catalog.
Built from a track’s audio or video configuration, including its container, or from a media
role with legacy, loc, raw, cts,
or cmaf. Audio built from an AudioConfig whose
codec states each packet’s duration reads it; one built from a role alone reads none.
Implementations§
Source§impl Wire
impl Wire
Sourcepub fn legacy(kind: Kind) -> Self
pub fn legacy(kind: Kind) -> Self
The original hang wire format, a varint timestamp before each payload, for kind.
Sourcepub fn loc(kind: Kind) -> Self
pub fn loc(kind: Kind) -> Self
The Low Overhead Container, one LOC frame per moq frame, for kind.
Sourcepub fn raw(kind: Kind) -> Self
pub fn raw(kind: Kind) -> Self
The raw codec payload timed by the transport timestamp, for kind.
Trait Implementations§
Source§impl Container for Wire
impl Container for Wire
Source§type Error = Error
type Error = Error
Container-specific error. Must be convertible from [
moq_net::Error]
(so IO errors propagate), MissingKeyframe, InvalidEnd, and
TimestampRewind (so the producer can reject invalid group boundaries).Source§fn end(&self, frame: &Frame) -> Option<Timestamp>
fn end(&self, frame: &Frame) -> Option<Timestamp>
Return the endpoint timestamp when
frame carries empty-payload metadata. Read moreSource§fn writable(&self) -> Result<(), Self::Error>
fn writable(&self) -> Result<(), Self::Error>
Refuse a format this build can read but not write, before a producer is built for it. Read more
Source§fn decode_order(&self) -> bool
fn decode_order(&self) -> bool
Source§fn check(&self, frame: &Frame) -> Result<(), Self::Error>
fn check(&self, frame: &Frame) -> Result<(), Self::Error>
Refuse a frame this format has no encoding for, by default any frame of an unwritable format. Read more
Source§fn finish_group(
&self,
group: &mut Writer<'_>,
end: Option<Timestamp>,
) -> Result<(), Self::Error>
fn finish_group( &self, group: &mut Writer<'_>, end: Option<Timestamp>, ) -> Result<(), Self::Error>
Write any format-specific endpoint before the producer closes the group.
Source§impl TryFrom<&AudioConfig> for Wire
impl TryFrom<&AudioConfig> for Wire
Source§impl TryFrom<&VideoConfig> for Wire
impl TryFrom<&VideoConfig> for Wire
Auto Trait Implementations§
impl Freeze for Wire
impl RefUnwindSafe for Wire
impl Send for Wire
impl Sync for Wire
impl Unpin for Wire
impl UnsafeUnpin for Wire
impl UnwindSafe for Wire
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