1 <?xml version="1.0" encoding="utf-8"?>
3 Copyright (C) 2006 Jeremy Kolb.
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:
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
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.
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.
29 <xcb header="xv" extension-xname="XVideo" extension-name="Xv" major-version="2" minor-version="2">
30 <import>xproto</import>
32 <!-- Implements version 2.2 of XV -->
35 <xidtype name="PORT" />
36 <xidtype name="ENCODING" />
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>
46 <enum name="ImageFormatInfoType">
51 <enum name="ImageFormatInfoFormat">
52 <item name="Packed" />
53 <item name="Planar" />
56 <enum name="AttributeFlag">
57 <item name="Gettable"><value>0x01</value></item>
58 <item name="Settable"><value>0x02</value></item>
61 <struct name="Rational">
62 <field type="INT32" name="numerator" />
63 <field type="INT32" name="denominator" />
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>
76 <list type="Format" name="formats">
77 <fieldref>num_formats</fieldref>
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" />
89 Xvproto.h has a padding CARD16 here but the name
92 <list type="char" name="name">
93 <fieldref>name_size</fieldref>
97 <struct name="Format">
98 <field type="VISUALID" name="visual" />
99 <field type="CARD8" name="depth" />
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>
111 <list type="CARD32" name="offsets">
112 <fieldref>num_planes</fieldref>
114 <list type="CARD8" name="data">
115 <fieldref>data_size</fieldref>
117 <!-- Some XPointer "obdata" for SHM use-->
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>
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">
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">
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" />
171 <error name="BadPort" number="0"/>
172 <error name="BadEncoding" number="1"/>
173 <error name="BadControl" number="2"/>
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" />
183 <event name="PortNotify" number="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" />
193 <request name="QueryExtension" opcode="0">
196 <field type="CARD16" name="major" />
197 <field type="CARD16" name="minor" />
201 <request name="QueryAdaptors" opcode="1">
202 <field type="WINDOW" name="window" />
205 <field type="CARD16" name="num_adaptors" />
207 <list type="AdaptorInfo" name="info">
208 <fieldref>num_adaptors</fieldref>
213 <request name="QueryEncodings" opcode="2">
214 <field type="PORT" name="port" />
217 <field type="CARD16" name="num_encodings" />
219 In Xvproto.h this padding is 24 bytes
220 in actuality it is 22 bytes
223 <list type="EncodingInfo" name="info">
224 <fieldref>num_encodings</fieldref>
229 <request name="GrabPort" opcode="3">
230 <field type="PORT" name="port" />
231 <field type="TIMESTAMP" name="time" />
233 <field type="BYTE" name="result" />
237 <request name="UngrabPort" opcode="4">
238 <field type="PORT" name="port" />
239 <field type="TIMESTAMP" name="time" />
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" />
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" />
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" />
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" />
298 <request name="StopVideo" opcode="9">
299 <field type="PORT" name="port" />
300 <field type="DRAWABLE" name="drawable" />
303 <request name="SelectVideoNotify" opcode="10">
304 <field type="DRAWABLE" name="drawable" />
305 <field type="BOOL" name="onoff" />
308 <request name="SelectPortNotify" opcode="11">
309 <field type="DRAWABLE" name="drawable" />
310 <field type="BOOL" name="onoff" />
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" />
322 <field type="CARD16" name="actual_width" />
323 <field type="CARD16" name="actual_height" />
327 <request name="SetPortAttribute" opcode="13">
328 <field type="PORT" name="port" />
329 <field type="ATOM" name="attribute" />
330 <field type="INT32" name="value" />
333 <request name="GetPortAttribute" opcode="14">
334 <field type="PORT" name="port" />
335 <field type="ATOM" name="attribute" />
338 <field type="INT32" name="value" />
342 <!-- Not in the docs beyond this point :( -->
344 <request name="QueryPortAttributes" opcode="15">
345 <field type="PORT" name="port" />
348 <field type="CARD32" name="num_attributes" />
349 <field type="CARD32" name="text_size" />
351 <list type="AttributeInfo" name="attributes">
352 <fieldref>num_attributes</fieldref>
357 <request name="ListImageFormats" opcode="16">
358 <field type="PORT" name="port" />
361 <field type="CARD32" name="num_formats" />
363 <list type="ImageFormatInfo" name="format">
364 <fieldref>num_formats</fieldref>
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" />
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" />
381 <list type="CARD32" name="pitches">
382 <fieldref>num_planes</fieldref>
384 <list type="CARD32" name="offsets">
385 <fieldref>num_planes</fieldref>
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>
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" />