Struct libavif_sys::avifDecoder[][src]

#[repr(C)]pub struct avifDecoder {
    pub codecChoice: avifCodecChoice,
    pub maxThreads: c_int,
    pub requestedSource: avifDecoderSource,
    pub image: *mut avifImage,
    pub imageIndex: c_int,
    pub imageCount: c_int,
    pub imageTiming: avifImageTiming,
    pub timescale: u64,
    pub duration: f64,
    pub durationInTimescales: u64,
    pub alphaPresent: avifBool,
    pub ignoreExif: avifBool,
    pub ignoreXMP: avifBool,
    pub ioStats: avifIOStats,
    pub io: *mut avifIO,
    pub data: *mut avifDecoderData,
}

Fields

codecChoice: avifCodecChoice

Defaults to AVIF_CODEC_CHOICE_AUTO: Preference determined by order in availableCodecs table (avif.c)

maxThreads: c_int

multithreading is disabled if <2)

requestedSource: avifDecoderSourceimage: *mut avifImage

All decoded image data; owned by the decoder. All information in this image is incrementally added and updated as avifDecoder*() functions are called. After a successful call to avifDecoderParse(), all values in decoder->image (other than the planes/rowBytes themselves) will be pre-populated with all information found in the outer AVIF container, prior to any AV1 decoding. If the contents of the inner AV1 payload disagree with the outer container, these values may change after calls to avifDecoderRead*(),avifDecoderNextImage(), or avifDecoderNthImage().

The YUV and A contents of this image are likely owned by the decoder, so be sure to copy any data inside of this image before advancing to the next image or reusing the decoder. It is legal to call avifImageYUVToRGB() on this in between calls to avifDecoderNextImage(), but use avifImageCopy() if you want to make a complete, permanent copy of this image’s YUV content or metadata.

imageIndex: c_int

Counts and timing for the current image in an image sequence. Uninteresting for single image files. 9-based

imageCount: c_int

Always 1 for non-sequences

imageTiming: avifImageTimingtimescale: u64

timescale of the media (Hz)

duration: f64

in seconds (durationInTimescales / timescale)

durationInTimescales: u64

duration in “timescales”

alphaPresent: avifBool

This is true when avifDecoderParse() detects an alpha plane. Use this to find out if alpha is present after a successful call to avifDecoderParse(), but prior to any call to avifDecoderNextImage() or avifDecoderNthImage(), as decoder->image->alphaPlane won’t exist yet.

ignoreExif: avifBool

Enable any of these to avoid reading and surfacing specific data to the decoded avifImage. These can be useful if your avifIO implementation heavily uses AVIF_RESULT_WAITING_ON_IO for streaming data, as some of these payloads are (unfortunately) packed at the end of the file, which will cause avifDecoderParse() to return AVIF_RESULT_WAITING_ON_IO until it finds them. If you don’t actually leverage this data, it is best to ignore it here.

ignoreXMP: avifBoolioStats: avifIOStats

stats from the most recent read, possibly 0s if reading an image sequence

io: *mut avifIO

Use one of the avifDecoderSetIO*() functions to set this

data: *mut avifDecoderData

Internals used by the decoder

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.