pub struct SubtitlePacketExtra { /* private fields */ }Expand description
Per-SubtitlePacket extras.
Implementations§
Source§impl SubtitlePacketExtra
impl SubtitlePacketExtra
Sourcepub const fn new(stream_index: i32) -> Self
pub const fn new(stream_index: i32) -> Self
Constructs a SubtitlePacketExtra with the given stream index.
side_data defaults to empty.
Sourcepub const fn stream_index(&self) -> i32
pub const fn stream_index(&self) -> i32
Returns the source AVStream.index.
Sourcepub const fn language(&self) -> Option<[u8; 3]>
pub const fn language(&self) -> Option<[u8; 3]>
Returns the ISO 639-2/T language tag, or None if unspecified.
Sourcepub fn side_data(&self) -> &[SideDataEntry]
pub fn side_data(&self) -> &[SideDataEntry]
Returns the raw side-data entries from AVPacket.side_data.
A subtitle packet’s side data is rare but not absent — and a packet that carries nothing else is exactly the case this seat exists for: with no seat, a side-data-only packet has nowhere to put its only content.
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_language(self, value: Option<[u8; 3]>) -> Self
pub const fn with_language(self, value: Option<[u8; 3]>) -> Self
Sets the language tag (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 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.
Sourcepub const fn with_forced(self, value: bool) -> Self
pub const fn with_forced(self, value: bool) -> Self
Sets the forced 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_language(&mut self, value: Option<[u8; 3]>) -> &mut Self
pub const fn set_language(&mut self, value: Option<[u8; 3]>) -> &mut Self
Sets the language tag in place.
Sourcepub const fn set_forced(&mut self, value: bool) -> &mut Self
pub const fn set_forced(&mut self, value: bool) -> &mut Self
Sets the forced flag in place.
Trait Implementations§
Source§impl Clone for SubtitlePacketExtra
impl Clone for SubtitlePacketExtra
Source§fn clone(&self) -> SubtitlePacketExtra
fn clone(&self) -> SubtitlePacketExtra
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more