[Libva] VA/EGL backend
Xiang, Haihao
haihao.xiang at intel.com
Wed Nov 9 19:05:26 PST 2011
Hi,
I created a new branch vaapi-egl which introduces some new hooks for
VA/EGL backend. vaapi-egl has a generic implementation with native
pixamp. The backend-driver (intel-drv/pvr-drv) can provide its specific
implementation. There is a test case va_egl_x11.c under test/egl to
show how to use vaapi-egl.
Thanks
Haihao
/**
* Return a suitable VADisplay for VA API
*
* @param[in] native_dpy the native display
* @param[in] egl_dpy the EGL display
* @return a VADisplay
*/
VADisplay vaGetDisplayEGL(
VANativeDisplay native_dpy,
EGLDisplay egl_dpy
);
/**
* Create a surface used for display to OpenGL ES
*
* The application shall maintain the live EGL context itself.
*
* @param[in] dpy the VA display
* @param[in] target the GL target to which the texture needs to be bound, must be GL_TEXTURE_2D
* @param[in] texture the GL texture
* @param[in] width the surface width
* @param[in] height the surface height
* @param[out] gl_surface the VA/EGL surface
* @return VA_STATUS_SUCCESS if successful
*/
VAStatus vaCreateSurfaceEGL(
VADisplay dpy,
GLenum target,
GLuint texture,
unsigned int width,
unsigned int height,
VASurfaceEGL *gl_surface
);
/**
* Destroy a VA/EGL surface
*
* The application shall maintain the live EGL context itself.
*
* @param[in] dpy the VA display
* @param[in] gl_surface the VA surface
* @return VA_STATUS_SUCCESS if successful
*/
VAStatus vaDestroySurfaceEGL(
VADisplay dpy,
VASurfaceEGL gl_surface
);
/**
* Associate a EGL surface with a VA surface
*
* @param[in] dpy the VA display
* @param[in] egl_surface the VA/EGL destination surface
* @param[in] surface the VA surface
* @param[in] flags the flags to PutSurface
* @return VA_STATUS_SUCCESS if successful
*/
VAStatus vaAssociateSurfaceEGL(
VADisplay dpy,
VASurfaceEGL egl_surface,
VASurfaceID surface,
unsigned int flags
);
/**
* Update the content of a VA/EGL surface
*
* Changes to VA surface are committed to VA/EGL surface at this point.
*
* @param[in] dpy the VA display
* @param[in] egl_surface the VA/EGL destination surface
* @return VA_STATUS_SUCCESS if successful
*/
VAStatus vaUpdateAssociatedSurfaceEGL(
VADisplay dpy,
VASurfaceEGL egl_surface
);
/**
* Deassociate a EGL surface
*
* @param[in] dpy the VA display
* @param[in] egl_surface the VA/EGL destination surface
* @return VA_STATUS_SUCCESS if successful
*/
VAStatus vaDeassociateSurfaceEGL(
VADisplay dpy,
VASurfaceEGL egl_surface
);
More information about the Libva
mailing list