Struct cros_codecs::utils::vaapi::GenericBackendHandle
source · [−]pub struct GenericBackendHandle {
state: PictureState,
resolution: Resolution,
surface_pool: SurfacePoolHandle,
}
Expand description
VA-API backend handle.
This includes the VA picture which can be pending rendering or complete, as well as useful meta-information.
Fields
state: PictureState
resolution: Resolution
The decoder resolution when this frame was processed. Not all codecs send resolution data in every frame header.
surface_pool: SurfacePoolHandle
A handle to the surface pool from which the backing surface originates.
Implementations
sourceimpl GenericBackendHandle
impl GenericBackendHandle
sourcepub(crate) fn new_pending(
picture: Picture<PictureNew>,
surface_pool: SurfacePoolHandle
) -> Result<Self>
pub(crate) fn new_pending(
picture: Picture<PictureNew>,
surface_pool: SurfacePoolHandle
) -> Result<Self>
Creates a new pending handle on surface_id
.
pub(crate) fn sync(&mut self, metadata: &ParsedStreamMetadata) -> Result<()>
sourcepub fn image(&mut self) -> Result<Image<'_>>
pub fn image(&mut self) -> Result<Image<'_>>
Returns a mapped VAImage. this maps the VASurface onto our address space. This can be used in place of “DynMappableHandle::map()” if the client wants to access the backend mapping directly for any reason.
Note that DynMappableHandle is downcastable.
sourcepub fn surface_id(&self) -> VASurfaceID
pub fn surface_id(&self) -> VASurfaceID
Returns the id of the VA surface backing this handle.
pub fn is_va_ready(&self) -> Result<bool>
Trait Implementations
sourceimpl Drop for GenericBackendHandle
impl Drop for GenericBackendHandle
sourceimpl DynHandle for GenericBackendHandle
impl DynHandle for GenericBackendHandle
sourcefn dyn_mappable_handle_mut<'a>(&'a mut self) -> Box<dyn MappableHandle + 'a>
fn dyn_mappable_handle_mut<'a>(&'a mut self) -> Box<dyn MappableHandle + 'a>
Gets an exclusive reference to the backend handle of this picture.
Assumes that this picture is backed by a handle and panics if not the case. Read more
Auto Trait Implementations
impl !RefUnwindSafe for GenericBackendHandle
impl !Send for GenericBackendHandle
impl !Sync for GenericBackendHandle
impl Unpin for GenericBackendHandle
impl !UnwindSafe for GenericBackendHandle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more