2 * Copyright (c) 2009 Intel Corporation. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 extern int va_trace_flag;
34 #define VA_TRACE_FLAG_LOG 0x1
35 #define VA_TRACE_FLAG_BUFDATA 0x2
36 #define VA_TRACE_FLAG_CODEDBUF 0x4
37 #define VA_TRACE_FLAG_SURFACE_DECODE 0x8
38 #define VA_TRACE_FLAG_SURFACE_ENCODE 0x10
39 #define VA_TRACE_FLAG_SURFACE_JPEG 0x20
40 #define VA_TRACE_FLAG_SURFACE (VA_TRACE_FLAG_SURFACE_DECODE | \
41 VA_TRACE_FLAG_SURFACE_ENCODE | \
42 VA_TRACE_FLAG_SURFACE_JPEG)
44 #define VA_TRACE_LOG(trace_func,...) \
45 if (va_trace_flag & VA_TRACE_FLAG_LOG) { \
46 trace_func(__VA_ARGS__); \
48 #define VA_TRACE_ALL(trace_func,...) \
49 if (va_trace_flag) { \
50 trace_func(__VA_ARGS__); \
54 void va_TraceInit(VADisplay dpy);
56 void va_TraceEnd(VADisplay dpy);
59 void va_TraceInitialize (
61 int *major_version, /* out */
62 int *minor_version /* out */
66 void va_TraceTerminate (
71 void va_TraceCreateConfig(
74 VAEntrypoint entrypoint,
75 VAConfigAttrib *attrib_list,
77 VAConfigID *config_id /* out */
81 void va_TraceDestroyConfig (
87 void va_TraceCreateSurfaces(
93 VASurfaceID *surfaces, /* out */
94 VASurfaceAttrib *attrib_list,
95 unsigned int num_attribs
99 void va_TraceDestroySurfaces(
101 VASurfaceID *surface_list,
106 void va_TraceCreateContext(
108 VAConfigID config_id,
112 VASurfaceID *render_targets,
113 int num_render_targets,
114 VAContextID *context /* out */
118 void va_TraceDestroyContext (
124 void va_TraceCreateMFContext (
126 VAContextID *mf_context /* out */
130 void va_TraceMFAddContext (
132 VAMFContextID mf_context,
137 void va_TraceMFReleaseContext (
139 VAMFContextID mf_context,
144 void va_TraceMFSubmit (
146 VAMFContextID mf_context,
147 VAContextID *contexts,
152 void va_TraceCreateBuffer (
154 VAContextID context, /* in */
155 VABufferType type, /* in */
156 unsigned int size, /* in */
157 unsigned int num_elements, /* in */
159 VABufferID *buf_id /* out */
163 void va_TraceDestroyBuffer (
165 VABufferID buf_id /* in */
169 void va_TraceMapBuffer (
171 VABufferID buf_id, /* in */
172 void **pbuf /* out */
177 void va_TraceBeginPicture(
180 VASurfaceID render_target
184 void va_TraceRenderPicture(
192 void va_TraceEndPicture(
199 void va_TraceSyncSurface(
201 VASurfaceID render_target
205 void va_TraceQuerySurfaceAttributes(
208 VASurfaceAttrib *attrib_list,
209 unsigned int *num_attribs
213 void va_TraceQuerySurfaceStatus(
215 VASurfaceID render_target,
216 VASurfaceStatus *status /* out */
220 void va_TraceQuerySurfaceError(
223 VAStatus error_status,
224 void **error_info /*out*/
229 void va_TraceMaxNumDisplayAttributes (
235 void va_TraceQueryDisplayAttributes (
237 VADisplayAttribute *attr_list, /* out */
238 int *num_attributes /* out */
242 void va_TraceGetDisplayAttributes (
244 VADisplayAttribute *attr_list,
249 void va_TraceSetDisplayAttributes (
251 VADisplayAttribute *attr_list,
255 /* extern function called by display side */
256 void va_TracePutSurface (
259 void *draw, /* the target Drawable */
266 unsigned short destw,
267 unsigned short desth,
268 VARectangle *cliprects, /* client supplied clip list */
269 unsigned int number_cliprects, /* number of clip rects in the clip list */
270 unsigned int flags /* de-interlacing flags */
278 #endif /* VA_TRACE_H */