Struct InProgressPicture

Source
pub struct InProgressPicture<'a> { /* private fields */ }
Expand description

An operation whose submission is still in progress.

Submit parameter and data buffers with InProgressPicture::render_picture and finish the operation, kicking off decoding or encoding, by calling InProgressPicture::end_picture.

Implementations§

Source§

impl<'a> InProgressPicture<'a>

Source

pub unsafe fn render_picture<T>( &mut self, buffer: &mut Buffer<T>, ) -> Result<(), Error>

Submits a Buffer as part of this libva operation.

Typically, libva does not document which buffer types are required for any given entry point, so good luck!

§Safety

Buffers containing metadata structures must contain a valid value of the particular subtype required by the configured Profile and Entrypoint.

For example, when using Profile::JPEGBaseline and Entrypoint::VLD, submitting a Buffer with BufferType::SliceParameter requires that the Buffer contains a jpeg::SliceParameterBuffer, and submitting only the substructure SliceParameterBufferBase will cause Undefined Behavior.

Source

pub unsafe fn end_picture(self) -> Result<(), Error>

Finishes submitting buffers, and begins the libva operation (encode, decode, etc.).

§Safety

libva does not specify when Undefined Behavior occurs, and in practice at least some implementations exhibit UB-like behavior when buffers are submitted incorrectly (or when not all buffers required by the operation were submitted). It also does not document which buffer types must be submitted (or must not be submitted) for any given entry point.

So, basically, the safety invariant of this method is “fuck if I know”. Good luck, Loser.

Auto Trait Implementations§

§

impl<'a> Freeze for InProgressPicture<'a>

§

impl<'a> !RefUnwindSafe for InProgressPicture<'a>

§

impl<'a> Send for InProgressPicture<'a>

§

impl<'a> Sync for InProgressPicture<'a>

§

impl<'a> Unpin for InProgressPicture<'a>

§

impl<'a> !UnwindSafe for InProgressPicture<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.