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"><bit>0</bit></item>
40 <item name="OutputMask"><bit>1</bit></item>
41 <item name="VideoMask"><bit>2</bit></item>
42 <item name="StillMask"><bit>3</bit></item>
43 <item name="ImageMask"><bit>4</bit></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"><bit>0</bit></item>
58 <item name="Settable"><bit>1</bit></item>
61 <enum name="VideoNotifyReason">
62 <item name="Started" />
63 <item name="Stopped" />
65 <item name="Preempted" />
66 <item name="HardError" />
69 <enum name="ScanlineOrder">
70 <item name="TopToBottom" />
71 <item name="BottomToTop" />
74 <enum name="GrabPortStatus">
75 <item name="Success" />
76 <item name="BadExtension" />
77 <item name="AlreadyGrabbed" />
78 <item name="InvalidTime" />
79 <item name="BadReply" />
80 <item name="BadAlloc" />
83 <struct name="Rational">
84 <field type="INT32" name="numerator" />
85 <field type="INT32" name="denominator" />
88 <struct name="Format">
89 <field type="VISUALID" name="visual" />
90 <field type="CARD8" name="depth" />
94 <struct name="AdaptorInfo">
95 <field type="PORT" name="base_id" />
96 <field type="CARD16" name="name_size" />
97 <field type="CARD16" name="num_ports" />
98 <field type="CARD16" name="num_formats" />
99 <field type="CARD8" name="type" mask="Type" />
101 <list type="char" name="name">
102 <fieldref>name_size</fieldref>
104 <list type="Format" name="formats">
105 <fieldref>num_formats</fieldref>
110 <struct name="EncodingInfo">
111 <field type="ENCODING" name="encoding" />
112 <field type="CARD16" name="name_size" />
113 <field type="CARD16" name="width" />
114 <field type="CARD16" name="height" />
116 Some versions of Xvproto.h incorrectly have
117 this padding after "rate".
120 <field type="Rational" name="rate" />
121 <list type="char" name="name">
122 <fieldref>name_size</fieldref>
126 <struct name="Image">
127 <field type="CARD32" name="id" />
128 <field type="CARD16" name="width" />
129 <field type="CARD16" name="height" />
130 <field type="CARD32" name="data_size" />
131 <field type="CARD32" name="num_planes" />
132 <list type="CARD32" name="pitches">
133 <fieldref>num_planes</fieldref>
135 <list type="CARD32" name="offsets">
136 <fieldref>num_planes</fieldref>
138 <list type="CARD8" name="data">
139 <fieldref>data_size</fieldref>
141 <!-- Some XPointer "obdata" for SHM use-->
144 <struct name="AttributeInfo">
145 <field type="CARD32" name="flags" mask="AttributeFlag" />
146 <field type="INT32" name="min" />
147 <field type="INT32" name="max" />
148 <field type="CARD32" name="size" />
149 <list type="char" name="name">
150 <fieldref>size</fieldref>
154 <struct name="ImageFormatInfo">
155 <field type="CARD32" name="id" />
156 <field type="CARD8" name="type" enum="ImageFormatInfoType" />
157 <field type="CARD8" name="byte_order" enum="ImageOrder" />
159 <list type="CARD8" name="guid">
162 <field type="CARD8" name="bpp" />
163 <field type="CARD8" name="num_planes" />
165 <field type="CARD8" name="depth" />
167 <field type="CARD32" name="red_mask" />
168 <field type="CARD32" name="green_mask" />
169 <field type="CARD32" name="blue_mask" />
170 <field type="CARD8" name="format" enum="ImageFormatInfoFormat" />
172 <field type="CARD32" name="y_sample_bits" />
173 <field type="CARD32" name="u_sample_bits" />
174 <field type="CARD32" name="v_sample_bits" />
175 <field type="CARD32" name="vhorz_y_period" />
176 <field type="CARD32" name="vhorz_u_period" />
177 <field type="CARD32" name="vhorz_v_period" />
178 <field type="CARD32" name="vvert_y_period" />
179 <field type="CARD32" name="vvert_u_period" />
180 <field type="CARD32" name="vvert_v_period" />
181 <list type="CARD8" name="vcomp_order">
184 <field type="CARD8" name="vscanline_order" enum="ScanlineOrder" />
190 <error name="BadPort" number="0"/>
191 <error name="BadEncoding" number="1"/>
192 <error name="BadControl" number="2"/>
195 <event name="VideoNotify" number="0">
196 <field type="BYTE" name="reason" enum="VideoNotifyReason" />
197 <field type="TIMESTAMP" name="time" />
198 <field type="DRAWABLE" name="drawable" />
199 <field type="PORT" name="port" />
202 <event name="PortNotify" number="1">
204 <field type="TIMESTAMP" name="time" />
205 <field type="PORT" name="port" />
206 <field type="ATOM" name="attribute" />
207 <field type="INT32" name="value" />
212 <request name="QueryExtension" opcode="0">
215 <field type="CARD16" name="major" />
216 <field type="CARD16" name="minor" />
220 <request name="QueryAdaptors" opcode="1">
221 <field type="WINDOW" name="window" />
224 <field type="CARD16" name="num_adaptors" />
226 <list type="AdaptorInfo" name="info">
227 <fieldref>num_adaptors</fieldref>
232 <request name="QueryEncodings" opcode="2">
233 <field type="PORT" name="port" />
236 <field type="CARD16" name="num_encodings" />
238 In Xvproto.h this padding is 24 bytes
239 in actuality it is 22 bytes
242 <list type="EncodingInfo" name="info">
243 <fieldref>num_encodings</fieldref>
248 <request name="GrabPort" opcode="3">
249 <field type="PORT" name="port" />
250 <field type="TIMESTAMP" name="time" altenum="Time" />
252 <field type="BYTE" name="result" enum="GrabPortStatus" />
256 <request name="UngrabPort" opcode="4">
257 <field type="PORT" name="port" />
258 <field type="TIMESTAMP" name="time" altenum="Time" />
261 <request name="PutVideo" opcode="5">
262 <field type="PORT" name="port" />
263 <field type="DRAWABLE" name="drawable" />
264 <field type="GCONTEXT" name="gc" />
265 <field type="INT16" name="vid_x" />
266 <field type="INT16" name="vid_y" />
267 <field type="CARD16" name="vid_w" />
268 <field type="CARD16" name="vid_h" />
269 <field type="INT16" name="drw_x" />
270 <field type="INT16" name="drw_y" />
271 <field type="CARD16" name="drw_w" />
272 <field type="CARD16" name="drw_h" />
275 <request name="PutStill" opcode="6">
276 <field type="PORT" name="port" />
277 <field type="DRAWABLE" name="drawable" />
278 <field type="GCONTEXT" name="gc" />
279 <field type="INT16" name="vid_x" />
280 <field type="INT16" name="vid_y" />
281 <field type="CARD16" name="vid_w" />
282 <field type="CARD16" name="vid_h" />
283 <field type="INT16" name="drw_x" />
284 <field type="INT16" name="drw_y" />
285 <field type="CARD16" name="drw_w" />
286 <field type="CARD16" name="drw_h" />
289 <request name="GetVideo" opcode="7">
290 <field type="PORT" name="port" />
291 <field type="DRAWABLE" name="drawable" />
292 <field type="GCONTEXT" name="gc" />
293 <field type="INT16" name="vid_x" />
294 <field type="INT16" name="vid_y" />
295 <field type="CARD16" name="vid_w" />
296 <field type="CARD16" name="vid_h" />
297 <field type="INT16" name="drw_x" />
298 <field type="INT16" name="drw_y" />
299 <field type="CARD16" name="drw_w" />
300 <field type="CARD16" name="drw_h" />
303 <request name="GetStill" opcode="8">
304 <field type="PORT" name="port" />
305 <field type="DRAWABLE" name="drawable" />
306 <field type="GCONTEXT" name="gc" />
307 <field type="INT16" name="vid_x" />
308 <field type="INT16" name="vid_y" />
309 <field type="CARD16" name="vid_w" />
310 <field type="CARD16" name="vid_h" />
311 <field type="INT16" name="drw_x" />
312 <field type="INT16" name="drw_y" />
313 <field type="CARD16" name="drw_w" />
314 <field type="CARD16" name="drw_h" />
317 <request name="StopVideo" opcode="9">
318 <field type="PORT" name="port" />
319 <field type="DRAWABLE" name="drawable" />
322 <request name="SelectVideoNotify" opcode="10">
323 <field type="DRAWABLE" name="drawable" />
324 <field type="BOOL" name="onoff" />
328 <request name="SelectPortNotify" opcode="11">
329 <field type="PORT" name="port" />
330 <field type="BOOL" name="onoff" />
334 <request name="QueryBestSize" opcode="12">
335 <field type="PORT" name="port" />
336 <field type="CARD16" name="vid_w" />
337 <field type="CARD16" name="vid_h" />
338 <field type="CARD16" name="drw_w" />
339 <field type="CARD16" name="drw_h" />
340 <field type="BOOL" name="motion" />
344 <field type="CARD16" name="actual_width" />
345 <field type="CARD16" name="actual_height" />
349 <request name="SetPortAttribute" opcode="13">
350 <field type="PORT" name="port" />
351 <field type="ATOM" name="attribute" />
352 <field type="INT32" name="value" />
355 <request name="GetPortAttribute" opcode="14">
356 <field type="PORT" name="port" />
357 <field type="ATOM" name="attribute" />
360 <field type="INT32" name="value" />
364 <!-- Not in the docs beyond this point :( -->
366 <request name="QueryPortAttributes" opcode="15">
367 <field type="PORT" name="port" />
370 <field type="CARD32" name="num_attributes" />
371 <field type="CARD32" name="text_size" />
373 <list type="AttributeInfo" name="attributes">
374 <fieldref>num_attributes</fieldref>
379 <request name="ListImageFormats" opcode="16">
380 <field type="PORT" name="port" />
383 <field type="CARD32" name="num_formats" />
385 <list type="ImageFormatInfo" name="format">
386 <fieldref>num_formats</fieldref>
391 <request name="QueryImageAttributes" opcode="17">
392 <field type="PORT" name="port" />
393 <field type="CARD32" name="id" />
394 <field type="CARD16" name="width" />
395 <field type="CARD16" name="height" />
398 <field type="CARD32" name="num_planes" />
399 <field type="CARD32" name="data_size" />
400 <field type="CARD16" name="width" />
401 <field type="CARD16" name="height" />
403 <list type="CARD32" name="pitches">
404 <fieldref>num_planes</fieldref>
406 <list type="CARD32" name="offsets">
407 <fieldref>num_planes</fieldref>
412 <request name="PutImage" opcode="18">
413 <field type="PORT" name="port" />
414 <field type="DRAWABLE" name="drawable" />
415 <field type="GCONTEXT" name="gc" />
416 <field type="CARD32" name="id" />
417 <field type="INT16" name="src_x" />
418 <field type="INT16" name="src_y" />
419 <field type="CARD16" name="src_w" />
420 <field type="CARD16" name="src_h" />
421 <field type="INT16" name="drw_x" />
422 <field type="INT16" name="drw_y" />
423 <field type="CARD16" name="drw_w" />
424 <field type="CARD16" name="drw_h" />
425 <field type="CARD16" name="width" />
426 <field type="CARD16" name="height" />
427 <list type="CARD8" name="data" />
430 <request name="ShmPutImage" opcode="19">
431 <field type="PORT" name="port" />
432 <field type="DRAWABLE" name="drawable" />
433 <field type="GCONTEXT" name="gc" />
434 <field type="SEG" name="shmseg" />
435 <field type="CARD32" name="id" />
436 <field type="CARD32" name="offset" />
437 <field type="INT16" name="src_x" />
438 <field type="INT16" name="src_y" />
439 <field type="CARD16" name="src_w" />
440 <field type="CARD16" name="src_h" />
441 <field type="INT16" name="drw_x" />
442 <field type="INT16" name="drw_y" />
443 <field type="CARD16" name="drw_w" />
444 <field type="CARD16" name="drw_h" />
445 <field type="CARD16" name="width" />
446 <field type="CARD16" name="height" />
447 <field type="CARD8" name="send_event" />