VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.6.5/xvdix.h@ 68495

Last change on this file since 68495 was 49174, checked in by vboxsync, 11 years ago

Additions/x11: replace header files for X.Org Server 1.6.0 with those for version 1.6.5 due to an ABI bump in-between.

  • Property svn:eol-style set to native
File size: 8.4 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
25#ifndef XVDIX_H
26#define XVDIX_H
27/*
28** File:
29**
30** xvdix.h --- Xv device independent header file
31**
32** Author:
33**
34** David Carver (Digital Workstation Engineering/Project Athena)
35**
36** Revisions:
37**
38** 29.08.91 Carver
39** - removed UnrealizeWindow wrapper unrealizing windows no longer
40** preempts video
41**
42** 11.06.91 Carver
43** - changed SetPortControl to SetPortAttribute
44** - changed GetPortControl to GetPortAttribute
45** - changed QueryBestSize
46**
47** 15.05.91 Carver
48** - version 2.0 upgrade
49**
50** 24.01.91 Carver
51** - version 1.4 upgrade
52**
53*/
54
55#include "scrnintstr.h"
56#include <X11/extensions/Xvproto.h>
57
58extern unsigned long XvExtensionGeneration;
59extern unsigned long XvScreenGeneration;
60extern unsigned long XvResourceGeneration;
61
62extern int XvReqCode;
63extern int XvEventBase;
64extern int XvErrorBase;
65
66extern unsigned long XvRTPort;
67extern unsigned long XvRTEncoding;
68extern unsigned long XvRTGrab;
69extern unsigned long XvRTVideoNotify;
70extern unsigned long XvRTVideoNotifyList;
71extern unsigned long XvRTPortNotify;
72
73typedef struct {
74 int numerator;
75 int denominator;
76} XvRationalRec, *XvRationalPtr;
77
78typedef struct {
79 char depth;
80 unsigned long visual;
81} XvFormatRec, *XvFormatPtr;
82
83typedef struct {
84 unsigned long id;
85 ClientPtr client;
86} XvGrabRec, *XvGrabPtr;
87
88typedef struct _XvVideoNotifyRec {
89 struct _XvVideoNotifyRec *next;
90 ClientPtr client;
91 unsigned long id;
92 unsigned long mask;
93} XvVideoNotifyRec, *XvVideoNotifyPtr;
94
95typedef struct _XvPortNotifyRec {
96 struct _XvPortNotifyRec *next;
97 ClientPtr client;
98 unsigned long id;
99} XvPortNotifyRec, *XvPortNotifyPtr;
100
101typedef struct {
102 int id;
103 ScreenPtr pScreen;
104 char *name;
105 unsigned short width, height;
106 XvRationalRec rate;
107} XvEncodingRec, *XvEncodingPtr;
108
109typedef struct _XvAttributeRec {
110 int flags;
111 int min_value;
112 int max_value;
113 char *name;
114} XvAttributeRec, *XvAttributePtr;
115
116typedef struct {
117 int id;
118 int type;
119 int byte_order;
120 char guid[16];
121 int bits_per_pixel;
122 int format;
123 int num_planes;
124
125 /* for RGB formats only */
126 int depth;
127 unsigned int red_mask;
128 unsigned int green_mask;
129 unsigned int blue_mask;
130
131 /* for YUV formats only */
132 unsigned int y_sample_bits;
133 unsigned int u_sample_bits;
134 unsigned int v_sample_bits;
135 unsigned int horz_y_period;
136 unsigned int horz_u_period;
137 unsigned int horz_v_period;
138 unsigned int vert_y_period;
139 unsigned int vert_u_period;
140 unsigned int vert_v_period;
141 char component_order[32];
142 int scanline_order;
143} XvImageRec, *XvImagePtr;
144
145typedef struct {
146 unsigned long base_id;
147 unsigned char type;
148 char *name;
149 int nEncodings;
150 XvEncodingPtr pEncodings;
151 int nFormats;
152 XvFormatPtr pFormats;
153 int nAttributes;
154 XvAttributePtr pAttributes;
155 int nImages;
156 XvImagePtr pImages;
157 int nPorts;
158 struct _XvPortRec *pPorts;
159 ScreenPtr pScreen;
160 int (* ddAllocatePort)(unsigned long, struct _XvPortRec*,
161 struct _XvPortRec**);
162 int (* ddFreePort)(struct _XvPortRec*);
163 int (* ddPutVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
164 INT16, INT16, CARD16, CARD16,
165 INT16, INT16, CARD16, CARD16);
166 int (* ddPutStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
167 INT16, INT16, CARD16, CARD16,
168 INT16, INT16, CARD16, CARD16);
169 int (* ddGetVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
170 INT16, INT16, CARD16, CARD16,
171 INT16, INT16, CARD16, CARD16);
172 int (* ddGetStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
173 INT16, INT16, CARD16, CARD16,
174 INT16, INT16, CARD16, CARD16);
175 int (* ddStopVideo)(ClientPtr, struct _XvPortRec*, DrawablePtr);
176 int (* ddSetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32);
177 int (* ddGetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32*);
178 int (* ddQueryBestSize)(ClientPtr, struct _XvPortRec*, CARD8,
179 CARD16, CARD16,CARD16, CARD16,
180 unsigned int*, unsigned int*);
181 int (* ddPutImage)(ClientPtr, DrawablePtr, struct _XvPortRec*, GCPtr,
182 INT16, INT16, CARD16, CARD16,
183 INT16, INT16, CARD16, CARD16,
184 XvImagePtr, unsigned char*, Bool,
185 CARD16, CARD16);
186 int (* ddQueryImageAttributes)(ClientPtr, struct _XvPortRec*, XvImagePtr,
187 CARD16*, CARD16*, int*, int*);
188 DevUnion devPriv;
189} XvAdaptorRec, *XvAdaptorPtr;
190
191typedef struct _XvPortRec {
192 unsigned long id;
193 XvAdaptorPtr pAdaptor;
194 XvPortNotifyPtr pNotify;
195 DrawablePtr pDraw;
196 ClientPtr client;
197 XvGrabRec grab;
198 TimeStamp time;
199 DevUnion devPriv;
200} XvPortRec, *XvPortPtr;
201
202#define LOOKUP_PORT(_id, client)\
203 ((XvPortPtr)LookupIDByType(_id, XvRTPort))
204
205#define LOOKUP_ENCODING(_id, client)\
206 ((XvEncodingPtr)LookupIDByType(_id, XvRTEncoding))
207
208#define LOOKUP_VIDEONOTIFY_LIST(_id, client)\
209 ((XvVideoNotifyPtr)LookupIDByType(_id, XvRTVideoNotifyList))
210
211#define LOOKUP_PORTNOTIFY_LIST(_id, client)\
212 ((XvPortNotifyPtr)LookupIDByType(_id, XvRTPortNotifyList))
213
214typedef struct {
215 int version, revision;
216 int nAdaptors;
217 XvAdaptorPtr pAdaptors;
218 DestroyWindowProcPtr DestroyWindow;
219 DestroyPixmapProcPtr DestroyPixmap;
220 CloseScreenProcPtr CloseScreen;
221 Bool (* ddCloseScreen)(int, ScreenPtr);
222 int (* ddQueryAdaptors)(ScreenPtr, XvAdaptorPtr*, int*);
223 DevUnion devPriv;
224} XvScreenRec, *XvScreenPtr;
225
226#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \
227 dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey))->field)
228
229#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
230 ((pScreen)->field = wrapper)
231
232/* Errors */
233
234#define _XvBadPort (XvBadPort+XvErrorBase)
235#define _XvBadEncoding (XvBadEncoding+XvErrorBase)
236
237extern int ProcXvDispatch(ClientPtr);
238extern int SProcXvDispatch(ClientPtr);
239
240extern void XvExtensionInit(void);
241extern int XvScreenInit(ScreenPtr);
242extern DevPrivateKey XvGetScreenKey(void);
243extern unsigned long XvGetRTPort(void);
244extern int XvdiSendPortNotify(XvPortPtr, Atom, INT32);
245extern int XvdiVideoStopped(XvPortPtr, int);
246
247extern int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
248 INT16, INT16, CARD16, CARD16,
249 INT16, INT16, CARD16, CARD16);
250extern int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
251 INT16, INT16, CARD16, CARD16,
252 INT16, INT16, CARD16, CARD16);
253extern int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
254 INT16, INT16, CARD16, CARD16,
255 INT16, INT16, CARD16, CARD16);
256extern int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
257 INT16, INT16, CARD16, CARD16,
258 INT16, INT16, CARD16, CARD16);
259extern int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
260 INT16, INT16, CARD16, CARD16,
261 INT16, INT16, CARD16, CARD16,
262 XvImagePtr, unsigned char*, Bool,
263 CARD16, CARD16);
264extern int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL);
265extern int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL);
266extern int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
267extern int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*);
268extern int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
269extern int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr);
270extern int XvdiMatchPort(XvPortPtr, DrawablePtr);
271extern int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *);
272extern int XvdiUngrabPort( ClientPtr, XvPortPtr, Time);
273
274
275#if !defined(UNIXCPP)
276
277#define XVCALL(name) Xv##name
278
279#else
280
281#define XVCALL(name) Xv/**/name
282
283#endif
284
285
286#endif /* XVDIX_H */
287
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