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 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_FUNC(trace_func,...) \
46 trace_func(__VA_ARGS__); \
48 #define VA_TRACE_LOG(trace_func,...) \
49 if (trace_flag & VA_TRACE_FLAG_LOG) { \
50 trace_func(__VA_ARGS__); \
52 #define VA_TRACE_SURFACE(trace_func,...) \
53 if (trace_flag & (VA_TRACE_FLAG_SURFACE | VA_TRACE_FLAG_CODEDBUF)) { \
54 trace_func(__VA_ARGS__); \
57 void va_TraceInit(VADisplay dpy);
58 void va_TraceEnd(VADisplay dpy);
60 void va_TraceMsg(int idx, const char *msg, ...);
62 void va_TraceInitialize (
64 int *major_version, /* out */
65 int *minor_version /* out */
68 void va_TraceTerminate (
72 void va_TraceCreateConfig(
75 VAEntrypoint entrypoint,
76 VAConfigAttrib *attrib_list,
78 VAConfigID *config_id /* out */
81 void va_TraceCreateSurface(
87 VASurfaceID *surfaces /* out */
90 void va_TraceCreateContext(
96 VASurfaceID *render_targets,
97 int num_render_targets,
98 VAContextID *context /* out */
102 void va_TraceMapBuffer (
104 VABufferID buf_id, /* in */
105 void **pbuf /* out */
109 void va_TraceBeginPicture(
112 VASurfaceID render_target
115 void va_TraceRenderPicture(
122 void va_TraceEndPicture(
128 void va_TraceSyncSurface(
130 VASurfaceID render_target
133 void va_TraceQuerySurfaceStatus(
135 VASurfaceID render_target,
136 VASurfaceStatus *status /* out */
139 void va_TraceQuerySurfaceError(
142 VAStatus error_status,
143 void **error_info /*out*/
147 void va_TraceMaxNumDisplayAttributes (
152 void va_TraceQueryDisplayAttributes (
154 VADisplayAttribute *attr_list, /* out */
155 int *num_attributes /* out */
158 void va_TraceGetDisplayAttributes (
160 VADisplayAttribute *attr_list,
164 void va_TraceSetDisplayAttributes (
166 VADisplayAttribute *attr_list,
170 /* extern function called by display side */
171 void va_TracePutSurface (
174 void *draw, /* the target Drawable */
181 unsigned short destw,
182 unsigned short desth,
183 VARectangle *cliprects, /* client supplied clip list */
184 unsigned int number_cliprects, /* number of clip rects in the clip list */
185 unsigned int flags /* de-interlacing flags */
193 #endif /* VA_TRACE_H */