pub struct VideoFrameExtra { /* private fields */ }Expand description
Per-VideoFrame extras carrying everything the unified
mediadecode::ColorInfo doesn’t already cover.
Implementations§
Source§impl VideoFrameExtra
impl VideoFrameExtra
Sourcepub const fn sample_aspect_ratio(&self) -> Option<(u32, u32)>
pub const fn sample_aspect_ratio(&self) -> Option<(u32, u32)>
Sample aspect ratio (par numerator / denominator), None if 1:1
or unspecified.
Sourcepub const fn picture_type(&self) -> PictureType
pub const fn picture_type(&self) -> PictureType
Frame picture type (I/P/B/etc.).
Sourcepub const fn interlaced(&self) -> bool
pub const fn interlaced(&self) -> bool
True if the frame is interlaced.
Sourcepub const fn top_field_first(&self) -> bool
pub const fn top_field_first(&self) -> bool
True if the top field is first (only meaningful with interlaced).
Sourcepub const fn best_effort_timestamp(&self) -> Option<i64>
pub const fn best_effort_timestamp(&self) -> Option<i64>
FFmpeg’s heuristic best-effort PTS, or None if unknown.
Sourcepub const fn mastering_display(&self) -> Option<MasteringDisplay>
pub const fn mastering_display(&self) -> Option<MasteringDisplay>
HDR10 mastering-display metadata, if present on the source frame.
Sourcepub const fn content_light_level(&self) -> Option<ContentLightLevel>
pub const fn content_light_level(&self) -> Option<ContentLightLevel>
HDR10 content-light-level.
Sourcepub fn smpte_timecode(&self) -> &[u32]
pub fn smpte_timecode(&self) -> &[u32]
SMPTE ST 12-M timecode entries (raw 32-bit BCD-packed values).
Sourcepub fn side_data(&self) -> &[SideDataEntry]
pub fn side_data(&self) -> &[SideDataEntry]
Raw side-data entries from AVFrame.side_data.
Sourcepub const fn with_sample_aspect_ratio(self, value: Option<(u32, u32)>) -> Self
pub const fn with_sample_aspect_ratio(self, value: Option<(u32, u32)>) -> Self
Sets the sample aspect ratio (consuming builder).
Sourcepub const fn with_picture_type(self, value: PictureType) -> Self
pub const fn with_picture_type(self, value: PictureType) -> Self
Sets the picture type (consuming builder).
Sourcepub const fn with_key_frame(self, value: bool) -> Self
pub const fn with_key_frame(self, value: bool) -> Self
Sets the key-frame flag (consuming builder).
Sourcepub const fn with_interlaced(self, value: bool) -> Self
pub const fn with_interlaced(self, value: bool) -> Self
Sets the interlaced flag (consuming builder).
Sourcepub const fn with_top_field_first(self, value: bool) -> Self
pub const fn with_top_field_first(self, value: bool) -> Self
Sets the top-field-first flag (consuming builder).
Sourcepub const fn with_best_effort_timestamp(self, value: Option<i64>) -> Self
pub const fn with_best_effort_timestamp(self, value: Option<i64>) -> Self
Sets the best-effort timestamp (consuming builder).
Sourcepub const fn with_mastering_display(
self,
value: Option<MasteringDisplay>,
) -> Self
pub const fn with_mastering_display( self, value: Option<MasteringDisplay>, ) -> Self
Sets the mastering-display metadata (consuming builder).
Sourcepub const fn with_content_light_level(
self,
value: Option<ContentLightLevel>,
) -> Self
pub const fn with_content_light_level( self, value: Option<ContentLightLevel>, ) -> Self
Sets the content-light-level metadata (consuming builder).
Sourcepub fn with_smpte_timecode(self, value: Vec<u32>) -> Self
pub fn with_smpte_timecode(self, value: Vec<u32>) -> Self
Sets the SMPTE timecode list (consuming builder).
Sourcepub fn with_side_data(self, value: Vec<SideDataEntry>) -> Self
pub fn with_side_data(self, value: Vec<SideDataEntry>) -> Self
Sets the side-data list (consuming builder).
Sourcepub const fn set_sample_aspect_ratio(
&mut self,
value: Option<(u32, u32)>,
) -> &mut Self
pub const fn set_sample_aspect_ratio( &mut self, value: Option<(u32, u32)>, ) -> &mut Self
Sets the sample aspect ratio in place.
Sourcepub const fn set_picture_type(&mut self, value: PictureType) -> &mut Self
pub const fn set_picture_type(&mut self, value: PictureType) -> &mut Self
Sets the picture type in place.
Sourcepub const fn set_key_frame(&mut self, value: bool) -> &mut Self
pub const fn set_key_frame(&mut self, value: bool) -> &mut Self
Sets the key-frame flag in place.
Sourcepub const fn set_interlaced(&mut self, value: bool) -> &mut Self
pub const fn set_interlaced(&mut self, value: bool) -> &mut Self
Sets the interlaced flag in place.
Sourcepub const fn set_top_field_first(&mut self, value: bool) -> &mut Self
pub const fn set_top_field_first(&mut self, value: bool) -> &mut Self
Sets the top-field-first flag in place.
Sourcepub const fn set_best_effort_timestamp(
&mut self,
value: Option<i64>,
) -> &mut Self
pub const fn set_best_effort_timestamp( &mut self, value: Option<i64>, ) -> &mut Self
Sets the best-effort timestamp in place.
Sourcepub const fn set_mastering_display(
&mut self,
value: Option<MasteringDisplay>,
) -> &mut Self
pub const fn set_mastering_display( &mut self, value: Option<MasteringDisplay>, ) -> &mut Self
Sets the mastering-display metadata in place.
Sourcepub const fn set_content_light_level(
&mut self,
value: Option<ContentLightLevel>,
) -> &mut Self
pub const fn set_content_light_level( &mut self, value: Option<ContentLightLevel>, ) -> &mut Self
Sets the content-light-level metadata in place.
Sourcepub fn set_smpte_timecode(&mut self, value: Vec<u32>) -> &mut Self
pub fn set_smpte_timecode(&mut self, value: Vec<u32>) -> &mut Self
Sets the SMPTE timecode list in place.
Sourcepub fn set_side_data(&mut self, value: Vec<SideDataEntry>) -> &mut Self
pub fn set_side_data(&mut self, value: Vec<SideDataEntry>) -> &mut Self
Sets the side-data list in place.
Trait Implementations§
Source§impl Clone for VideoFrameExtra
impl Clone for VideoFrameExtra
Source§fn clone(&self) -> VideoFrameExtra
fn clone(&self) -> VideoFrameExtra
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more