pub struct Stream { /* private fields */ }
Expand description
Stream.
Implementations§
source§impl Stream
impl Stream
sourcepub fn set_time_base(&mut self, time_base: TimeBase)
pub fn set_time_base(&mut self, time_base: TimeBase)
Provide a hint to the muxer about the desired timebase.
sourcepub fn start_time(&self) -> Timestamp
pub fn start_time(&self) -> Timestamp
Get the pts of the first frame of the stream in presentation order.
sourcepub fn frames(&self) -> Option<u64>
pub fn frames(&self) -> Option<u64>
Get the number of frames in the stream.
Note
The number may not represent the total number of frames, depending on the type of the stream and the demuxer it may represent only the total number of keyframes.
sourcepub fn codec_parameters(&self) -> CodecParameters
pub fn codec_parameters(&self) -> CodecParameters
Get codec parameters.
sourcepub fn set_metadata<V>(&mut self, key: &str, value: V)where
V: ToString,
pub fn set_metadata<V>(&mut self, key: &str, value: V)where
V: ToString,
Set stream metadata.
sourcepub fn set_stream_id(&mut self, id: i32)
pub fn set_stream_id(&mut self, id: i32)
Set stream id.