hardware/intel/libva
Revision | e8dc39b5e36ff7f936c8f564d03fed531fd75eba (tree) |
---|---|
Zeit | 2011-12-14 09:27:03 |
Autor | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
Update VA/EGL interfaces
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
@@ -2,8 +2,6 @@ | ||
2 | 2 | #define _VA_EGL_H_ |
3 | 3 | |
4 | 4 | #include <va/va.h> |
5 | -#include <GLES/gl.h> | |
6 | -#include <GLES/glext.h> | |
7 | 5 | #include <EGL/egl.h> |
8 | 6 | #include <EGL/eglext.h> |
9 | 7 |
@@ -37,22 +35,58 @@ VADisplay vaGetDisplayEGL( | ||
37 | 35 | ); |
38 | 36 | |
39 | 37 | /** |
40 | - * Create a surface used for display to OpenGL ES | |
38 | + * Return maximum number of EGL targets supported by the implementation | |
41 | 39 | * |
42 | - * The application shall maintain the live EGL context itself. | |
40 | + * @param[in] dpy the VADisplay | |
41 | + * @return the maximum number of EGL Target | |
42 | + */ | |
43 | +int vaMaxNumSurfaceTargetsEGL( | |
44 | + VADisplay dpy | |
45 | +); | |
46 | + | |
47 | +/** | |
48 | + * Return maximum number of EGL surface attributes supported by the implementation | |
43 | 49 | * |
44 | - * @param[in] dpy the VA display | |
45 | - * @param[in] target the GL target to which the texture needs to be bound, must be GL_TEXTURE_2D | |
46 | - * @param[in] texture the GL texture | |
47 | - * @param[in] width the surface width | |
48 | - * @param[in] height the surface height | |
50 | + * @param[in] dpy the VADisplay | |
51 | + * @return the maximum number of EGL surface attributes | |
52 | + */ | |
53 | +int vaMaxNumSurfaceAttributesEGL( | |
54 | + VADisplay dpy | |
55 | +); | |
56 | + | |
57 | +/** | |
58 | + * Query supported EGL targets for eglCreateImageKHR(). | |
59 | + * | |
60 | + * The caller must provide a "target_list" array that can hold at | |
61 | + * least vaMaxNumSurfaceTargetsEGL() entries. The actual number of | |
62 | + * targets returned in "target_list" is returned in "num_targets". | |
63 | + * | |
64 | + * @param[in]] dpy the VADisplay | |
65 | + * @param[out] target_list the array to hold target entries | |
66 | + * @param[out] num_targets the actual number of targets | |
67 | + * @return VA_STATUS_SUCCESS if successful | |
68 | + */ | |
69 | +VAStatus vaQuerySurfaceTargetsEGL( | |
70 | + VADisplay dpy, | |
71 | + EGLenum *target_list, /* out */ | |
72 | + int *num_targets /* out */ | |
73 | +); | |
74 | + | |
75 | +/** | |
76 | + * Creates a VA/EGL surface with the specified target | |
77 | + * | |
78 | + * If target is 0, this means the best efficient target by default. | |
79 | + * | |
80 | + * @param[in] dpy the VADisplay | |
81 | + * @param[in] target the specified EGL target | |
82 | + * @param[in] width the surface width | |
83 | + * @param[in] height the surface height | |
49 | 84 | * @param[out] gl_surface the VA/EGL surface |
50 | 85 | * @return VA_STATUS_SUCCESS if successful |
51 | 86 | */ |
52 | 87 | VAStatus vaCreateSurfaceEGL( |
53 | 88 | VADisplay dpy, |
54 | - GLenum target, | |
55 | - GLuint texture, | |
89 | + EGLenum target, | |
56 | 90 | unsigned int width, |
57 | 91 | unsigned int height, |
58 | 92 | VASurfaceEGL *gl_surface |
@@ -73,7 +107,7 @@ VAStatus vaDestroySurfaceEGL( | ||
73 | 107 | ); |
74 | 108 | |
75 | 109 | /** |
76 | - * Associate a EGLClientBuffer with a VA surface | |
110 | + * Associate a EGL surface with a VA surface | |
77 | 111 | * |
78 | 112 | * @param[in] dpy the VA display |
79 | 113 | * @param[in] egl_surface the VA/EGL destination surface |
@@ -93,17 +127,41 @@ VAStatus vaAssociateSurfaceEGL( | ||
93 | 127 | * |
94 | 128 | * Changes to VA surface are committed to VA/EGL surface at this point. |
95 | 129 | * |
96 | - * @param[in] dpy the VA display | |
97 | - * @param[in] egl_surface the VA/EGL destination surface | |
130 | + * @param[in] dpy the VA display | |
131 | + * @param[in] egl_surface the VA/EGL surface that has been associated with a VA surface | |
98 | 132 | * @return VA_STATUS_SUCCESS if successful |
99 | 133 | */ |
100 | -VAStatus vaUpdateAssociatedSurfaceEGL( | |
134 | +VAStatus vaSyncSurfaceEGL( | |
101 | 135 | VADisplay dpy, |
102 | 136 | VASurfaceEGL egl_surface |
103 | 137 | ); |
104 | 138 | |
105 | 139 | /** |
106 | - * Deassociate a EGLClientBuffer | |
140 | + * Get the necessary information for eglCreateImageKHR() | |
141 | + * | |
142 | + * The caller must provide a "attrib_list" array that can hold at | |
143 | + * least (2 * vaMaxNumSurfaceAttributesEGL()) entries. The last attribute | |
144 | + * specified in attrib_list must be EGL_NONE | |
145 | + * | |
146 | + * @param[in] dpy the VA display | |
147 | + * @param[in] egl_surface the VA/EGL surface that has been associated with a VA surface | |
148 | + * @param[out] target the type of <buffer> for eglCreateImageKHR() | |
149 | + * @param[out] buffer the EGLClientBuffer for eglCreateImageKHR() | |
150 | + * @param[out] attrib_list the list of attribute-value pairs for eglCreateImageKHR() | |
151 | + * @param[in/out] num_attribs input: the number of allocated attribute-value pairs in attrib_list; output: the actual number of attribute-value pairs | |
152 | + * @return VA_STATUS_SUCCESS if successful | |
153 | + */ | |
154 | +VAStatus vaGetSurfaceInfoEGL( | |
155 | + VADisplay dpy, | |
156 | + VASurfaceEGL egl_surface, | |
157 | + EGLenum *target, /* out, the type of <buffer> */ | |
158 | + EGLClientBuffer *buffer, /* out */ | |
159 | + EGLint *attrib_list, /* out, the last attribute must be EGL_NONE */ | |
160 | + int *num_attribs /* in/out, the number of attribute-value pairs */ | |
161 | +); | |
162 | + | |
163 | +/** | |
164 | + * Deassociate a EGL surface | |
107 | 165 | * |
108 | 166 | * @param[in] dpy the VA display |
109 | 167 | * @param[in] egl_surface the VA/EGL destination surface |