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>
impl<'a> InProgressPicture<'a>
Sourcepub unsafe fn render_picture<T>(
&mut self,
buffer: &mut Buffer<T>,
) -> Result<(), Error>
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.
Sourcepub unsafe fn end_picture(self) -> Result<(), Error>
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.