pub struct AttachmentPacketExtra { /* private fields */ }Expand description
Per-AttachmentPacket extras — fonts, cover art.
synthesized records where the payload came from, which is not a
detail: an attachment track’s single packet is either a real packet
the container stores (cover art, which libavformat parks in
AVStream.attached_pic) or one this crate builds out of the
track’s codec extradata (fonts, whose bytes never appear in the
packet stream at all). A consumer chasing a payload that looks
wrong needs to know which.
Implementations§
Source§impl AttachmentPacketExtra
impl AttachmentPacketExtra
Sourcepub const fn new(stream_index: i32) -> Self
pub const fn new(stream_index: i32) -> Self
Constructs an AttachmentPacketExtra with the given stream index.
synthesized defaults to false.
Sourcepub const fn stream_index(&self) -> i32
pub const fn stream_index(&self) -> i32
Returns the source AVStream.index.
Sourcepub const fn synthesized(&self) -> bool
pub const fn synthesized(&self) -> bool
true when the payload was built from the track’s codec
extradata rather than taken from a packet the container stores.
Sourcepub const fn with_stream_index(self, value: i32) -> Self
pub const fn with_stream_index(self, value: i32) -> Self
Sets the stream index (consuming builder).
Sourcepub const fn with_synthesized(self, value: bool) -> Self
pub const fn with_synthesized(self, value: bool) -> Self
Sets the synthesized flag (consuming builder).
Sourcepub const fn set_stream_index(&mut self, value: i32) -> &mut Self
pub const fn set_stream_index(&mut self, value: i32) -> &mut Self
Sets the stream index in place.
Sourcepub const fn set_synthesized(&mut self, value: bool) -> &mut Self
pub const fn set_synthesized(&mut self, value: bool) -> &mut Self
Sets the synthesized flag in place.
Trait Implementations§
Source§impl Clone for AttachmentPacketExtra
impl Clone for AttachmentPacketExtra
Source§fn clone(&self) -> AttachmentPacketExtra
fn clone(&self) -> AttachmentPacketExtra
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more