PageRenderTime 64ms CodeModel.GetById 14ms RepoModel.GetById 2ms app.codeStats 0ms

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

https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk
C Header | 433 lines | 335 code | 45 blank | 53 comment | 0 complexity | f5d83666534efe93f05d1a05a2196569 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/Xvlib.h,v 1.3 1999/12/11 19:28:48 mvojkovi Exp $ */
  21. #ifndef XVLIB_H
  22. #define XVLIB_H
  23. /*
  24. ** File:
  25. **
  26. ** Xvlib.h --- Xv library public header file
  27. **
  28. ** Author:
  29. **
  30. ** David Carver (Digital Workstation Engineering/Project Athena)
  31. **
  32. ** Revisions:
  33. **
  34. ** 26.06.91 Carver
  35. ** - changed XvFreeAdaptors to XvFreeAdaptorInfo
  36. ** - changed XvFreeEncodings to XvFreeEncodingInfo
  37. **
  38. ** 11.06.91 Carver
  39. ** - changed SetPortControl to SetPortAttribute
  40. ** - changed GetPortControl to GetPortAttribute
  41. ** - changed QueryBestSize
  42. **
  43. ** 05.15.91 Carver
  44. ** - version 2.0 upgrade
  45. **
  46. ** 01.24.91 Carver
  47. ** - version 1.4 upgrade
  48. **
  49. */
  50. #include <X11/Xfuncproto.h>
  51. #include "Xv.h"
  52. #include "SDL_name.h"
  53. typedef struct {
  54. int numerator;
  55. int denominator;
  56. } SDL_NAME(XvRational);
  57. typedef struct {
  58. int flags; /* XvGettable, XvSettable */
  59. int min_value;
  60. int max_value;
  61. char *name;
  62. } SDL_NAME(XvAttribute);
  63. typedef struct {
  64. XvEncodingID encoding_id;
  65. char *name;
  66. unsigned long width;
  67. unsigned long height;
  68. SDL_NAME(XvRational) rate;
  69. unsigned long num_encodings;
  70. } SDL_NAME(XvEncodingInfo);
  71. typedef struct {
  72. char depth;
  73. unsigned long visual_id;
  74. } SDL_NAME(XvFormat);
  75. typedef struct {
  76. XvPortID base_id;
  77. unsigned long num_ports;
  78. char type;
  79. char *name;
  80. unsigned long num_formats;
  81. SDL_NAME(XvFormat) *formats;
  82. unsigned long num_adaptors;
  83. } SDL_NAME(XvAdaptorInfo);
  84. typedef struct {
  85. int type;
  86. unsigned long serial; /* # of last request processed by server */
  87. Bool send_event; /* true if this came from a SendEvent request */
  88. Display *display; /* Display the event was read from */
  89. Drawable drawable; /* drawable */
  90. unsigned long reason; /* what generated this event */
  91. XvPortID port_id; /* what port */
  92. Time time; /* milliseconds */
  93. } SDL_NAME(XvVideoNotifyEvent);
  94. typedef struct {
  95. int type;
  96. unsigned long serial; /* # of last request processed by server */
  97. Bool send_event; /* true if this came from a SendEvent request */
  98. Display *display; /* Display the event was read from */
  99. XvPortID port_id; /* what port */
  100. Time time; /* milliseconds */
  101. Atom attribute; /* atom that identifies attribute */
  102. long value; /* value of attribute */
  103. } SDL_NAME(XvPortNotifyEvent);
  104. typedef union {
  105. int type;
  106. SDL_NAME(XvVideoNotifyEvent) xvvideo;
  107. SDL_NAME(XvPortNotifyEvent) xvport;
  108. long pad[24];
  109. } SDL_NAME(XvEvent);
  110. typedef struct {
  111. int id; /* Unique descriptor for the format */
  112. int type; /* XvRGB, XvYUV */
  113. int byte_order; /* LSBFirst, MSBFirst */
  114. char guid[16]; /* Globally Unique IDentifier */
  115. int bits_per_pixel;
  116. int format; /* XvPacked, XvPlanar */
  117. int num_planes;
  118. /* for RGB formats only */
  119. int depth;
  120. unsigned int red_mask;
  121. unsigned int green_mask;
  122. unsigned int blue_mask;
  123. /* for YUV formats only */
  124. unsigned int y_sample_bits;
  125. unsigned int u_sample_bits;
  126. unsigned int v_sample_bits;
  127. unsigned int horz_y_period;
  128. unsigned int horz_u_period;
  129. unsigned int horz_v_period;
  130. unsigned int vert_y_period;
  131. unsigned int vert_u_period;
  132. unsigned int vert_v_period;
  133. char component_order[32]; /* eg. UYVY */
  134. int scanline_order; /* XvTopToBottom, XvBottomToTop */
  135. } SDL_NAME(XvImageFormatValues);
  136. typedef struct {
  137. int id;
  138. int width, height;
  139. int data_size; /* bytes */
  140. int num_planes;
  141. int *pitches; /* bytes */
  142. int *offsets; /* bytes */
  143. char *data;
  144. XPointer obdata;
  145. } SDL_NAME(XvImage);
  146. _XFUNCPROTOBEGIN
  147. extern int SDL_NAME(XvQueryExtension)(
  148. #if NeedFunctionPrototypes
  149. Display* /* display */,
  150. unsigned int* /* p_version */,
  151. unsigned int* /* p_revision */,
  152. unsigned int* /* p_requestBase */,
  153. unsigned int* /* p_eventBase */,
  154. unsigned int* /* p_errorBase */
  155. #endif
  156. );
  157. extern int SDL_NAME(XvQueryAdaptors)(
  158. #if NeedFunctionPrototypes
  159. Display* /* display */,
  160. Window /* window */,
  161. unsigned int* /* p_nAdaptors */,
  162. SDL_NAME(XvAdaptorInfo)** /* p_pAdaptors */
  163. #endif
  164. );
  165. extern int SDL_NAME(XvQueryEncodings)(
  166. #if NeedFunctionPrototypes
  167. Display* /* display */,
  168. XvPortID /* port */,
  169. unsigned int* /* p_nEncoding */,
  170. SDL_NAME(XvEncodingInfo)** /* p_pEncoding */
  171. #endif
  172. );
  173. extern int SDL_NAME(XvPutVideo)(
  174. #if NeedFunctionPrototypes
  175. Display* /* display */,
  176. XvPortID /* port */,
  177. Drawable /* d */,
  178. GC /* gc */,
  179. int /* vx */,
  180. int /* vy */,
  181. unsigned int /* vw */,
  182. unsigned int /* vh */,
  183. int /* dx */,
  184. int /* dy */,
  185. unsigned int /* dw */,
  186. unsigned int /* dh */
  187. #endif
  188. );
  189. extern int SDL_NAME(XvPutStill)(
  190. #if NeedFunctionPrototypes
  191. Display* /* display */,
  192. XvPortID /* port */,
  193. Drawable /* d */,
  194. GC /* gc */,
  195. int /* vx */,
  196. int /* vy */,
  197. unsigned int /* vw */,
  198. unsigned int /* vh */,
  199. int /* dx */,
  200. int /* dy */,
  201. unsigned int /* dw */,
  202. unsigned int /* dh */
  203. #endif
  204. );
  205. extern int SDL_NAME(XvGetVideo)(
  206. #if NeedFunctionPrototypes
  207. Display* /* display */,
  208. XvPortID /* port */,
  209. Drawable /* d */,
  210. GC /* gc */,
  211. int /* vx */,
  212. int /* vy */,
  213. unsigned int /* vw */,
  214. unsigned int /* vh */,
  215. int /* dx */,
  216. int /* dy */,
  217. unsigned int /* dw */,
  218. unsigned int /* dh */
  219. #endif
  220. );
  221. extern int SDL_NAME(XvGetStill)(
  222. #if NeedFunctionPrototypes
  223. Display* /* display */,
  224. XvPortID /* port */,
  225. Drawable /* d */,
  226. GC /* gc */,
  227. int /* vx */,
  228. int /* vy */,
  229. unsigned int /* vw */,
  230. unsigned int /* vh */,
  231. int /* dx */,
  232. int /* dy */,
  233. unsigned int /* dw */,
  234. unsigned int /* dh */
  235. #endif
  236. );
  237. extern int SDL_NAME(XvStopVideo)(
  238. #if NeedFunctionPrototypes
  239. Display* /* display */,
  240. XvPortID /* port */,
  241. Drawable /* drawable */
  242. #endif
  243. );
  244. extern int SDL_NAME(XvGrabPort)(
  245. #if NeedFunctionPrototypes
  246. Display* /* display */,
  247. XvPortID /* port */,
  248. Time /* time */
  249. #endif
  250. );
  251. extern int SDL_NAME(XvUngrabPort)(
  252. #if NeedFunctionPrototypes
  253. Display* /* display */,
  254. XvPortID /* port */,
  255. Time /* time */
  256. #endif
  257. );
  258. extern int SDL_NAME(XvSelectVideoNotify)(
  259. #if NeedFunctionPrototypes
  260. Display* /* display */,
  261. Drawable /* drawable */,
  262. Bool /* onoff */
  263. #endif
  264. );
  265. extern int SDL_NAME(XvSelectPortNotify)(
  266. #if NeedFunctionPrototypes
  267. Display* /* display */,
  268. XvPortID /* port */,
  269. Bool /* onoff */
  270. #endif
  271. );
  272. extern int SDL_NAME(XvSetPortAttribute)(
  273. #if NeedFunctionPrototypes
  274. Display* /* display */,
  275. XvPortID /* port */,
  276. Atom /* attribute */,
  277. int /* value */
  278. #endif
  279. );
  280. extern int SDL_NAME(XvGetPortAttribute)(
  281. #if NeedFunctionPrototypes
  282. Display* /* display */,
  283. XvPortID /* port */,
  284. Atom /* attribute */,
  285. int* /* p_value */
  286. #endif
  287. );
  288. extern int SDL_NAME(XvQueryBestSize)(
  289. #if NeedFunctionPrototypes
  290. Display* /* display */,
  291. XvPortID /* port */,
  292. Bool /* motion */,
  293. unsigned int /* vid_w */,
  294. unsigned int /* vid_h */,
  295. unsigned int /* drw_w */,
  296. unsigned int /* drw_h */,
  297. unsigned int* /* p_actual_width */,
  298. unsigned int* /* p_actual_width */
  299. #endif
  300. );
  301. extern SDL_NAME(XvAttribute)* SDL_NAME(XvQueryPortAttributes)(
  302. #if NeedFunctionPrototypes
  303. Display* /* display */,
  304. XvPortID /* port */,
  305. int* /* number */
  306. #endif
  307. );
  308. extern void SDL_NAME(XvFreeAdaptorInfo)(
  309. #if NeedFunctionPrototypes
  310. SDL_NAME(XvAdaptorInfo)* /* adaptors */
  311. #endif
  312. );
  313. extern void SDL_NAME(XvFreeEncodingInfo)(
  314. #if NeedFunctionPrototypes
  315. SDL_NAME(XvEncodingInfo)* /* encodings */
  316. #endif
  317. );
  318. extern SDL_NAME(XvImageFormatValues) * SDL_NAME(XvListImageFormats) (
  319. #if NeedFunctionPrototypes
  320. Display *display,
  321. XvPortID port_id,
  322. int *count_return
  323. #endif
  324. );
  325. extern SDL_NAME(XvImage) * SDL_NAME(XvCreateImage) (
  326. #if NeedFunctionPrototypes
  327. Display *display,
  328. XvPortID port,
  329. int id,
  330. char *data,
  331. int width,
  332. int height
  333. #endif
  334. );
  335. extern int SDL_NAME(XvPutImage) (
  336. #if NeedFunctionPrototypes
  337. Display *display,
  338. XvPortID id,
  339. Drawable d,
  340. GC gc,
  341. SDL_NAME(XvImage) *image,
  342. int src_x,
  343. int src_y,
  344. unsigned int src_w,
  345. unsigned int src_h,
  346. int dest_x,
  347. int dest_y,
  348. unsigned int dest_w,
  349. unsigned int dest_h
  350. #endif
  351. );
  352. extern int SDL_NAME(XvShmPutImage) (
  353. #if NeedFunctionPrototypes
  354. Display *display,
  355. XvPortID id,
  356. Drawable d,
  357. GC gc,
  358. SDL_NAME(XvImage) *image,
  359. int src_x,
  360. int src_y,
  361. unsigned int src_w,
  362. unsigned int src_h,
  363. int dest_x,
  364. int dest_y,
  365. unsigned int dest_w,
  366. unsigned int dest_h,
  367. Bool send_event
  368. #endif
  369. );
  370. #ifdef _XSHM_H_
  371. extern SDL_NAME(XvImage) * SDL_NAME(XvShmCreateImage) (
  372. #if NeedFunctionPrototypes
  373. Display *display,
  374. XvPortID port,
  375. int id,
  376. char* data,
  377. int width,
  378. int height,
  379. XShmSegmentInfo *shminfo
  380. #endif
  381. );
  382. #endif
  383. _XFUNCPROTOEND
  384. #endif /* XVLIB_H */