Skip to main content

VideoFrameExtra

Struct VideoFrameExtra 

Source
pub struct VideoFrameExtra { /* private fields */ }
Expand description

Per-VideoFrame extras carrying everything the unified mediadecode::ColorInfo doesn’t already cover.

Implementations§

Source§

impl VideoFrameExtra

Source

pub const fn new() -> Self

Constructs an empty VideoFrameExtra (all fields at default).

Source

pub const fn sample_aspect_ratio(&self) -> Option<(u32, u32)>

Sample aspect ratio (par numerator / denominator), None if 1:1 or unspecified.

Source

pub const fn picture_type(&self) -> PictureType

Frame picture type (I/P/B/etc.).

Source

pub const fn key_frame(&self) -> bool

True if this frame is a key frame.

Source

pub const fn interlaced(&self) -> bool

True if the frame is interlaced.

Source

pub const fn top_field_first(&self) -> bool

True if the top field is first (only meaningful with interlaced).

Source

pub const fn best_effort_timestamp(&self) -> Option<i64>

FFmpeg’s heuristic best-effort PTS, or None if unknown.

Source

pub const fn mastering_display(&self) -> Option<MasteringDisplay>

HDR10 mastering-display metadata, if present on the source frame.

Source

pub const fn content_light_level(&self) -> Option<ContentLightLevel>

HDR10 content-light-level.

Source

pub fn smpte_timecode(&self) -> &[u32]

SMPTE ST 12-M timecode entries (raw 32-bit BCD-packed values).

Source

pub fn side_data(&self) -> &[SideDataEntry]

Raw side-data entries from AVFrame.side_data.

Source

pub const fn with_sample_aspect_ratio(self, value: Option<(u32, u32)>) -> Self

Sets the sample aspect ratio (consuming builder).

Source

pub const fn with_picture_type(self, value: PictureType) -> Self

Sets the picture type (consuming builder).

Source

pub const fn with_key_frame(self, value: bool) -> Self

Sets the key-frame flag (consuming builder).

Source

pub const fn with_interlaced(self, value: bool) -> Self

Sets the interlaced flag (consuming builder).

Source

pub const fn with_top_field_first(self, value: bool) -> Self

Sets the top-field-first flag (consuming builder).

Source

pub const fn with_best_effort_timestamp(self, value: Option<i64>) -> Self

Sets the best-effort timestamp (consuming builder).

Source

pub const fn with_mastering_display( self, value: Option<MasteringDisplay>, ) -> Self

Sets the mastering-display metadata (consuming builder).

Source

pub const fn with_content_light_level( self, value: Option<ContentLightLevel>, ) -> Self

Sets the content-light-level metadata (consuming builder).

Source

pub fn with_smpte_timecode(self, value: Vec<u32>) -> Self

Sets the SMPTE timecode list (consuming builder).

Source

pub fn with_side_data(self, value: Vec<SideDataEntry>) -> Self

Sets the side-data list (consuming builder).

Source

pub const fn set_sample_aspect_ratio( &mut self, value: Option<(u32, u32)>, ) -> &mut Self

Sets the sample aspect ratio in place.

Source

pub const fn set_picture_type(&mut self, value: PictureType) -> &mut Self

Sets the picture type in place.

Source

pub const fn set_key_frame(&mut self, value: bool) -> &mut Self

Sets the key-frame flag in place.

Source

pub const fn set_interlaced(&mut self, value: bool) -> &mut Self

Sets the interlaced flag in place.

Source

pub const fn set_top_field_first(&mut self, value: bool) -> &mut Self

Sets the top-field-first flag in place.

Source

pub const fn set_best_effort_timestamp( &mut self, value: Option<i64>, ) -> &mut Self

Sets the best-effort timestamp in place.

Source

pub const fn set_mastering_display( &mut self, value: Option<MasteringDisplay>, ) -> &mut Self

Sets the mastering-display metadata in place.

Source

pub const fn set_content_light_level( &mut self, value: Option<ContentLightLevel>, ) -> &mut Self

Sets the content-light-level metadata in place.

Source

pub fn set_smpte_timecode(&mut self, value: Vec<u32>) -> &mut Self

Sets the SMPTE timecode list in place.

Source

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

Source§

fn clone(&self) -> VideoFrameExtra

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VideoFrameExtra

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VideoFrameExtra

Source§

fn default() -> VideoFrameExtra

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more