}
/// Wrapper over `vaQuerySurfaceStatus` to find out any pending ops on the render target.
- pub fn query_status(&self) -> VAResult<bindings::VASurfaceStatus::Type> {
+ pub fn query_status(&self) -> VAResult<VASurfaceStatus> {
let mut status: bindings::VASurfaceStatus::Type = 0;
// Safe because `self` represents a valid VASurface.
(unsafe {
bindings::vaQuerySurfaceStatus(self.display.handle(), self.id, &mut status)
})
.check()?;
- Ok(status)
+ match status {
+ bindings::VASurfaceStatus::VASurfaceRendering => Ok(VASurfaceStatus::Rendering),
+ bindings::VASurfaceStatus::VASurfaceDisplaying => Ok(VASurfaceStatus::Displaying),
+ bindings::VASurfaceStatus::VASurfaceReady => Ok(VASurfaceStatus::Ready),
+ bindings::VASurfaceStatus::VASurfaceSkipped => Ok(VASurfaceStatus::Skipped),
+ _ => Err(VAError::Unknown),
+ }
}
/// Returns the ID of this surface.