VirtualBox

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

最後變更 在這個檔案從66474是 54163,由 vboxsync 提交於 10 年 前

Additions/x11/vboxvideo: support X.Org Server 1.17 (still untested).

  • 屬性 svn:eol-style 設為 native
檔案大小: 8.9 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 _X_EXPORT unsigned long XvExtensionGeneration;
59extern _X_EXPORT unsigned long XvScreenGeneration;
60extern _X_EXPORT unsigned long XvResourceGeneration;
61
62extern _X_EXPORT int XvReqCode;
63extern _X_EXPORT int XvEventBase;
64extern _X_EXPORT int XvErrorBase;
65
66extern _X_EXPORT RESTYPE XvRTPort;
67extern _X_EXPORT RESTYPE XvRTEncoding;
68extern _X_EXPORT RESTYPE XvRTGrab;
69extern _X_EXPORT RESTYPE XvRTVideoNotify;
70extern _X_EXPORT RESTYPE XvRTVideoNotifyList;
71extern _X_EXPORT RESTYPE 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 (*ddPutVideo) (DrawablePtr, struct _XvPortRec *, GCPtr,
161 INT16, INT16, CARD16, CARD16,
162 INT16, INT16, CARD16, CARD16);
163 int (*ddPutStill) (DrawablePtr, struct _XvPortRec *, GCPtr,
164 INT16, INT16, CARD16, CARD16,
165 INT16, INT16, CARD16, CARD16);
166 int (*ddGetVideo) (DrawablePtr, struct _XvPortRec *, GCPtr,
167 INT16, INT16, CARD16, CARD16,
168 INT16, INT16, CARD16, CARD16);
169 int (*ddGetStill) (DrawablePtr, struct _XvPortRec *, GCPtr,
170 INT16, INT16, CARD16, CARD16,
171 INT16, INT16, CARD16, CARD16);
172 int (*ddStopVideo) (struct _XvPortRec *, DrawablePtr);
173 int (*ddSetPortAttribute) (struct _XvPortRec *, Atom, INT32);
174 int (*ddGetPortAttribute) (struct _XvPortRec *, Atom, INT32 *);
175 int (*ddQueryBestSize) (struct _XvPortRec *, CARD8,
176 CARD16, CARD16, CARD16, CARD16,
177 unsigned int *, unsigned int *);
178 int (*ddPutImage) (DrawablePtr, struct _XvPortRec *, GCPtr,
179 INT16, INT16, CARD16, CARD16,
180 INT16, INT16, CARD16, CARD16,
181 XvImagePtr, unsigned char *, Bool, CARD16, CARD16);
182 int (*ddQueryImageAttributes) (struct _XvPortRec *, XvImagePtr,
183 CARD16 *, CARD16 *, int *, int *);
184 DevUnion devPriv;
185} XvAdaptorRec, *XvAdaptorPtr;
186
187typedef struct _XvPortRec {
188 unsigned long id;
189 XvAdaptorPtr pAdaptor;
190 XvPortNotifyPtr pNotify;
191 DrawablePtr pDraw;
192 ClientPtr client;
193 XvGrabRec grab;
194 TimeStamp time;
195 DevUnion devPriv;
196} XvPortRec, *XvPortPtr;
197
198#define VALIDATE_XV_PORT(portID, pPort, mode)\
199 {\
200 int rc = dixLookupResourceByType((void **)&(pPort), portID,\
201 XvRTPort, client, mode);\
202 if (rc != Success)\
203 return rc;\
204 }
205
206typedef struct {
207 int version, revision;
208 int nAdaptors;
209 XvAdaptorPtr pAdaptors;
210 DestroyWindowProcPtr DestroyWindow;
211 DestroyPixmapProcPtr DestroyPixmap;
212 CloseScreenProcPtr CloseScreen;
213} XvScreenRec, *XvScreenPtr;
214
215#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \
216 dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey))->field)
217
218#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
219 ((pScreen)->field = wrapper)
220
221/* Errors */
222
223#define _XvBadPort (XvBadPort+XvErrorBase)
224#define _XvBadEncoding (XvBadEncoding+XvErrorBase)
225
226extern _X_EXPORT int ProcXvDispatch(ClientPtr);
227extern _X_EXPORT int SProcXvDispatch(ClientPtr);
228
229extern _X_EXPORT int XvScreenInit(ScreenPtr);
230extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
231extern _X_EXPORT unsigned long XvGetRTPort(void);
232extern _X_EXPORT void XvFreeAdaptor(XvAdaptorPtr pAdaptor);
233extern void _X_EXPORT XvFillColorKey(DrawablePtr pDraw, CARD32 key,
234 RegionPtr region);
235extern _X_EXPORT int XvdiSendPortNotify(XvPortPtr, Atom, INT32);
236
237extern _X_EXPORT int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
238 INT16, INT16, CARD16, CARD16,
239 INT16, INT16, CARD16, CARD16);
240extern _X_EXPORT int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
241 INT16, INT16, CARD16, CARD16,
242 INT16, INT16, CARD16, CARD16);
243extern _X_EXPORT int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
244 INT16, INT16, CARD16, CARD16,
245 INT16, INT16, CARD16, CARD16);
246extern _X_EXPORT int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
247 INT16, INT16, CARD16, CARD16,
248 INT16, INT16, CARD16, CARD16);
249extern _X_EXPORT int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr,
250 INT16, INT16, CARD16, CARD16,
251 INT16, INT16, CARD16, CARD16,
252 XvImagePtr, unsigned char *, Bool,
253 CARD16, CARD16);
254extern _X_EXPORT int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL);
255extern _X_EXPORT int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL);
256extern _X_EXPORT int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32);
257extern _X_EXPORT int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *);
258extern _X_EXPORT int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr);
259extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr);
260extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *);
261extern _X_EXPORT int XvdiUngrabPort(ClientPtr, XvPortPtr, Time);
262#endif /* XVDIX_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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