pub struct SubtitleStreamInfo { /* private fields */ }Expand description
Information about a subtitle stream within a media file.
This struct contains all metadata needed to identify and categorize a subtitle stream, including codec, language, and forced flag.
§Construction
Use SubtitleStreamInfo::builder() for fluent construction:
use ff_format::stream::SubtitleStreamInfo;
use ff_format::codec::SubtitleCodec;
let info = SubtitleStreamInfo::builder()
.index(2)
.codec(SubtitleCodec::Srt)
.codec_name("srt")
.language("eng")
.build();Implementations§
Source§impl SubtitleStreamInfo
impl SubtitleStreamInfo
Sourcepub fn builder() -> SubtitleStreamInfoBuilder
pub fn builder() -> SubtitleStreamInfoBuilder
Creates a new builder for constructing SubtitleStreamInfo.
Sourcepub fn codec(&self) -> &SubtitleCodec
pub fn codec(&self) -> &SubtitleCodec
Returns the subtitle codec.
Sourcepub fn codec_name(&self) -> &str
pub fn codec_name(&self) -> &str
Returns the codec name as reported by the demuxer.
Sourcepub fn is_text_based(&self) -> bool
pub fn is_text_based(&self) -> bool
Returns true if the codec is text-based.
Trait Implementations§
Source§impl Clone for SubtitleStreamInfo
impl Clone for SubtitleStreamInfo
Source§fn clone(&self) -> SubtitleStreamInfo
fn clone(&self) -> SubtitleStreamInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubtitleStreamInfo
impl RefUnwindSafe for SubtitleStreamInfo
impl Send for SubtitleStreamInfo
impl Sync for SubtitleStreamInfo
impl Unpin for SubtitleStreamInfo
impl UnsafeUnpin for SubtitleStreamInfo
impl UnwindSafe for SubtitleStreamInfo
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