pub struct Stream<'a>(/* private fields */);
Expand description
A Stream is a wrapper around an AVStream
.
Implementations§
Source§impl<'a> Stream<'a>
impl<'a> Stream<'a>
Sourcepub const fn codec_parameters(&self) -> Option<&'a AVCodecParameters>
pub const fn codec_parameters(&self) -> Option<&'a AVCodecParameters>
Returns the codec parameters of the stream.
Sourcepub fn set_time_base(&mut self, time_base: impl Into<Rational>)
pub fn set_time_base(&mut self, time_base: impl Into<Rational>)
Sets the time base of the stream.
Sourcepub const fn start_time(&self) -> Option<i64>
pub const fn start_time(&self) -> Option<i64>
Returns the start time of the stream.
Sourcepub const fn set_start_time(&mut self, start_time: Option<i64>)
pub const fn set_start_time(&mut self, start_time: Option<i64>)
Sets the start time of the stream.
Sourcepub const fn set_duration(&mut self, duration: Option<i64>)
pub const fn set_duration(&mut self, duration: Option<i64>)
Sets the duration of the stream.
Sourcepub const fn set_nb_frames(&mut self, nb_frames: i64)
pub const fn set_nb_frames(&mut self, nb_frames: i64)
Sets the number of frames in the stream.
Sourcepub const fn disposition(&self) -> i32
pub const fn disposition(&self) -> i32
Returns the disposition of the stream.
Sourcepub const fn set_disposition(&mut self, disposition: i32)
pub const fn set_disposition(&mut self, disposition: i32)
Sets the disposition of the stream.
Sourcepub fn set_discard(&mut self, discard: AVDiscard)
pub fn set_discard(&mut self, discard: AVDiscard)
Sets the discard flag of the stream.
Sourcepub fn sample_aspect_ratio(&self) -> Rational
pub fn sample_aspect_ratio(&self) -> Rational
Returns the sample aspect ratio of the stream.
Sourcepub fn set_sample_aspect_ratio(
&mut self,
sample_aspect_ratio: impl Into<Rational>,
)
pub fn set_sample_aspect_ratio( &mut self, sample_aspect_ratio: impl Into<Rational>, )
Sets the sample aspect ratio of the stream.
Sourcepub const fn metadata(&self) -> Const<'_, Dictionary>
pub const fn metadata(&self) -> Const<'_, Dictionary>
Returns the metadata of the stream.
Sourcepub const fn metadata_mut(&mut self) -> Mut<'_, Dictionary>
pub const fn metadata_mut(&mut self) -> Mut<'_, Dictionary>
Returns a mutable reference to the metadata of the stream.
Sourcepub fn avg_frame_rate(&self) -> Rational
pub fn avg_frame_rate(&self) -> Rational
Returns the average frame rate of the stream.
Sourcepub fn r_frame_rate(&self) -> Rational
pub fn r_frame_rate(&self) -> Rational
Returns the real frame rate of the stream.
Sourcepub const unsafe fn format_context(&self) -> *mut AVFormatContext
pub const unsafe fn format_context(&self) -> *mut AVFormatContext
Returns the format context of the stream.
§Safety
This function is unsafe because it returns a mutable pointer to the format context. The caller must ensure that they have exclusive access to the format context.