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

Creates a new Stream instance from codec parameters.

Returns extradata associated to the codec parameters of a stream.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.