Struct mp4parse::AvifContext

source ·
pub struct AvifContext {
    pub premultiplied_alpha: bool,
    pub major_brand: FourCC,
    pub sequence: Option<MediaContext>,
    pub unsupported_features: UnsupportedFeatures,
    /* private fields */
}

Fields§

§premultiplied_alpha: bool

If true, divide RGB values by the alpha value. See prem in MIAF (ISO 23000-22:2019) § 7.3.5.2

§major_brand: FourCC

Should probably only ever be AVIF_BRAND or AVIS_BRAND, but other values are legal as long as one of the two is the compatible_brand list.

§sequence: Option<MediaContext>

Information on the sequence contained in the image, or None if not present

§unsupported_features: UnsupportedFeatures

A collection of unsupported features encountered during the parse

Implementations§

source§

impl AvifContext

source

pub fn primary_item_is_present(&self) -> bool

source

pub fn primary_item_coded_data(&self) -> Option<&[u8]>

source

pub fn primary_item_bits_per_channel(&self) -> Option<Result<&[u8]>>

source

pub fn alpha_item_is_present(&self) -> bool

source

pub fn alpha_item_coded_data(&self) -> Option<&[u8]>

source

pub fn alpha_item_bits_per_channel(&self) -> Option<Result<&[u8]>>

source

pub fn spatial_extents_ptr(&self) -> Result<*const ImageSpatialExtentsProperty>

source

pub fn nclx_colour_information_ptr( &self ) -> Option<Result<*const NclxColourInformation>>

Returns None if there is no primary item or it has no associated NCLX colour boxes.

source

pub fn icc_colour_information(&self) -> Option<Result<&[u8]>>

Returns None if there is no primary item or it has no associated ICC colour boxes.

source

pub fn image_rotation(&self) -> Result<ImageRotation>

source

pub fn image_mirror_ptr(&self) -> Result<*const ImageMirror>

source

pub fn pixel_aspect_ratio_ptr(&self) -> Result<*const PixelAspectRatio>

Trait Implementations§

source§

impl Debug for AvifContext

source§

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

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

impl Default for AvifContext

source§

fn default() -> AvifContext

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

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.