pub struct DataPacketExtra { /* private fields */ }Expand description
Per-DataPacket extras — timecode, KLV, timed ID3.
The same three seats as VideoPacketExtra. The side-data list was
left off at first — data demuxers carry their whole payload in the
packet body — and then earned its place: a packet with no body and
only side data is a real packet, and without this seat its only
content would have nowhere to go.
Implementations§
Source§impl DataPacketExtra
impl DataPacketExtra
Sourcepub const fn new(stream_index: i32) -> Self
pub const fn new(stream_index: i32) -> Self
Constructs a DataPacketExtra with the given stream index.
byte_pos defaults to None and side_data to empty.
Sourcepub const fn stream_index(&self) -> i32
pub const fn stream_index(&self) -> i32
Returns the source AVStream.index.
Sourcepub const fn byte_pos(&self) -> Option<i64>
pub const fn byte_pos(&self) -> Option<i64>
Returns the byte position of the packet in the input file, or
None if unknown.
Sourcepub fn side_data(&self) -> &[SideDataEntry]
pub fn side_data(&self) -> &[SideDataEntry]
Returns the raw side-data entries from AVPacket.side_data.
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_byte_pos(self, value: Option<i64>) -> Self
pub const fn with_byte_pos(self, value: Option<i64>) -> Self
Sets the byte position (consuming builder).
Sourcepub fn with_side_data(self, value: Vec<SideDataEntry>) -> Self
pub fn with_side_data(self, value: Vec<SideDataEntry>) -> Self
Sets the side-data list (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_byte_pos(&mut self, value: Option<i64>) -> &mut Self
pub const fn set_byte_pos(&mut self, value: Option<i64>) -> &mut Self
Sets the byte position in place.
Sourcepub fn set_side_data(&mut self, value: Vec<SideDataEntry>) -> &mut Self
pub fn set_side_data(&mut self, value: Vec<SideDataEntry>) -> &mut Self
Sets the side-data list in place.
Trait Implementations§
Source§impl Clone for DataPacketExtra
impl Clone for DataPacketExtra
Source§fn clone(&self) -> DataPacketExtra
fn clone(&self) -> DataPacketExtra
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more