PageRenderTime 61ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/external/qemu/distrib/sdl-1.2.15/src/video/Xext/extensions/Xvproto.h

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