VirtualBox

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

最後變更 在這個檔案從25078是 25078,由 vboxsync 提交於 15 年 前

Additions/x11/x11include: exported and set eol-style on new headers

  • 屬性 svn:eol-style 設為 native
檔案大小: 8.4 KB
 
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 int XvScreenIndex;
59extern unsigned long XvExtensionGeneration;
60extern unsigned long XvScreenGeneration;
61extern unsigned long XvResourceGeneration;
62
63extern int XvReqCode;
64extern int XvEventBase;
65extern int XvErrorBase;
66
67extern unsigned long XvRTPort;
68extern unsigned long XvRTEncoding;
69extern unsigned long XvRTGrab;
70extern unsigned long XvRTVideoNotify;
71extern unsigned long XvRTVideoNotifyList;
72extern unsigned long XvRTPortNotify;
73
74typedef struct {
75 int numerator;
76 int denominator;
77} XvRationalRec, *XvRationalPtr;
78
79typedef struct {
80 char depth;
81 unsigned long visual;
82} XvFormatRec, *XvFormatPtr;
83
84typedef struct {
85 unsigned long id;
86 ClientPtr client;
87} XvGrabRec, *XvGrabPtr;
88
89typedef struct _XvVideoNotifyRec {
90 struct _XvVideoNotifyRec *next;
91 ClientPtr client;
92 unsigned long id;
93 unsigned long mask;
94} XvVideoNotifyRec, *XvVideoNotifyPtr;
95
96typedef struct _XvPortNotifyRec {
97 struct _XvPortNotifyRec *next;
98 ClientPtr client;
99 unsigned long id;
100} XvPortNotifyRec, *XvPortNotifyPtr;
101
102typedef struct {
103 int id;
104 ScreenPtr pScreen;
105 char *name;
106 unsigned short width, height;
107 XvRationalRec rate;
108} XvEncodingRec, *XvEncodingPtr;
109
110typedef struct _XvAttributeRec {
111 int flags;
112 int min_value;
113 int max_value;
114 char *name;
115} XvAttributeRec, *XvAttributePtr;
116
117typedef struct {
118 int id;
119 int type;
120 int byte_order;
121 char guid[16];
122 int bits_per_pixel;
123 int format;
124 int num_planes;
125
126 /* for RGB formats only */
127 int depth;
128 unsigned int red_mask;
129 unsigned int green_mask;
130 unsigned int blue_mask;
131
132 /* for YUV formats only */
133 unsigned int y_sample_bits;
134 unsigned int u_sample_bits;
135 unsigned int v_sample_bits;
136 unsigned int horz_y_period;
137 unsigned int horz_u_period;
138 unsigned int horz_v_period;
139 unsigned int vert_y_period;
140 unsigned int vert_u_period;
141 unsigned int vert_v_period;
142 char component_order[32];
143 int scanline_order;
144} XvImageRec, *XvImagePtr;
145
146typedef struct {
147 unsigned long base_id;
148 unsigned char type;
149 char *name;
150 int nEncodings;
151 XvEncodingPtr pEncodings;
152 int nFormats;
153 XvFormatPtr pFormats;
154 int nAttributes;
155 XvAttributePtr pAttributes;
156 int nImages;
157 XvImagePtr pImages;
158 int nPorts;
159 struct _XvPortRec *pPorts;
160 ScreenPtr pScreen;
161 int (* ddAllocatePort)(unsigned long, struct _XvPortRec*,
162 struct _XvPortRec**);
163 int (* ddFreePort)(struct _XvPortRec*);
164 int (* ddPutVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
165 INT16, INT16, CARD16, CARD16,
166 INT16, INT16, CARD16, CARD16);
167 int (* ddPutStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
168 INT16, INT16, CARD16, CARD16,
169 INT16, INT16, CARD16, CARD16);
170 int (* ddGetVideo)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
171 INT16, INT16, CARD16, CARD16,
172 INT16, INT16, CARD16, CARD16);
173 int (* ddGetStill)(ClientPtr, DrawablePtr,struct _XvPortRec*, GCPtr,
174 INT16, INT16, CARD16, CARD16,
175 INT16, INT16, CARD16, CARD16);
176 int (* ddStopVideo)(ClientPtr, struct _XvPortRec*, DrawablePtr);
177 int (* ddSetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32);
178 int (* ddGetPortAttribute)(ClientPtr, struct _XvPortRec*, Atom, INT32*);
179 int (* ddQueryBestSize)(ClientPtr, struct _XvPortRec*, CARD8,
180 CARD16, CARD16,CARD16, CARD16,
181 unsigned int*, unsigned int*);
182 int (* ddPutImage)(ClientPtr, DrawablePtr, struct _XvPortRec*, GCPtr,
183 INT16, INT16, CARD16, CARD16,
184 INT16, INT16, CARD16, CARD16,
185 XvImagePtr, unsigned char*, Bool,
186 CARD16, CARD16);
187 int (* ddQueryImageAttributes)(ClientPtr, struct _XvPortRec*, XvImagePtr,
188 CARD16*, CARD16*, int*, int*);
189 DevUnion devPriv;
190} XvAdaptorRec, *XvAdaptorPtr;
191
192typedef struct _XvPortRec {
193 unsigned long id;
194 XvAdaptorPtr pAdaptor;
195 XvPortNotifyPtr pNotify;
196 DrawablePtr pDraw;
197 ClientPtr client;
198 XvGrabRec grab;
199 TimeStamp time;
200 DevUnion devPriv;
201} XvPortRec, *XvPortPtr;
202
203#define LOOKUP_PORT(_id, client)\
204 ((XvPortPtr)LookupIDByType(_id, XvRTPort))
205
206#define LOOKUP_ENCODING(_id, client)\
207 ((XvEncodingPtr)LookupIDByType(_id, XvRTEncoding))
208
209#define LOOKUP_VIDEONOTIFY_LIST(_id, client)\
210 ((XvVideoNotifyPtr)LookupIDByType(_id, XvRTVideoNotifyList))
211
212#define LOOKUP_PORTNOTIFY_LIST(_id, client)\
213 ((XvPortNotifyPtr)LookupIDByType(_id, XvRTPortNotifyList))
214
215typedef struct {
216 int version, revision;
217 int nAdaptors;
218 XvAdaptorPtr pAdaptors;
219 DestroyWindowProcPtr DestroyWindow;
220 DestroyPixmapProcPtr DestroyPixmap;
221 CloseScreenProcPtr CloseScreen;
222 Bool (* ddCloseScreen)(int, ScreenPtr);
223 int (* ddQueryAdaptors)(ScreenPtr, XvAdaptorPtr*, int*);
224 DevUnion devPriv;
225} XvScreenRec, *XvScreenPtr;
226
227#define SCREEN_PROLOGUE(pScreen, field)\
228 ((pScreen)->field = \
229 ((XvScreenPtr) \
230 (pScreen)->devPrivates[XvScreenIndex].ptr)->field)
231
232#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
233 ((pScreen)->field = wrapper)
234
235/* Errors */
236
237#define _XvBadPort (XvBadPort+XvErrorBase)
238#define _XvBadEncoding (XvBadEncoding+XvErrorBase)
239
240extern int ProcXvDispatch(ClientPtr);
241extern int SProcXvDispatch(ClientPtr);
242
243extern void XvExtensionInit(void);
244extern int XvScreenInit(ScreenPtr);
245extern int XvGetScreenIndex(void);
246extern unsigned long XvGetRTPort(void);
247extern int XvdiSendPortNotify(XvPortPtr, Atom, INT32);
248extern int XvdiVideoStopped(XvPortPtr, int);
249
250extern int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
251 INT16, INT16, CARD16, CARD16,
252 INT16, INT16, CARD16, CARD16);
253extern int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
254 INT16, INT16, CARD16, CARD16,
255 INT16, INT16, CARD16, CARD16);
256extern int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
257 INT16, INT16, CARD16, CARD16,
258 INT16, INT16, CARD16, CARD16);
259extern int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
260 INT16, INT16, CARD16, CARD16,
261 INT16, INT16, CARD16, CARD16);
262extern int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
263 INT16, INT16, CARD16, CARD16,
264 INT16, INT16, CARD16, CARD16,
265 XvImagePtr, unsigned char*, Bool,
266 CARD16, CARD16);
267extern int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL);
268extern int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL);
269extern int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
270extern int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32*);
271extern int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
272extern int XvdiPreemptVideo(ClientPtr, XvPortPtr, DrawablePtr);
273extern int XvdiMatchPort(XvPortPtr, DrawablePtr);
274extern int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *);
275extern int XvdiUngrabPort( ClientPtr, XvPortPtr, Time);
276
277
278#if !defined(UNIXCPP)
279
280#define XVCALL(name) Xv##name
281
282#else
283
284#define XVCALL(name) Xv/**/name
285
286#endif
287
288
289#endif /* XVDIX_H */
290
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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