pub struct Streams<'a> { /* private fields */ }
Expand description
A collection of streams. Streams implements IntoIterator
to iterate over the streams.
Implementations§
Source§impl<'a> Streams<'a>
impl<'a> Streams<'a>
Sourcepub const unsafe fn new(input: *mut AVFormatContext) -> Self
pub const unsafe fn new(input: *mut AVFormatContext) -> Self
Creates a new Streams
instance.
§Safety
This function is unsafe because the caller must ensure that the lifetime & the mutablity
of the AVFormatContext
matches the lifetime & mutability of the Streams
.
Sourcepub fn best_index(&self, media_type: AVMediaType) -> Option<usize>
pub fn best_index(&self, media_type: AVMediaType) -> Option<usize>
Returns the index of the best stream of the given media type.
Sourcepub fn best(&'a self, media_type: AVMediaType) -> Option<Const<'a, Stream<'a>>>
pub fn best(&'a self, media_type: AVMediaType) -> Option<Const<'a, Stream<'a>>>
Returns the best stream of the given media type.
Sourcepub fn best_mut(&'a mut self, media_type: AVMediaType) -> Option<Stream<'a>>
pub fn best_mut(&'a mut self, media_type: AVMediaType) -> Option<Stream<'a>>
Returns the best mutable stream of the given media type.
Sourcepub const fn iter(&'a self) -> StreamIter<'a> ⓘ
pub const fn iter(&'a self) -> StreamIter<'a> ⓘ
Returns an iterator over the streams.
Sourcepub const fn get(&'a mut self, index: usize) -> Option<Stream<'a>>
pub const fn get(&'a mut self, index: usize) -> Option<Stream<'a>>
Returns the stream at the given index.
Sourcepub const unsafe fn get_unchecked(&self, index: usize) -> Option<Stream<'a>>
pub const unsafe fn get_unchecked(&self, index: usize) -> Option<Stream<'a>>
Returns the stream at the given index.
§Safety
This function is unsafe because it does not require mutability. The caller must guarantee that the stream is not mutated and that multiple streams of the same index exist.
Trait Implementations§
Source§impl<'a> IntoIterator for Streams<'a>
impl<'a> IntoIterator for Streams<'a>
impl Send for Streams<'_>
Safety: Streams
is safe to send between threads.