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.
Sourcepub fn side_data(&self) -> SideDataIter<'_> ⓘ
pub fn side_data(&self) -> SideDataIter<'_> ⓘ
Get stream side data.
Sourcepub fn add_side_data(
&mut self,
data_type: SideDataType,
data: &[u8],
) -> Result<(), Error>
pub fn add_side_data( &mut self, data_type: SideDataType, data: &[u8], ) -> Result<(), Error>
Add stream side data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stream
impl RefUnwindSafe 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