1. add interface VARenderDevice for output the video into an external device...
[platform/upstream/libva.git] / va / va_trace.h
1 /*
2  * Copyright (c) 2009 Intel Corporation. All Rights Reserved.
3  *
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:
11  * 
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  * 
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.
23  */
24
25 #ifndef VA_TRACE_H
26 #define VA_TRACE_H
27
28 void va_TraceInit(VADisplay dpy);
29 void va_TraceEnd(VADisplay dpy);
30
31 void va_TraceMsg(int idx, const char *msg, ...);
32
33 VAStatus va_TraceInitialize (
34     VADisplay dpy,
35     int *major_version,  /* out */
36     int *minor_version   /* out */
37 );
38
39 VAStatus va_TraceTerminate (
40     VADisplay dpy
41 );
42
43 void va_TraceCreateConfig(
44     VADisplay dpy,
45     VAProfile profile, 
46     VAEntrypoint entrypoint, 
47     VAConfigAttrib *attrib_list,
48     int num_attribs,
49     VAConfigID *config_id /* out */
50 );
51
52 void va_TraceCreateSurface(
53     VADisplay dpy,
54     int width,
55     int height,
56     int format,
57     int num_surfaces,
58     VASurfaceID *surfaces       /* out */
59 );
60
61 void va_TraceCreateContext(
62     VADisplay dpy,
63     VAConfigID config_id,
64     int picture_width,
65     int picture_height,
66     int flag,
67     VASurfaceID *render_targets,
68     int num_render_targets,
69     VAContextID *context                /* out */
70 );
71
72
73 void va_TraceMapBuffer (
74     VADisplay dpy,
75     VABufferID buf_id,  /* in */
76     void **pbuf         /* out */
77 );
78
79
80 void va_TraceBeginPicture(
81     VADisplay dpy,
82     VAContextID context,
83     VASurfaceID render_target
84 );
85
86 void va_TraceRenderPicture(
87     VADisplay dpy,
88     VAContextID context,
89     VABufferID *buffers,
90     int num_buffers
91 );
92
93 void va_TraceEndPicture(
94     VADisplay dpy,
95     VAContextID context
96 );
97
98 void va_TraceSyncSurface(
99     VADisplay dpy,
100     VASurfaceID render_target
101 );
102
103 void va_TraceQuerySurfaceStatus(
104     VADisplay dpy,
105     VASurfaceID render_target,
106     VASurfaceStatus *status     /* out */
107 );
108
109 void va_TraceQuerySurfaceError(
110         VADisplay dpy,
111         VASurfaceID surface,
112         VAStatus error_status,
113         void **error_info /*out*/
114 );
115
116
117 void va_TraceMaxNumDisplayAttributes (
118     VADisplay dpy,
119     int number
120 );
121
122 void va_TraceQueryDisplayAttributes (
123     VADisplay dpy,
124     VADisplayAttribute *attr_list,      /* out */
125     int *num_attributes                 /* out */
126 );
127
128 void va_TraceGetDisplayAttributes (
129     VADisplay dpy,
130     VADisplayAttribute *attr_list,
131     int num_attributes
132 );
133
134 void va_TraceSetDisplayAttributes (
135     VADisplay dpy,
136     VADisplayAttribute *attr_list,
137     int num_attributes
138 );
139
140 /* extern function called by display side */
141 void va_TracePutSurface (
142     VADisplay dpy,
143     VASurfaceID surface,
144     void *draw, /* the target Drawable */
145     short srcx,
146     short srcy,
147     unsigned short srcw,
148     unsigned short srch,
149     short destx,
150     short desty,
151     unsigned short destw,
152     unsigned short desth,
153     VARectangle *cliprects, /* client supplied clip list */
154     unsigned int number_cliprects, /* number of clip rects in the clip list */
155     unsigned int flags /* de-interlacing flags */
156 );
157
158
159
160 #endif /* VA_TRACE_H */