pub struct Picture<S: PictureState> {
    inner: Box<PictureInner>,
    phantom: PhantomData<S>,
}
Expand description

A Surface that is being rendered into.

This struct abstracts the decoding flow using vaBeginPicture, vaRenderPicture, vaEndPicture and vaSyncSurface in a type-safe way.

The surface will have valid picture data after all the stages of decoding are called.

Fields

inner: Box<PictureInner>phantom: PhantomData<S>

Implementations

Creates a new Picture with a given timestamp. surface is the underlying surface that libva will render to.

Creates a new Picture with a given frame_number to identify it, reusing the Surface from picture. This is useful for interlaced decoding as one can render both fields to the same underlying surface.

Add buffer to the picture.

Wrapper around vaBeginPicture.

Wrapper around vaRenderPicture.

Wrapper around vaEndPicture.

Syncs the picture, ensuring that all pending operations are complete when this call returns.

Queries the status of the underlying surface.

This call can be used to implement a non-blocking path, wherein a decoder queries the status of the surface after each decode operation instead of blocking on it.

Returns the timestamp of this picture.

Returns a reference to the inner struct.

Reclaim ownership of the Surface this picture has been created from, consuming the picture in the process. Useful if the Surface is part of a pool.

Returns a reference to the underlying Surface for this Picture

Returns a mutable reference to the underlying Surface for this Picture

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.