Fix cap style enumeration (bug #8857).
[free-sw/xcb/proto] / src / xv.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Copyright (C) 2006 Jeremy Kolb.
4 All Rights Reserved.
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23 Except as contained in this notice, the names of the authors or their
24 institutions shall not be used in advertising or otherwise to promote the
25 sale, use or other dealings in this Software without prior written
26 authorization from the authors.
27 -->
28
29 <xcb header="xv" extension-xname="XVideo" extension-name="Xv" major-version="2" minor-version="2">
30     <import>xproto</import>
31     <import>shm</import>
32     <!-- Implements version 2.2 of XV -->
33
34     <!-- XIDs -->
35     <xidtype name="PORT" />
36     <xidtype name="ENCODING" />
37
38     <enum name="Type">
39         <item name="InputMask"><value>0x00000001</value></item>
40         <item name="OutputMask"><value>0x00000002</value></item>
41         <item name="VideoMask"><value>0x00000004</value></item>
42         <item name="StillMask"><value>0x00000008</value></item>
43         <item name="ImageMask"><value>0x00000010</value></item>
44     </enum>
45
46     <enum name="ImageFormatInfoType">
47         <item name="RGB" />
48         <item name="YUV" />
49     </enum>
50
51     <enum name="ImageFormatInfoFormat">
52         <item name="Packed" />
53         <item name="Planar" />
54     </enum>
55
56     <enum name="AttributeFlag">
57         <item name="Gettable"><value>0x01</value></item>
58         <item name="Settable"><value>0x02</value></item>
59     </enum>
60     
61     <struct name="Rational">
62         <field type="INT32" name="numerator" />
63         <field type="INT32" name="denominator" />
64     </struct>
65
66     <struct name="AdaptorInfo">
67         <field type="PORT" name="base_id" />
68         <field type="CARD16" name="name_size" />
69         <field type="CARD16" name="num_ports" />
70         <field type="CARD16" name="num_formats" />
71         <field type="CARD8" name="type" />
72         <field type="CARD8" name="pad" />
73         <list type="char" name="name">
74             <fieldref>name_size</fieldref>
75         </list>
76         <list type="Format" name="formats">
77             <fieldref>num_formats</fieldref>
78         </list>
79
80     </struct>
81
82     <struct name="EncodingInfo">
83         <field type="ENCODING" name="encoding" />
84         <field type="CARD16" name="name_size" />
85         <field type="CARD16" name="width" />
86         <field type="CARD16" name="height" />
87         <field type="Rational" name="rate" />
88         <!--
89         Xvproto.h has a padding CARD16 here but the name
90         overlaps.
91         -->
92         <list type="char" name="name">
93             <fieldref>name_size</fieldref>
94         </list>
95     </struct>
96
97     <struct name="Format">
98         <field type="VISUALID" name="visual" />
99         <field type="CARD8" name="depth" />
100     </struct>
101
102     <struct name="Image">
103         <field type="CARD32" name="id" />
104         <field type="CARD16" name="width" />
105         <field type="CARD16" name="height" />
106         <field type="CARD32" name="data_size" />
107         <field type="CARD32" name="num_planes" />
108         <list type="CARD32" name="pitches">
109             <fieldref>num_planes</fieldref>
110         </list>
111         <list type="CARD32" name="offsets">
112             <fieldref>num_planes</fieldref>
113         </list>
114         <list type="CARD8" name="data">
115             <fieldref>data_size</fieldref>
116         </list>
117         <!-- Some XPointer "obdata" for SHM use-->
118     </struct>
119     
120     <struct name="AttributeInfo">
121         <field type="CARD32" name="flags" />
122         <field type="INT32" name="min" />
123         <field type="INT32" name="max" />
124         <field type="CARD32" name="size" />
125         <list type="char" name="name">
126             <fieldref>size</fieldref>
127         </list>
128     </struct>
129
130     <struct name="ImageFormatInfo">
131         <field type="CARD32" name="id" />
132         <field type="CARD8" name="type" />
133         <field type="CARD8" name="byte_order" />
134         <field type="CARD16" name="pad1" />
135         <list type="CARD8" name="guid">
136             <value>16</value>
137         </list>
138         <field type="CARD8" name="bpp" />
139         <field type="CARD8" name="num_planes" />
140         <field type="CARD16" name="pad2" />
141         <field type="CARD8" name="depth" />
142         <field type="CARD8" name="pad3" />
143         <field type="CARD16" name="pad4" />
144         <field type="CARD32" name="red_mask" />
145         <field type="CARD32" name="green_mask" />
146         <field type="CARD32" name="blue_mask" />
147         <field type="CARD8" name="format" />
148         <field type="CARD8" name="pad5" />
149         <field type="CARD16" name="pad6" />
150         <field type="CARD32" name="y_sample_bits" />
151         <field type="CARD32" name="u_sample_bits" />
152         <field type="CARD32" name="v_sample_bits" />
153         <field type="CARD32" name="vhorz_y_period" />
154         <field type="CARD32" name="vhorz_u_period" />
155         <field type="CARD32" name="vhorz_v_period" />
156         <field type="CARD32" name="vvert_y_period" />
157         <field type="CARD32" name="vvert_u_period" />
158         <field type="CARD32" name="vvert_v_period" />
159         <list type="CARD8" name="vcomp_order">
160             <value>32</value>
161         </list>
162         <field type="CARD8" name="vscanline_order" />
163         <field type="CARD8" name="vpad7" />
164         <field type="CARD16" name="vpad8" />
165         <field type="CARD32" name="vpad9" />
166         <field type="CARD32" name="vpad10" />
167     </struct>
168
169
170     <!-- Errors -->
171     <error name="BadPort" number="0"/>
172     <error name="BadEncoding" number="1"/>
173     <error name="BadControl" number="2"/>
174
175     <!-- Events -->
176     <event name="VideoNotify" number="0">
177         <field type="BYTE" name="reason" />
178         <field type="TIMESTAMP" name="time" />
179         <field type="DRAWABLE" name="drawable" />
180         <field type="PORT" name="port" />
181     </event>
182
183     <event name="PortNotify" number="1">
184         <pad bytes="1" />
185         <field type="TIMESTAMP" name="time" />
186         <field type="PORT" name="port" />
187         <field type="ATOM" name="attribute" />
188         <field type="INT32" name="value" />
189     </event>
190     
191     
192     <!-- Requests -->
193     <request name="QueryExtension" opcode="0">
194         <reply>
195             <pad bytes="1" />
196             <field type="CARD16" name="major" />
197             <field type="CARD16" name="minor" />
198         </reply>
199     </request>
200
201     <request name="QueryAdaptors" opcode="1">
202         <field type="WINDOW" name="window" />
203         <reply>
204             <pad bytes="1" />
205             <field type="CARD16" name="num_adaptors" />
206             <pad bytes="22" />
207             <list type="AdaptorInfo" name="info">
208                 <fieldref>num_adaptors</fieldref>
209             </list>
210         </reply>
211     </request>
212
213     <request name="QueryEncodings" opcode="2">
214         <field type="PORT" name="port" />
215         <reply>
216             <pad bytes="1" />
217             <field type="CARD16" name="num_encodings" />
218             <!--
219             In Xvproto.h this padding is 24 bytes
220             in actuality it is 22 bytes
221             -->
222             <pad bytes="22" />
223             <list type="EncodingInfo" name="info">
224                 <fieldref>num_encodings</fieldref>
225             </list>
226         </reply>
227     </request>
228
229     <request name="GrabPort" opcode="3">
230         <field type="PORT" name="port" />
231         <field type="TIMESTAMP" name="time" />
232         <reply>
233             <field type="BYTE" name="result" />
234         </reply>
235     </request>
236
237     <request name="UngrabPort" opcode="4">
238         <field type="PORT" name="port" />
239         <field type="TIMESTAMP" name="time" />
240     </request>
241
242     <request name="PutVideo" opcode="5">
243         <field type="PORT" name="port" />
244         <field type="DRAWABLE" name="drawable" />
245         <field type="GCONTEXT" name="gc" />
246         <field type="INT16" name="vid_x" />
247         <field type="INT16" name="vid_y" />
248         <field type="CARD16" name="vid_w" />
249         <field type="CARD16" name="vid_h" />
250         <field type="INT16" name="drw_x" />
251         <field type="INT16" name="drw_y" />
252         <field type="CARD16" name="drw_w" />
253         <field type="CARD16" name="drw_h" />
254     </request>
255
256     <request name="PutStill" opcode="6">
257         <field type="PORT" name="port" />
258         <field type="DRAWABLE" name="drawable" />
259         <field type="GCONTEXT" name="gc" />
260         <field type="INT16" name="vid_x" />
261         <field type="INT16" name="vid_y" />
262         <field type="CARD16" name="vid_w" />
263         <field type="CARD16" name="vid_h" />
264         <field type="INT16" name="drw_x" />
265         <field type="INT16" name="drw_y" />
266         <field type="CARD16" name="drw_w" />
267         <field type="CARD16" name="drw_h" />
268     </request>
269
270     <request name="GetVideo" opcode="7">
271         <field type="PORT" name="port" />
272         <field type="DRAWABLE" name="drawable" />
273         <field type="GCONTEXT" name="gc" />
274         <field type="INT16" name="vid_x" />
275         <field type="INT16" name="vid_y" />
276         <field type="CARD16" name="vid_w" />
277         <field type="CARD16" name="vid_h" />
278         <field type="INT16" name="drw_x" />
279         <field type="INT16" name="drw_y" />
280         <field type="CARD16" name="drw_w" />
281         <field type="CARD16" name="drw_h" />
282     </request>
283
284     <request name="GetStill" opcode="8">
285         <field type="PORT" name="port" />
286         <field type="DRAWABLE" name="drawable" />
287         <field type="GCONTEXT" name="gc" />
288         <field type="INT16" name="vid_x" />
289         <field type="INT16" name="vid_y" />
290         <field type="CARD16" name="vid_w" />
291         <field type="CARD16" name="vid_h" />
292         <field type="INT16" name="drw_x" />
293         <field type="INT16" name="drw_y" />
294         <field type="CARD16" name="drw_w" />
295         <field type="CARD16" name="drw_h" />
296     </request>
297
298     <request name="StopVideo" opcode="9">
299         <field type="PORT" name="port" />
300         <field type="DRAWABLE" name="drawable" />
301     </request>
302
303     <request name="SelectVideoNotify" opcode="10">
304         <field type="DRAWABLE" name="drawable" />
305         <field type="BOOL" name="onoff" />
306     </request>
307
308     <request name="SelectPortNotify" opcode="11">
309         <field type="DRAWABLE" name="drawable" />
310         <field type="BOOL" name="onoff" />
311     </request>
312
313     <request name="QueryBestSize" opcode="12">
314         <field type="PORT" name="port" />
315         <field type="CARD16" name="vid_w" />
316         <field type="CARD16" name="vid_h" />
317         <field type="CARD16" name="drw_w" />
318         <field type="CARD16" name="drw_h" />
319         <field type="BOOL" name="motion" />
320         <reply>
321             <pad bytes="1" />
322             <field type="CARD16" name="actual_width" />
323             <field type="CARD16" name="actual_height" />
324         </reply>
325     </request>
326
327     <request name="SetPortAttribute" opcode="13">
328         <field type="PORT" name="port" />
329         <field type="ATOM" name="attribute" />
330         <field type="INT32" name="value" />
331     </request>
332
333     <request name="GetPortAttribute" opcode="14">
334         <field type="PORT" name="port" />
335         <field type="ATOM" name="attribute" />
336         <reply>
337             <pad bytes="1" />
338             <field type="INT32" name="value" />
339         </reply>
340     </request>
341
342     <!-- Not in the docs beyond this point :( -->
343
344     <request name="QueryPortAttributes" opcode="15">
345         <field type="PORT" name="port" />
346         <reply>
347             <pad bytes="1" />
348             <field type="CARD32" name="num_attributes" />
349             <field type="CARD32" name="text_size" />
350             <pad bytes="16" />
351             <list type="AttributeInfo" name="attributes">
352                 <fieldref>num_attributes</fieldref>
353             </list>
354         </reply>
355     </request>
356
357     <request name="ListImageFormats" opcode="16">
358         <field type="PORT" name="port" />
359         <reply>
360             <pad bytes="1" />
361             <field type="CARD32" name="num_formats" />
362             <pad bytes="20" />
363             <list type="ImageFormatInfo" name="format">
364                 <fieldref>num_formats</fieldref>
365             </list>
366         </reply>
367     </request>
368
369     <request name="QueryImageAttributes" opcode="17">
370         <field type="PORT" name="port" />
371         <field type="CARD32" name="id" />
372         <field type="CARD16" name="width" />
373         <field type="CARD16" name="height" />
374         <reply>
375             <pad bytes="1" />
376             <field type="CARD32" name="num_planes" />
377             <field type="CARD32" name="data_size" />
378             <field type="CARD16" name="width" />
379             <field type="CARD16" name="height" />
380             <pad bytes="12" />
381             <list type="CARD32" name="pitches">
382                 <fieldref>num_planes</fieldref>
383             </list>
384             <list type="CARD32" name="offsets">
385                 <fieldref>num_planes</fieldref>
386             </list>
387         </reply>
388     </request>
389
390     <request name="PutImage" opcode="18">
391         <field type="PORT" name="port" />
392         <field type="DRAWABLE" name="drawable" />
393         <field type="GCONTEXT" name="gc" />
394         <field type="CARD32" name="id" />
395         <field type="INT16" name="src_x" />
396         <field type="INT16" name="src_y" />
397         <field type="CARD16" name="src_w" />
398         <field type="CARD16" name="src_h" />
399         <field type="INT16" name="drw_x" />
400         <field type="INT16" name="drw_y" />
401         <field type="CARD16" name="drw_w" />
402         <field type="CARD16" name="drw_h" />
403         <field type="CARD16" name="width" />
404         <field type="CARD16" name="height" />
405         <localfield type="CARD32" name="data_size" />
406         <list type="CARD8" name="data">
407             <fieldref>data_size</fieldref>
408         </list>
409     </request>
410
411     <request name="ShmPutImage" opcode="19">
412         <field type="PORT" name="port" />
413         <field type="DRAWABLE" name="drawable" />
414         <field type="GCONTEXT" name="gc" />
415         <field type="SEG" name="shmseg" />
416         <field type="CARD32" name="id" />
417         <field type="CARD32" name="offset" />
418         <field type="INT16" name="src_x" />
419         <field type="INT16" name="src_y" />
420         <field type="CARD16" name="src_w" />
421         <field type="CARD16" name="src_h" />
422         <field type="INT16" name="drw_x" />
423         <field type="INT16" name="drw_y" />
424         <field type="CARD16" name="drw_w" />
425         <field type="CARD16" name="drw_h" />
426         <field type="CARD16" name="width" />
427         <field type="CARD16" name="height" />
428         <field type="CARD8" name="send_event" />
429     </request>
430 </xcb>