pub trait SampleIndex {
// Required methods
fn sample_count(&self, stream: usize) -> u64;
fn sample_info(&self, stream: usize, index: u64) -> Option<SampleInfo>;
fn read_sample(&mut self, stream: usize, index: u64) -> Result<Packet>;
fn sync_at_or_before(&self, stream: usize, pts: i64) -> Option<u64>;
// Provided methods
fn edit_list(&self, _stream: usize) -> &[EditEntry] { ... }
fn movie_timescale(&self) -> Option<u32> { ... }
}Expand description
Random access over a demuxer’s index; see Demuxer::sample_index.
Required Methods§
Sourcefn sample_count(&self, stream: usize) -> u64
fn sample_count(&self, stream: usize) -> u64
Samples in stream stream (0 for an unknown stream).
Sourcefn sample_info(&self, stream: usize, index: u64) -> Option<SampleInfo>
fn sample_info(&self, stream: usize, index: u64) -> Option<SampleInfo>
The index entry of sample index of stream, in decode order.
Sourcefn read_sample(&mut self, stream: usize, index: u64) -> Result<Packet>
fn read_sample(&mut self, stream: usize, index: u64) -> Result<Packet>
Read sample index of stream as a packet, in the same form as
Demuxer::read_packet would give it (see
Demuxer::set_raw_samples).
Provided Methods§
Sourcefn edit_list(&self, _stream: usize) -> &[EditEntry]
fn edit_list(&self, _stream: usize) -> &[EditEntry]
The stream’s edit list (empty when it has none, or the container has no such thing).
Sourcefn movie_timescale(&self) -> Option<u32>
fn movie_timescale(&self) -> Option<u32>
The movie time scale EditEntry::segment_duration counts in (MP4
mvhd), when the container has one.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".