pub struct StreamCollection { /* private fields */ }Expand description
Container of per-kind, indexed-by-position streams.
Implementations§
Source§impl StreamCollection
impl StreamCollection
pub fn new() -> Self
Sourcepub fn stream_prepare(&mut self, kind: StreamKind) -> usize
pub fn stream_prepare(&mut self, kind: StreamKind) -> usize
Allocate a new stream of kind, return its StreamPos.
Matches File__Analyze::Stream_Prepare.
pub fn stream_count(&self, kind: StreamKind) -> usize
Sourcepub fn set_field(
&mut self,
kind: StreamKind,
pos: usize,
parameter: &str,
value: impl Into<Ztring>,
)
pub fn set_field( &mut self, kind: StreamKind, pos: usize, parameter: &str, value: impl Into<Ztring>, )
Set a field on a stream. If the field already exists, it is NOT overwritten (first-write-wins). Auto-creates the stream if it doesn’t exist yet.
Sourcepub fn force_field(
&mut self,
kind: StreamKind,
pos: usize,
parameter: &str,
value: impl Into<Ztring>,
)
pub fn force_field( &mut self, kind: StreamKind, pos: usize, parameter: &str, value: impl Into<Ztring>, )
Set a field on a stream, ALWAYS overwriting any existing value. Auto-creates the stream if it doesn’t exist yet.
Sourcepub fn set_extra_field(
&mut self,
kind: StreamKind,
pos: usize,
parameter: &str,
value: impl Into<Ztring>,
)
pub fn set_extra_field( &mut self, kind: StreamKind, pos: usize, parameter: &str, value: impl Into<Ztring>, )
Set a field in the stream’s <extra> bucket instead of the
standard field list. First-write-wins.
Sourcepub fn force_extra_field(
&mut self,
kind: StreamKind,
pos: usize,
parameter: &str,
value: impl Into<Ztring>,
)
pub fn force_extra_field( &mut self, kind: StreamKind, pos: usize, parameter: &str, value: impl Into<Ztring>, )
Like [set_extra_field], but ALWAYS overwrites.
pub fn retrieve( &self, kind: StreamKind, pos: usize, parameter: &str, ) -> Option<&Ztring>
pub fn stream(&self, kind: StreamKind, pos: usize) -> Option<&Stream>
Sourcepub fn filter_keep(
&mut self,
keep: &[StreamKind],
specific: &[(StreamKind, usize)],
)
pub fn filter_keep( &mut self, keep: &[StreamKind], specific: &[(StreamKind, usize)], )
Remove all streams whose StreamKind is not in keep, and
remove all streams at a kind whose positional index is not in
positions (when that map entry exists). Used to implement
--video-only, --audio-only, and --stream filtering.
pub fn iter(&self) -> impl Iterator<Item = (StreamKind, usize, &Stream)>
Trait Implementations§
Source§impl Clone for StreamCollection
impl Clone for StreamCollection
Source§fn clone(&self) -> StreamCollection
fn clone(&self) -> StreamCollection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more