VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/X11/extensions/Xvlib.h@ 99743

Last change on this file since 99743 was 69098, checked in by vboxsync, 7 years ago

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • Property svn:eol-style set to native
File size: 10.8 KB
Line 
1/***********************************************************
2Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
3and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Digital or MIT not be
12used in advertising or publicity pertaining to distribution of the
13software without specific, written prior permission.
14
15DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
16ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
17DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
18ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
20ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
21SOFTWARE.
22
23******************************************************************/
24/* $XFree86: xc/include/extensions/Xvlib.h,v 1.3 1999/12/11 19:28:48 mvojkovi Exp $ */
25
26#ifndef XVLIB_H
27#define XVLIB_H
28/*
29** File:
30**
31** Xvlib.h --- Xv library public header file
32**
33** Author:
34**
35** David Carver (Digital Workstation Engineering/Project Athena)
36**
37** Revisions:
38**
39** 26.06.91 Carver
40** - changed XvFreeAdaptors to XvFreeAdaptorInfo
41** - changed XvFreeEncodings to XvFreeEncodingInfo
42**
43** 11.06.91 Carver
44** - changed SetPortControl to SetPortAttribute
45** - changed GetPortControl to GetPortAttribute
46** - changed QueryBestSize
47**
48** 05.15.91 Carver
49** - version 2.0 upgrade
50**
51** 01.24.91 Carver
52** - version 1.4 upgrade
53**
54*/
55
56#include <X11/Xfuncproto.h>
57#include <X11/extensions/Xv.h>
58
59typedef struct {
60 int numerator;
61 int denominator;
62} XvRational;
63
64typedef struct {
65 int flags; /* XvGettable, XvSettable */
66 int min_value;
67 int max_value;
68 char *name;
69} XvAttribute;
70
71typedef struct {
72 XvEncodingID encoding_id;
73 char *name;
74 unsigned long width;
75 unsigned long height;
76 XvRational rate;
77 unsigned long num_encodings;
78} XvEncodingInfo;
79
80typedef struct {
81 char depth;
82 unsigned long visual_id;
83} XvFormat;
84
85typedef struct {
86 XvPortID base_id;
87 unsigned long num_ports;
88 char type;
89 char *name;
90 unsigned long num_formats;
91 XvFormat *formats;
92 unsigned long num_adaptors;
93} XvAdaptorInfo;
94
95typedef struct {
96 int type;
97 unsigned long serial; /* # of last request processed by server */
98 Bool send_event; /* true if this came from a SendEvent request */
99 Display *display; /* Display the event was read from */
100 Drawable drawable; /* drawable */
101 unsigned long reason; /* what generated this event */
102 XvPortID port_id; /* what port */
103 Time time; /* milliseconds */
104} XvVideoNotifyEvent;
105
106typedef struct {
107 int type;
108 unsigned long serial; /* # of last request processed by server */
109 Bool send_event; /* true if this came from a SendEvent request */
110 Display *display; /* Display the event was read from */
111 XvPortID port_id; /* what port */
112 Time time; /* milliseconds */
113 Atom attribute; /* atom that identifies attribute */
114 long value; /* value of attribute */
115} XvPortNotifyEvent;
116
117typedef union {
118 int type;
119 XvVideoNotifyEvent xvvideo;
120 XvPortNotifyEvent xvport;
121 long pad[24];
122} XvEvent;
123
124typedef struct {
125 int id; /* Unique descriptor for the format */
126 int type; /* XvRGB, XvYUV */
127 int byte_order; /* LSBFirst, MSBFirst */
128 char guid[16]; /* Globally Unique IDentifier */
129 int bits_per_pixel;
130 int format; /* XvPacked, XvPlanar */
131 int num_planes;
132
133 /* for RGB formats only */
134 int depth;
135 unsigned int red_mask;
136 unsigned int green_mask;
137 unsigned int blue_mask;
138
139 /* for YUV formats only */
140 unsigned int y_sample_bits;
141 unsigned int u_sample_bits;
142 unsigned int v_sample_bits;
143 unsigned int horz_y_period;
144 unsigned int horz_u_period;
145 unsigned int horz_v_period;
146 unsigned int vert_y_period;
147 unsigned int vert_u_period;
148 unsigned int vert_v_period;
149 char component_order[32]; /* eg. UYVY */
150 int scanline_order; /* XvTopToBottom, XvBottomToTop */
151} XvImageFormatValues;
152
153typedef struct {
154 int id;
155 int width, height;
156 int data_size; /* bytes */
157 int num_planes;
158 int *pitches; /* bytes */
159 int *offsets; /* bytes */
160 char *data;
161 XPointer obdata;
162} XvImage;
163
164_XFUNCPROTOBEGIN
165
166extern int XvQueryExtension(
167#if NeedFunctionPrototypes
168 Display* /* display */,
169 unsigned int* /* p_version */,
170 unsigned int* /* p_revision */,
171 unsigned int* /* p_requestBase */,
172 unsigned int* /* p_eventBase */,
173 unsigned int* /* p_errorBase */
174#endif
175);
176
177extern int XvQueryAdaptors(
178#if NeedFunctionPrototypes
179 Display* /* display */,
180 Window /* window */,
181 unsigned int* /* p_nAdaptors */,
182 XvAdaptorInfo** /* p_pAdaptors */
183#endif
184);
185
186extern int XvQueryEncodings(
187#if NeedFunctionPrototypes
188 Display* /* display */,
189 XvPortID /* port */,
190 unsigned int* /* p_nEncoding */,
191 XvEncodingInfo** /* p_pEncoding */
192#endif
193);
194
195extern int XvPutVideo(
196#if NeedFunctionPrototypes
197 Display* /* display */,
198 XvPortID /* port */,
199 Drawable /* d */,
200 GC /* gc */,
201 int /* vx */,
202 int /* vy */,
203 unsigned int /* vw */,
204 unsigned int /* vh */,
205 int /* dx */,
206 int /* dy */,
207 unsigned int /* dw */,
208 unsigned int /* dh */
209#endif
210);
211
212extern int XvPutStill(
213#if NeedFunctionPrototypes
214 Display* /* display */,
215 XvPortID /* port */,
216 Drawable /* d */,
217 GC /* gc */,
218 int /* vx */,
219 int /* vy */,
220 unsigned int /* vw */,
221 unsigned int /* vh */,
222 int /* dx */,
223 int /* dy */,
224 unsigned int /* dw */,
225 unsigned int /* dh */
226#endif
227);
228
229extern int XvGetVideo(
230#if NeedFunctionPrototypes
231 Display* /* display */,
232 XvPortID /* port */,
233 Drawable /* d */,
234 GC /* gc */,
235 int /* vx */,
236 int /* vy */,
237 unsigned int /* vw */,
238 unsigned int /* vh */,
239 int /* dx */,
240 int /* dy */,
241 unsigned int /* dw */,
242 unsigned int /* dh */
243#endif
244);
245
246extern int XvGetStill(
247#if NeedFunctionPrototypes
248 Display* /* display */,
249 XvPortID /* port */,
250 Drawable /* d */,
251 GC /* gc */,
252 int /* vx */,
253 int /* vy */,
254 unsigned int /* vw */,
255 unsigned int /* vh */,
256 int /* dx */,
257 int /* dy */,
258 unsigned int /* dw */,
259 unsigned int /* dh */
260#endif
261);
262
263extern int XvStopVideo(
264#if NeedFunctionPrototypes
265 Display* /* display */,
266 XvPortID /* port */,
267 Drawable /* drawable */
268#endif
269);
270
271extern int XvGrabPort(
272#if NeedFunctionPrototypes
273 Display* /* display */,
274 XvPortID /* port */,
275 Time /* time */
276#endif
277);
278
279extern int XvUngrabPort(
280#if NeedFunctionPrototypes
281 Display* /* display */,
282 XvPortID /* port */,
283 Time /* time */
284#endif
285);
286
287extern int XvSelectVideoNotify(
288#if NeedFunctionPrototypes
289 Display* /* display */,
290 Drawable /* drawable */,
291 Bool /* onoff */
292#endif
293);
294
295extern int XvSelectPortNotify(
296#if NeedFunctionPrototypes
297 Display* /* display */,
298 XvPortID /* port */,
299 Bool /* onoff */
300#endif
301);
302
303extern int XvSetPortAttribute(
304#if NeedFunctionPrototypes
305 Display* /* display */,
306 XvPortID /* port */,
307 Atom /* attribute */,
308 int /* value */
309#endif
310);
311
312extern int XvGetPortAttribute(
313#if NeedFunctionPrototypes
314 Display* /* display */,
315 XvPortID /* port */,
316 Atom /* attribute */,
317 int* /* p_value */
318#endif
319);
320
321extern int XvQueryBestSize(
322#if NeedFunctionPrototypes
323 Display* /* display */,
324 XvPortID /* port */,
325 Bool /* motion */,
326 unsigned int /* vid_w */,
327 unsigned int /* vid_h */,
328 unsigned int /* drw_w */,
329 unsigned int /* drw_h */,
330 unsigned int* /* p_actual_width */,
331 unsigned int* /* p_actual_width */
332#endif
333);
334
335extern XvAttribute* XvQueryPortAttributes(
336#if NeedFunctionPrototypes
337 Display* /* display */,
338 XvPortID /* port */,
339 int* /* number */
340#endif
341);
342
343
344extern void XvFreeAdaptorInfo(
345#if NeedFunctionPrototypes
346 XvAdaptorInfo* /* adaptors */
347#endif
348);
349
350extern void XvFreeEncodingInfo(
351#if NeedFunctionPrototypes
352 XvEncodingInfo* /* encodings */
353#endif
354);
355
356
357extern XvImageFormatValues * XvListImageFormats (
358#if NeedFunctionPrototypes
359 Display *display,
360 XvPortID port_id,
361 int *count_return
362#endif
363);
364
365extern XvImage * XvCreateImage (
366#if NeedFunctionPrototypes
367 Display *display,
368 XvPortID port,
369 int id,
370 char *data,
371 int width,
372 int height
373#endif
374);
375
376extern int XvPutImage (
377#if NeedFunctionPrototypes
378 Display *display,
379 XvPortID id,
380 Drawable d,
381 GC gc,
382 XvImage *image,
383 int src_x,
384 int src_y,
385 unsigned int src_w,
386 unsigned int src_h,
387 int dest_x,
388 int dest_y,
389 unsigned int dest_w,
390 unsigned int dest_h
391#endif
392);
393
394extern int XvShmPutImage (
395#if NeedFunctionPrototypes
396 Display *display,
397 XvPortID id,
398 Drawable d,
399 GC gc,
400 XvImage *image,
401 int src_x,
402 int src_y,
403 unsigned int src_w,
404 unsigned int src_h,
405 int dest_x,
406 int dest_y,
407 unsigned int dest_w,
408 unsigned int dest_h,
409 Bool send_event
410#endif
411);
412
413#ifdef _XSHM_H_
414
415extern XvImage * XvShmCreateImage (
416#if NeedFunctionPrototypes
417 Display *display,
418 XvPortID port,
419 int id,
420 char* data,
421 int width,
422 int height,
423 XShmSegmentInfo *shminfo
424#endif
425);
426
427#endif
428
429
430_XFUNCPROTOEND
431
432#endif /* XVLIB_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette