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: isizeFormat-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: usizeStream position within the source file.
params: CodecParamsCodec 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: Rational64Timebase numerator/denominator.
user_private: Option<Arc<dyn Any + Send + Sync>>User private data.
This data cannot be cloned.
Implementations§
Source§impl 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 Freeze for Stream
impl !RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl !UnwindSafe for Stream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more