Crate cros_libva

source ·
Expand description

Implements a lightweight and safe interface over libva.

The starting point to using this crate is to open a Display, from which a Context and Surfaces can be allocated and used for doing actual work.

Re-exports

Modules

Structs

  • A configuration for a given Display.
  • A VA context for a particular Display.
  • A VADisplay opened over DRM.
  • Iterates over existing DRM devices.
  • Wrapper around VAImage that is tied to the lifetime of a given Picture.
  • A Surface that is being rendered into.
  • An owned VA surface that is tied to the lifetime of a particular VADisplay
  • Gives the driver a hint of intended usage to optimize allocation (e.g. tiling).

Enums

  • A wrapper over VAGenericValue giving us safe access to the underlying union members.
  • Represents a Picture after vaBeginPicture has been called.
  • Represents a Picture after vaEndPicture has been called.
  • Represents a Picture that has just been created.
  • Represents a Picture after vaRenderPicture has been called.
  • Represents a Picture after vaSyncSurface has been called on the underlying surface.

Traits

  • Represents a state where one can reclaim the underlying Surface for this Picture. This is true when either no decoding has been initiated or, alternatively, when the decoding operation has completed for the underlying vaSurface
  • A Picture will only have valid YUV data after a sequence of operations are performed in a particular order. This order correspond to the following VA-API calls: vaBeginPicture, vaRenderPicture, vaEndPicture and vaSyncSurface. This trait enforces this ordering by implementing the Typestate pattern to constrain what operations are available in what particular states.

Type Definitions