1
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xv.h,v 1.22 2001/06/16 21:57:42 mvojkovi Exp $ */
9
#define VIDEO_NO_CLIPPING 0x00000001
10
#define VIDEO_INVERT_CLIPLIST 0x00000002
11
#define VIDEO_OVERLAID_IMAGES 0x00000004
12
#define VIDEO_OVERLAID_STILLS 0x00000008
13
#define VIDEO_CLIP_TO_VIEWPORT 0x00000010
19
unsigned char guid[16];
24
/* for RGB formats only */
26
unsigned int red_mask;
27
unsigned int green_mask;
28
unsigned int blue_mask;
30
/* for YUV formats only */
31
unsigned int y_sample_bits;
32
unsigned int u_sample_bits;
33
unsigned int v_sample_bits;
34
unsigned int horz_y_period;
35
unsigned int horz_u_period;
36
unsigned int horz_v_period;
37
unsigned int vert_y_period;
38
unsigned int vert_u_period;
39
unsigned int vert_v_period;
40
char component_order[32];
42
} XF86ImageRec, *XF86ImagePtr;
48
unsigned short width, height;
49
int *pitches; /* bytes */
50
int *offsets; /* in bytes from start of framebuffer */
52
} XF86SurfaceRec, *XF86SurfacePtr;
55
typedef int (* PutVideoFuncPtr)( ScrnInfoPtr pScrn,
56
short vid_x, short vid_y, short drw_x, short drw_y,
57
short vid_w, short vid_h, short drw_w, short drw_h,
58
RegionPtr clipBoxes, pointer data );
59
typedef int (* PutStillFuncPtr)( ScrnInfoPtr pScrn,
60
short vid_x, short vid_y, short drw_x, short drw_y,
61
short vid_w, short vid_h, short drw_w, short drw_h,
62
RegionPtr clipBoxes, pointer data );
63
typedef int (* GetVideoFuncPtr)( ScrnInfoPtr pScrn,
64
short vid_x, short vid_y, short drw_x, short drw_y,
65
short vid_w, short vid_h, short drw_w, short drw_h,
66
RegionPtr clipBoxes, pointer data );
67
typedef int (* GetStillFuncPtr)( ScrnInfoPtr pScrn,
68
short vid_x, short vid_y, short drw_x, short drw_y,
69
short vid_w, short vid_h, short drw_w, short drw_h,
70
RegionPtr clipBoxes, pointer data );
71
typedef void (* StopVideoFuncPtr)(ScrnInfoPtr pScrn, pointer data, Bool Exit);
72
typedef int (* SetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute,
73
INT32 value, pointer data);
74
typedef int (* GetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute,
75
INT32 *value, pointer data);
76
typedef void (* QueryBestSizeFuncPtr)(ScrnInfoPtr pScrn, Bool motion,
77
short vid_w, short vid_h, short drw_w, short drw_h,
78
unsigned int *p_w, unsigned int *p_h, pointer data);
79
typedef int (* PutImageFuncPtr)( ScrnInfoPtr pScrn,
80
short src_x, short src_y, short drw_x, short drw_y,
81
short src_w, short src_h, short drw_w, short drw_h,
82
int image, unsigned char* buf, short width, short height, Bool Sync,
83
RegionPtr clipBoxes, pointer data );
84
typedef int (* ReputImageFuncPtr)( ScrnInfoPtr pScrn, short drw_x, short drw_y,
85
RegionPtr clipBoxes, pointer data );
86
typedef int (*QueryImageAttributesFuncPtr)(ScrnInfoPtr pScrn,
87
int image, unsigned short *width, unsigned short *height,
88
int *pitches, int *offsets);
96
/*** this is what the driver needs to fill out ***/
101
unsigned short width, height;
103
} XF86VideoEncodingRec, *XF86VideoEncodingPtr;
108
} XF86VideoFormatRec, *XF86VideoFormatPtr;
115
} XF86AttributeRec, *XF86AttributePtr;
122
XF86VideoEncodingPtr pEncodings;
124
XF86VideoFormatPtr pFormats;
126
DevUnion *pPortPrivates;
128
XF86AttributePtr pAttributes;
130
XF86ImagePtr pImages;
131
PutVideoFuncPtr PutVideo;
132
PutStillFuncPtr PutStill;
133
GetVideoFuncPtr GetVideo;
134
GetStillFuncPtr GetStill;
135
StopVideoFuncPtr StopVideo;
136
SetPortAttributeFuncPtr SetPortAttribute;
137
GetPortAttributeFuncPtr GetPortAttribute;
138
QueryBestSizeFuncPtr QueryBestSize;
139
PutImageFuncPtr PutImage;
140
ReputImageFuncPtr ReputImage;
141
QueryImageAttributesFuncPtr QueryImageAttributes;
142
} XF86VideoAdaptorRec, *XF86VideoAdaptorPtr;
147
int (*alloc_surface)(ScrnInfoPtr pScrn,
149
unsigned short width,
150
unsigned short height,
151
XF86SurfacePtr surface);
152
int (*free_surface)(XF86SurfacePtr surface);
153
int (*display) (XF86SurfacePtr surface,
154
short vid_x, short vid_y,
155
short drw_x, short drw_y,
156
short vid_w, short vid_h,
157
short drw_w, short drw_h,
158
RegionPtr clipBoxes);
159
int (*stop) (XF86SurfacePtr surface);
160
int (*getAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 *value);
161
int (*setAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 value);
165
XF86AttributePtr attributes;
166
} XF86OffscreenImageRec, *XF86OffscreenImagePtr;
171
XF86VideoAdaptorPtr *Adaptors,
175
typedef int (* xf86XVInitGenericAdaptorPtr)(ScrnInfoPtr pScrn,
176
XF86VideoAdaptorPtr **Adaptors);
179
xf86XVRegisterGenericAdaptorDriver(
180
xf86XVInitGenericAdaptorPtr InitFunc
184
xf86XVListGenericAdaptors(
186
XF86VideoAdaptorPtr **Adaptors
190
xf86XVRegisterOffscreenImages(
192
XF86OffscreenImagePtr images,
196
XF86OffscreenImagePtr
197
xf86XVQueryOffscreenImages(
202
XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn);
204
void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr);
207
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
210
xf86XVClipVideoHelper(
221
/*** These are DDX layer privates ***/
223
extern int XF86XvScreenIndex;
226
CreateWindowProcPtr CreateWindow;
227
DestroyWindowProcPtr DestroyWindow;
228
ClipNotifyProcPtr ClipNotify;
229
WindowExposuresProcPtr WindowExposures;
230
void (*AdjustFrame)(int, int, int, int);
231
Bool (*EnterVT)(int, int);
232
void (*LeaveVT)(int, int);
234
} XF86XVScreenRec, *XF86XVScreenPtr;
238
PutVideoFuncPtr PutVideo;
239
PutStillFuncPtr PutStill;
240
GetVideoFuncPtr GetVideo;
241
GetStillFuncPtr GetStill;
242
StopVideoFuncPtr StopVideo;
243
SetPortAttributeFuncPtr SetPortAttribute;
244
GetPortAttributeFuncPtr GetPortAttribute;
245
QueryBestSizeFuncPtr QueryBestSize;
246
PutImageFuncPtr PutImage;
247
ReputImageFuncPtr ReputImage;
248
QueryImageAttributesFuncPtr QueryImageAttributes;
249
} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
255
unsigned int subWindowMode;
257
RegionPtr clientClip;
258
RegionPtr pCompositeClip;
259
Bool FreeCompositeClip;
260
XvAdaptorRecPrivatePtr AdaptorRec;
263
int vid_x, vid_y, vid_w, vid_h;
264
int drw_x, drw_y, drw_w, drw_h;
266
} XvPortRecPrivate, *XvPortRecPrivatePtr;
268
typedef struct _XF86XVWindowRec{
269
XvPortRecPrivatePtr PortRec;
270
struct _XF86XVWindowRec *next;
271
} XF86XVWindowRec, *XF86XVWindowPtr;
273
#endif /* _XF86XV_H_ */