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
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.
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more