pub struct Stream {
pub id: isize,
pub index: usize,
pub params: CodecParams,
pub start: Option<u64>,
pub duration: Option<u64>,
pub timebase: Rational64,
pub user_private: Option<Arc<dyn Any + Send + Sync>>,
}
Expand description
Stream data.
Fields
id: isize
Format-specific track identifier.
If negative, either the stream is not supported by the underlying format or the default progression should be used.
Must be unique for each stream.
index: usize
Stream position within the source file.
params: CodecParams
Codec parameters of the stream.
start: Option<u64>
Start position of the stream.
If None
, start position of the stream is not considered.
duration: Option<u64>
Stream duration.
If None
, stream duration is not considered.
timebase: Rational64
Timebase numerator/denominator.
user_private: Option<Arc<dyn Any + Send + Sync>>
User private data.
This data cannot be cloned.
Implementations
sourceimpl Stream
impl Stream
sourcepub fn from_params(params: &CodecParams, timebase: Rational64) -> Self
pub fn from_params(params: &CodecParams, timebase: Rational64) -> Self
Creates a new Stream
instance from codec parameters.
sourcepub fn get_extradata(&self) -> Option<&[u8]>
pub fn get_extradata(&self) -> Option<&[u8]>
Returns extradata associated to the codec parameters of a stream.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl !UnwindSafe for Stream
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more