pub struct ProbeResult {
pub format: String,
pub duration: Option<MediaTime>,
pub start: Option<MediaTime>,
pub streams: Vec<StreamInfo>,
pub selected_video: Option<usize>,
pub selected_audio: Option<usize>,
}Expand description
Container-level probe and deterministic stream selection.
Fields§
§format: StringDemuxer name.
duration: Option<MediaTime>Container duration: from the first presentation to the end of the
last, so the media ends at start + duration.
start: Option<MediaTime>When the container’s first presentation is, on the media’s own timeline: zero for most files, later for a transport stream or for streams that start after a delay.
streams: Vec<StreamInfo>Every audio/video stream in demuxer order. Other streams (subtitles,
data, attachments) are left out, so a stream’s position here is not
its index: look one up by StreamInfo::index.
selected_video: Option<usize>The AVStream index (StreamInfo::index) of the video stream a
reader shows: never an attached picture, and None when no video
stream decodes. Self::selected_video_stream finds its entry.
selected_audio: Option<usize>The AVStream index of the audio stream a reader plays, None when
no audio stream decodes. Self::selected_audio_stream finds its
entry.
Implementations§
Source§impl ProbeResult
impl ProbeResult
Sourcepub fn stream(&self, index: usize) -> Option<&StreamInfo>
pub fn stream(&self, index: usize) -> Option<&StreamInfo>
The entry of streams with AVStream index index.
Sourcepub fn selected_video_stream(&self) -> Option<&StreamInfo>
pub fn selected_video_stream(&self) -> Option<&StreamInfo>
The selected video stream’s entry.
Sourcepub fn selected_audio_stream(&self) -> Option<&StreamInfo>
pub fn selected_audio_stream(&self) -> Option<&StreamInfo>
The selected audio stream’s entry.
Trait Implementations§
Source§impl Clone for ProbeResult
impl Clone for ProbeResult
Source§impl Debug for ProbeResult
impl Debug for ProbeResult
Source§impl PartialEq for ProbeResult
impl PartialEq for ProbeResult
impl StructuralPartialEq for ProbeResult
Auto Trait Implementations§
impl Freeze for ProbeResult
impl RefUnwindSafe for ProbeResult
impl Send for ProbeResult
impl Sync for ProbeResult
impl Unpin for ProbeResult
impl UnsafeUnpin for ProbeResult
impl UnwindSafe for ProbeResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more