Mercurial > sdl-ios-xcode
comparison src/video/Xext/extensions/Xvproto.h @ 292:eadc0746dfaf
Added SDL_LockRect() and SDL_UnlockRect()
Incorporated XFree86 extension libraries into the source
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 05 Mar 2002 19:55:32 +0000 |
parents | |
children | 782fd950bd46 |
comparison
equal
deleted
inserted
replaced
291:68a8a8237c09 | 292:eadc0746dfaf |
---|---|
1 /*********************************************************** | |
2 Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, | |
3 and the Massachusetts Institute of Technology, Cambridge, Massachusetts. | |
4 | |
5 All Rights Reserved | |
6 | |
7 Permission to use, copy, modify, and distribute this software and its | |
8 documentation for any purpose and without fee is hereby granted, | |
9 provided that the above copyright notice appear in all copies and that | |
10 both that copyright notice and this permission notice appear in | |
11 supporting documentation, and that the names of Digital or MIT not be | |
12 used in advertising or publicity pertaining to distribution of the | |
13 software without specific, written prior permission. | |
14 | |
15 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | |
16 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | |
17 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | |
18 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
19 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
20 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
21 SOFTWARE. | |
22 | |
23 ******************************************************************/ | |
24 /* $XFree86: xc/include/extensions/Xvproto.h,v 1.6 2001/05/07 21:37:12 tsi Exp $ */ | |
25 | |
26 #ifndef XVPROTO_H | |
27 #define XVPROTO_H | |
28 /* | |
29 ** File: | |
30 ** | |
31 ** Xvproto.h --- Xv protocol header file | |
32 ** | |
33 ** Author: | |
34 ** | |
35 ** David Carver (Digital Workstation Engineering/Project Athena) | |
36 ** | |
37 ** Revisions: | |
38 ** | |
39 ** 11.06.91 Carver | |
40 ** - changed SetPortControl to SetPortAttribute | |
41 ** - changed GetPortControl to GetPortAttribute | |
42 ** - changed QueryBestSize | |
43 ** | |
44 ** 15.05.91 Carver | |
45 ** - version 2.0 upgrade | |
46 ** | |
47 ** 24.01.91 Carver | |
48 ** - version 1.4 upgrade | |
49 ** | |
50 */ | |
51 | |
52 #include <X11/Xmd.h> | |
53 | |
54 /* Symbols: These are undefined at the end of this file to restore the | |
55 values they have in Xv.h */ | |
56 | |
57 #define XvPortID CARD32 | |
58 #define XvEncodingID CARD32 | |
59 #define ShmSeg CARD32 | |
60 #define VisualID CARD32 | |
61 #define Drawable CARD32 | |
62 #define GContext CARD32 | |
63 #define Time CARD32 | |
64 #define Atom CARD32 | |
65 | |
66 /* Structures */ | |
67 | |
68 typedef struct { | |
69 INT32 numerator B32; | |
70 INT32 denominator B32; | |
71 } xvRational; | |
72 #define sz_xvRational 8 | |
73 | |
74 typedef struct { | |
75 XvPortID base_id B32; | |
76 CARD16 name_size B16; | |
77 CARD16 num_ports B16; | |
78 CARD16 num_formats B16; | |
79 CARD8 type; | |
80 CARD8 pad; | |
81 } xvAdaptorInfo; | |
82 #define sz_xvAdaptorInfo 12 | |
83 | |
84 typedef struct { | |
85 XvEncodingID encoding B32; | |
86 CARD16 name_size B16; | |
87 CARD16 width B16, height B16; | |
88 xvRational rate; | |
89 CARD16 pad B16; | |
90 } xvEncodingInfo; | |
91 #define sz_xvEncodingInfo (12 + sz_xvRational) | |
92 | |
93 typedef struct { | |
94 VisualID visual B32; | |
95 CARD8 depth; | |
96 CARD8 pad1; | |
97 CARD16 pad2 B16; | |
98 } xvFormat; | |
99 #define sz_xvFormat 8 | |
100 | |
101 typedef struct { | |
102 CARD32 flags B32; | |
103 INT32 min B32; | |
104 INT32 max B32; | |
105 CARD32 size B32; | |
106 } xvAttributeInfo; | |
107 #define sz_xvAttributeInfo 16 | |
108 | |
109 typedef struct { | |
110 CARD32 id B32; | |
111 CARD8 type; | |
112 CARD8 byte_order; | |
113 CARD16 pad1 B16; | |
114 CARD8 guid[16]; | |
115 CARD8 bpp; | |
116 CARD8 num_planes; | |
117 CARD16 pad2 B16; | |
118 CARD8 depth; | |
119 CARD8 pad3; | |
120 CARD16 pad4 B16; | |
121 CARD32 red_mask B32; | |
122 CARD32 green_mask B32; | |
123 CARD32 blue_mask B32; | |
124 CARD8 format; | |
125 CARD8 pad5; | |
126 CARD16 pad6 B16; | |
127 CARD32 y_sample_bits B32; | |
128 CARD32 u_sample_bits B32; | |
129 CARD32 v_sample_bits B32; | |
130 CARD32 horz_y_period B32; | |
131 CARD32 horz_u_period B32; | |
132 CARD32 horz_v_period B32; | |
133 CARD32 vert_y_period B32; | |
134 CARD32 vert_u_period B32; | |
135 CARD32 vert_v_period B32; | |
136 CARD8 comp_order[32]; | |
137 CARD8 scanline_order; | |
138 CARD8 pad7; | |
139 CARD16 pad8 B16; | |
140 CARD32 pad9 B32; | |
141 CARD32 pad10 B32; | |
142 } xvImageFormatInfo; | |
143 #define sz_xvImageFormatInfo 128 | |
144 | |
145 | |
146 /* Requests */ | |
147 | |
148 #define xv_QueryExtension 0 | |
149 #define xv_QueryAdaptors 1 | |
150 #define xv_QueryEncodings 2 | |
151 #define xv_GrabPort 3 | |
152 #define xv_UngrabPort 4 | |
153 #define xv_PutVideo 5 | |
154 #define xv_PutStill 6 | |
155 #define xv_GetVideo 7 | |
156 #define xv_GetStill 8 | |
157 #define xv_StopVideo 9 | |
158 #define xv_SelectVideoNotify 10 | |
159 #define xv_SelectPortNotify 11 | |
160 #define xv_QueryBestSize 12 | |
161 #define xv_SetPortAttribute 13 | |
162 #define xv_GetPortAttribute 14 | |
163 #define xv_QueryPortAttributes 15 | |
164 #define xv_ListImageFormats 16 | |
165 #define xv_QueryImageAttributes 17 | |
166 #define xv_PutImage 18 | |
167 #define xv_ShmPutImage 19 | |
168 #define xv_LastRequest xv_ShmPutImage | |
169 | |
170 #define xvNumRequests (xv_LastRequest + 1) | |
171 | |
172 typedef struct { | |
173 CARD8 reqType; | |
174 CARD8 xvReqType; | |
175 CARD16 length B16; | |
176 } xvQueryExtensionReq; | |
177 #define sz_xvQueryExtensionReq 4 | |
178 | |
179 typedef struct { | |
180 CARD8 reqType; | |
181 CARD8 xvReqType; | |
182 CARD16 length B16; | |
183 CARD32 window B32; | |
184 } xvQueryAdaptorsReq; | |
185 #define sz_xvQueryAdaptorsReq 8 | |
186 | |
187 typedef struct { | |
188 CARD8 reqType; | |
189 CARD8 xvReqType; | |
190 CARD16 length B16; | |
191 CARD32 port B32; | |
192 } xvQueryEncodingsReq; | |
193 #define sz_xvQueryEncodingsReq 8 | |
194 | |
195 typedef struct { | |
196 CARD8 reqType; | |
197 CARD8 xvReqType; | |
198 CARD16 length B16; | |
199 XvPortID port B32; | |
200 Drawable drawable B32; | |
201 GContext gc B32; | |
202 INT16 vid_x B16; | |
203 INT16 vid_y B16; | |
204 CARD16 vid_w B16; | |
205 CARD16 vid_h B16; | |
206 INT16 drw_x B16; | |
207 INT16 drw_y B16; | |
208 CARD16 drw_w B16; | |
209 CARD16 drw_h B16; | |
210 } xvPutVideoReq; | |
211 #define sz_xvPutVideoReq 32 | |
212 | |
213 typedef struct { | |
214 CARD8 reqType; | |
215 CARD8 xvReqType; | |
216 CARD16 length B16; | |
217 XvPortID port B32; | |
218 Drawable drawable B32; | |
219 GContext gc B32; | |
220 INT16 vid_x B16; | |
221 INT16 vid_y B16; | |
222 CARD16 vid_w B16; | |
223 CARD16 vid_h B16; | |
224 INT16 drw_x B16; | |
225 INT16 drw_y B16; | |
226 CARD16 drw_w B16; | |
227 CARD16 drw_h B16; | |
228 } xvPutStillReq; | |
229 #define sz_xvPutStillReq 32 | |
230 | |
231 typedef struct { | |
232 CARD8 reqType; | |
233 CARD8 xvReqType; | |
234 CARD16 length B16; | |
235 XvPortID port B32; | |
236 Drawable drawable B32; | |
237 GContext gc B32; | |
238 INT16 vid_x B16; | |
239 INT16 vid_y B16; | |
240 CARD16 vid_w B16; | |
241 CARD16 vid_h B16; | |
242 INT16 drw_x B16; | |
243 INT16 drw_y B16; | |
244 CARD16 drw_w B16; | |
245 CARD16 drw_h B16; | |
246 } xvGetVideoReq; | |
247 #define sz_xvGetVideoReq 32 | |
248 | |
249 typedef struct { | |
250 CARD8 reqType; | |
251 CARD8 xvReqType; | |
252 CARD16 length B16; | |
253 XvPortID port B32; | |
254 Drawable drawable B32; | |
255 GContext gc B32; | |
256 INT16 vid_x B16; | |
257 INT16 vid_y B16; | |
258 CARD16 vid_w B16; | |
259 CARD16 vid_h B16; | |
260 INT16 drw_x B16; | |
261 INT16 drw_y B16; | |
262 CARD16 drw_w B16; | |
263 CARD16 drw_h B16; | |
264 } xvGetStillReq; | |
265 #define sz_xvGetStillReq 32 | |
266 | |
267 typedef struct { | |
268 CARD8 reqType; | |
269 CARD8 xvReqType; | |
270 CARD16 length B16; | |
271 XvPortID port B32; | |
272 Time time B32; | |
273 } xvGrabPortReq; | |
274 #define sz_xvGrabPortReq 12 | |
275 | |
276 typedef struct { | |
277 CARD8 reqType; | |
278 CARD8 xvReqType; | |
279 CARD16 length B16; | |
280 XvPortID port B32; | |
281 Time time B32; | |
282 } xvUngrabPortReq; | |
283 #define sz_xvUngrabPortReq 12 | |
284 | |
285 typedef struct { | |
286 CARD8 reqType; | |
287 CARD8 xvReqType; | |
288 CARD16 length B16; | |
289 Drawable drawable B32; | |
290 BOOL onoff; | |
291 CARD8 pad1; | |
292 CARD16 pad2; | |
293 } xvSelectVideoNotifyReq; | |
294 #define sz_xvSelectVideoNotifyReq 12 | |
295 | |
296 typedef struct { | |
297 CARD8 reqType; | |
298 CARD8 xvReqType; | |
299 CARD16 length B16; | |
300 XvPortID port B32; | |
301 BOOL onoff; | |
302 CARD8 pad1; | |
303 CARD16 pad2; | |
304 } xvSelectPortNotifyReq; | |
305 #define sz_xvSelectPortNotifyReq 12 | |
306 | |
307 typedef struct { | |
308 CARD8 reqType; | |
309 CARD8 xvReqType; | |
310 CARD16 length B16; | |
311 XvPortID port B32; | |
312 Drawable drawable B32; | |
313 } xvStopVideoReq; | |
314 #define sz_xvStopVideoReq 12 | |
315 | |
316 typedef struct { | |
317 CARD8 reqType; | |
318 CARD8 xvReqType; | |
319 CARD16 length B16; | |
320 XvPortID port B32; | |
321 Atom attribute B32; | |
322 INT32 value B32; | |
323 } xvSetPortAttributeReq; | |
324 #define sz_xvSetPortAttributeReq 16 | |
325 | |
326 typedef struct { | |
327 CARD8 reqType; | |
328 CARD8 xvReqType; | |
329 CARD16 length B16; | |
330 XvPortID port B32; | |
331 Atom attribute B32; | |
332 } xvGetPortAttributeReq; | |
333 #define sz_xvGetPortAttributeReq 12 | |
334 | |
335 typedef struct { | |
336 CARD8 reqType; | |
337 CARD8 xvReqType; | |
338 CARD16 length B16; | |
339 XvPortID port B32; | |
340 CARD16 vid_w B16; | |
341 CARD16 vid_h B16; | |
342 CARD16 drw_w B16; | |
343 CARD16 drw_h B16; | |
344 CARD8 motion; | |
345 CARD8 pad1; | |
346 CARD16 pad2 B16; | |
347 } xvQueryBestSizeReq; | |
348 #define sz_xvQueryBestSizeReq 20 | |
349 | |
350 typedef struct { | |
351 CARD8 reqType; | |
352 CARD8 xvReqType; | |
353 CARD16 length B16; | |
354 XvPortID port B32; | |
355 } xvQueryPortAttributesReq; | |
356 #define sz_xvQueryPortAttributesReq 8 | |
357 | |
358 typedef struct { | |
359 CARD8 reqType; | |
360 CARD8 xvReqType; | |
361 CARD16 length B16; | |
362 XvPortID port B32; | |
363 Drawable drawable B32; | |
364 GContext gc B32; | |
365 CARD32 id B32; | |
366 INT16 src_x B16; | |
367 INT16 src_y B16; | |
368 CARD16 src_w B16; | |
369 CARD16 src_h B16; | |
370 INT16 drw_x B16; | |
371 INT16 drw_y B16; | |
372 CARD16 drw_w B16; | |
373 CARD16 drw_h B16; | |
374 CARD16 width B16; | |
375 CARD16 height B16; | |
376 } xvPutImageReq; | |
377 #define sz_xvPutImageReq 40 | |
378 | |
379 typedef struct { | |
380 CARD8 reqType; | |
381 CARD8 xvReqType; | |
382 CARD16 length B16; | |
383 XvPortID port B32; | |
384 Drawable drawable B32; | |
385 GContext gc B32; | |
386 ShmSeg shmseg B32; | |
387 CARD32 id B32; | |
388 CARD32 offset B32; | |
389 INT16 src_x B16; | |
390 INT16 src_y B16; | |
391 CARD16 src_w B16; | |
392 CARD16 src_h B16; | |
393 INT16 drw_x B16; | |
394 INT16 drw_y B16; | |
395 CARD16 drw_w B16; | |
396 CARD16 drw_h B16; | |
397 CARD16 width B16; | |
398 CARD16 height B16; | |
399 CARD8 send_event; | |
400 CARD8 pad1; | |
401 CARD16 pad2 B16; | |
402 } xvShmPutImageReq; | |
403 #define sz_xvShmPutImageReq 52 | |
404 | |
405 typedef struct { | |
406 CARD8 reqType; | |
407 CARD8 xvReqType; | |
408 CARD16 length B16; | |
409 XvPortID port B32; | |
410 } xvListImageFormatsReq; | |
411 #define sz_xvListImageFormatsReq 8 | |
412 | |
413 typedef struct { | |
414 CARD8 reqType; | |
415 CARD8 xvReqType; | |
416 CARD16 length B16; | |
417 CARD32 port B32; | |
418 CARD32 id B32; | |
419 CARD16 width B16; | |
420 CARD16 height B16; | |
421 } xvQueryImageAttributesReq; | |
422 #define sz_xvQueryImageAttributesReq 16 | |
423 | |
424 | |
425 /* Replies */ | |
426 | |
427 typedef struct _QueryExtensionReply { | |
428 BYTE type; /* X_Reply */ | |
429 CARD8 padb1; | |
430 CARD16 sequenceNumber B16; | |
431 CARD32 length B32; | |
432 CARD16 version B16; | |
433 CARD16 revision B16; | |
434 CARD32 padl4 B32; | |
435 CARD32 padl5 B32; | |
436 CARD32 padl6 B32; | |
437 CARD32 padl7 B32; | |
438 CARD32 padl8 B32; | |
439 } xvQueryExtensionReply; | |
440 #define sz_xvQueryExtensionReply 32 | |
441 | |
442 typedef struct _QueryAdaptorsReply { | |
443 BYTE type; /* X_Reply */ | |
444 CARD8 padb1; | |
445 CARD16 sequenceNumber B16; | |
446 CARD32 length B32; | |
447 CARD16 num_adaptors B16; | |
448 CARD16 pads3 B16; | |
449 CARD32 padl4 B32; | |
450 CARD32 padl5 B32; | |
451 CARD32 padl6 B32; | |
452 CARD32 padl7 B32; | |
453 CARD32 padl8 B32; | |
454 } xvQueryAdaptorsReply; | |
455 #define sz_xvQueryAdaptorsReply 32 | |
456 | |
457 typedef struct _QueryEncodingsReply { | |
458 BYTE type; /* X_Reply */ | |
459 CARD8 padb1; | |
460 CARD16 sequenceNumber B16; | |
461 CARD32 length B32; | |
462 CARD16 num_encodings B16; | |
463 CARD32 padl3 B32; | |
464 CARD32 padl4 B32; | |
465 CARD32 padl5 B32; | |
466 CARD32 padl6 B32; | |
467 CARD32 padl7 B32; | |
468 CARD32 padl8 B32; | |
469 } xvQueryEncodingsReply; | |
470 #define sz_xvQueryEncodingsReply 32 | |
471 | |
472 typedef struct { | |
473 BYTE type; /* X_Reply */ | |
474 BYTE result; | |
475 CARD16 sequenceNumber B16; | |
476 CARD32 length B32; /* 0 */ | |
477 CARD32 padl3 B32; | |
478 CARD32 padl4 B32; | |
479 CARD32 padl5 B32; | |
480 CARD32 padl6 B32; | |
481 CARD32 padl7 B32; | |
482 CARD32 padl8 B32; | |
483 } xvGrabPortReply; | |
484 #define sz_xvGrabPortReply 32 | |
485 | |
486 typedef struct { | |
487 BYTE type; /* X_Reply */ | |
488 BYTE padb1; | |
489 CARD16 sequenceNumber B16; | |
490 CARD32 length B32; /* 0 */ | |
491 INT32 value B32; | |
492 CARD32 padl4 B32; | |
493 CARD32 padl5 B32; | |
494 CARD32 padl6 B32; | |
495 CARD32 padl7 B32; | |
496 CARD32 padl8 B32; | |
497 } xvGetPortAttributeReply; | |
498 #define sz_xvGetPortAttributeReply 32 | |
499 | |
500 typedef struct { | |
501 BYTE type; /* X_Reply */ | |
502 BYTE padb1; | |
503 CARD16 sequenceNumber B16; | |
504 CARD32 length B32; /* 0 */ | |
505 CARD16 actual_width B16; | |
506 CARD16 actual_height B16; | |
507 CARD32 padl4 B32; | |
508 CARD32 padl5 B32; | |
509 CARD32 padl6 B32; | |
510 CARD32 padl7 B32; | |
511 CARD32 padl8 B32; | |
512 } xvQueryBestSizeReply; | |
513 #define sz_xvQueryBestSizeReply 32 | |
514 | |
515 typedef struct { | |
516 BYTE type; /* X_Reply */ | |
517 BYTE padb1; | |
518 CARD16 sequenceNumber B16; | |
519 CARD32 length B32; /* 0 */ | |
520 CARD32 num_attributes B32; | |
521 CARD32 text_size B32; | |
522 CARD32 padl5 B32; | |
523 CARD32 padl6 B32; | |
524 CARD32 padl7 B32; | |
525 CARD32 padl8 B32; | |
526 } xvQueryPortAttributesReply; | |
527 #define sz_xvQueryPortAttributesReply 32 | |
528 | |
529 typedef struct { | |
530 BYTE type; /* X_Reply */ | |
531 BYTE padb1; | |
532 CARD16 sequenceNumber B16; | |
533 CARD32 length B32; | |
534 CARD32 num_formats B32; | |
535 CARD32 padl4 B32; | |
536 CARD32 padl5 B32; | |
537 CARD32 padl6 B32; | |
538 CARD32 padl7 B32; | |
539 CARD32 padl8 B32; | |
540 } xvListImageFormatsReply; | |
541 #define sz_xvListImageFormatsReply 32 | |
542 | |
543 typedef struct { | |
544 BYTE type; /* X_Reply */ | |
545 BYTE padb1; | |
546 CARD16 sequenceNumber B16; | |
547 CARD32 length B32; | |
548 CARD32 num_planes B32; | |
549 CARD32 data_size B32; | |
550 CARD16 width B16; | |
551 CARD16 height B16; | |
552 CARD32 padl6 B32; | |
553 CARD32 padl7 B32; | |
554 CARD32 padl8 B32; | |
555 } xvQueryImageAttributesReply; | |
556 #define sz_xvQueryImageAttributesReply 32 | |
557 | |
558 /* DEFINE EVENT STRUCTURE */ | |
559 | |
560 typedef struct { | |
561 union { | |
562 struct { | |
563 BYTE type; | |
564 BYTE detail; | |
565 CARD16 sequenceNumber B16; | |
566 } u; | |
567 struct { | |
568 BYTE type; | |
569 BYTE reason; | |
570 CARD16 sequenceNumber B16; | |
571 Time time B32; | |
572 Drawable drawable B32; | |
573 XvPortID port B32; | |
574 CARD32 padl5 B32; | |
575 CARD32 padl6 B32; | |
576 CARD32 padl7 B32; | |
577 CARD32 padl8 B32; | |
578 } videoNotify; | |
579 struct { | |
580 BYTE type; | |
581 BYTE padb1; | |
582 CARD16 sequenceNumber B16; | |
583 Time time B32; | |
584 XvPortID port B32; | |
585 Atom attribute B32; | |
586 INT32 value B32; | |
587 CARD32 padl6 B32; | |
588 CARD32 padl7 B32; | |
589 CARD32 padl8 B32; | |
590 } portNotify; | |
591 } u; | |
592 } xvEvent; | |
593 | |
594 #undef XvPortID | |
595 #undef XvEncodingID | |
596 #undef ShmSeg | |
597 #undef VisualID | |
598 #undef Drawable | |
599 #undef GContext | |
600 #undef Time | |
601 #undef Atom | |
602 | |
603 #endif /* XVPROTO_H */ | |
604 |