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.