~ubuntu-branches/ubuntu/karmic/virtualbox-ose/karmic-updates

« back to all changes in this revision

Viewing changes to src/VBox/Additions/x11/x11include/4.2/programs/Xserver/hw/xfree86/common/xf86xv.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-09-14 18:25:07 UTC
  • mfrom: (0.4.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090914182507-c98g07mq16hjmn6d
Tags: 3.0.6-dfsg-1ubuntu1
* Merge from debian unstable (LP: #429697), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
  - virtualbox, virtualbox-* (names of the upstream proprietary packages)
    conflict with virtualbox-ose (LP: #379878)
* Make debug package depend on normal or guest utils package
* Drop patches/22-pulseaudio-stubs.dpatch (applied upstream)
* Rename Ubuntu specific patches to uXX-*.dpatch
* Fix lintian warnings in maintainer scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xv.h,v 1.22 2001/06/16 21:57:42 mvojkovi Exp $ */
2
 
 
3
 
#ifndef _XF86XV_H_
4
 
#define _XF86XV_H_
5
 
 
6
 
#include "xvdix.h"
7
 
#include "xf86str.h"
8
 
 
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
14
 
 
15
 
typedef struct {
16
 
  int id;
17
 
  int type;
18
 
  int byte_order;
19
 
  unsigned char guid[16];               
20
 
  int bits_per_pixel;
21
 
  int format;
22
 
  int num_planes;
23
 
 
24
 
  /* for RGB formats only */
25
 
  int depth;
26
 
  unsigned int red_mask;       
27
 
  unsigned int green_mask;   
28
 
  unsigned int blue_mask;   
29
 
 
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];
41
 
  int scanline_order;
42
 
} XF86ImageRec, *XF86ImagePtr; 
43
 
 
44
 
 
45
 
typedef struct {
46
 
  ScrnInfoPtr pScrn;
47
 
  int id;
48
 
  unsigned short width, height;
49
 
  int *pitches; /* bytes */
50
 
  int *offsets; /* in bytes from start of framebuffer */
51
 
  DevUnion devPrivate;  
52
 
} XF86SurfaceRec, *XF86SurfacePtr;
53
 
 
54
 
 
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);
89
 
 
90
 
typedef enum {
91
 
    XV_OFF,
92
 
    XV_PENDING,
93
 
    XV_ON
94
 
} XvStatus;
95
 
 
96
 
/*** this is what the driver needs to fill out ***/
97
 
 
98
 
typedef struct {
99
 
  int id;
100
 
  char *name;
101
 
  unsigned short width, height;
102
 
  XvRationalRec rate;
103
 
} XF86VideoEncodingRec, *XF86VideoEncodingPtr;
104
 
 
105
 
typedef struct {
106
 
  char  depth;  
107
 
  short class;
108
 
} XF86VideoFormatRec, *XF86VideoFormatPtr;
109
 
 
110
 
typedef struct {
111
 
  int   flags;
112
 
  int   min_value;
113
 
  int   max_value;
114
 
  char  *name;
115
 
} XF86AttributeRec, *XF86AttributePtr;
116
 
 
117
 
typedef struct {
118
 
  unsigned int type; 
119
 
  int flags;
120
 
  char *name;
121
 
  int nEncodings;
122
 
  XF86VideoEncodingPtr pEncodings;  
123
 
  int nFormats;
124
 
  XF86VideoFormatPtr pFormats;  
125
 
  int nPorts;
126
 
  DevUnion *pPortPrivates;
127
 
  int nAttributes;
128
 
  XF86AttributePtr pAttributes;
129
 
  int nImages;
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;
143
 
 
144
 
typedef struct {
145
 
  XF86ImagePtr image;
146
 
  int flags;
147
 
  int (*alloc_surface)(ScrnInfoPtr pScrn,
148
 
                  int id,
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);
162
 
  int max_width;
163
 
  int max_height;
164
 
  int num_attributes;
165
 
  XF86AttributePtr attributes;
166
 
} XF86OffscreenImageRec, *XF86OffscreenImagePtr;
167
 
 
168
 
Bool
169
 
xf86XVScreenInit(
170
 
   ScreenPtr pScreen, 
171
 
   XF86VideoAdaptorPtr  *Adaptors,
172
 
   int num
173
 
);
174
 
 
175
 
typedef int (* xf86XVInitGenericAdaptorPtr)(ScrnInfoPtr pScrn,
176
 
        XF86VideoAdaptorPtr **Adaptors);
177
 
 
178
 
int
179
 
xf86XVRegisterGenericAdaptorDriver(
180
 
    xf86XVInitGenericAdaptorPtr InitFunc
181
 
);
182
 
 
183
 
int
184
 
xf86XVListGenericAdaptors(
185
 
    ScrnInfoPtr          pScrn,
186
 
    XF86VideoAdaptorPtr  **Adaptors
187
 
);
188
 
 
189
 
Bool 
190
 
xf86XVRegisterOffscreenImages(
191
 
   ScreenPtr pScreen,
192
 
   XF86OffscreenImagePtr images,
193
 
   int num
194
 
);
195
 
 
196
 
XF86OffscreenImagePtr
197
 
xf86XVQueryOffscreenImages(
198
 
   ScreenPtr pScreen,
199
 
   int *num
200
 
);
201
 
   
202
 
XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn);
203
 
 
204
 
void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr);
205
 
 
206
 
void
207
 
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
208
 
 
209
 
Bool
210
 
xf86XVClipVideoHelper(
211
 
    BoxPtr dst,
212
 
    INT32 *xa,
213
 
    INT32 *xb,
214
 
    INT32 *ya,
215
 
    INT32 *yb,
216
 
    RegionPtr reg,
217
 
    INT32 width,
218
 
    INT32 height
219
 
);
220
 
 
221
 
/*** These are DDX layer privates ***/
222
 
 
223
 
extern int XF86XvScreenIndex;
224
 
 
225
 
typedef struct {
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);
233
 
   GCPtr                        videoGC;
234
 
} XF86XVScreenRec, *XF86XVScreenPtr;
235
 
 
236
 
typedef struct {
237
 
  int flags;  
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;
250
 
 
251
 
typedef struct {
252
 
   ScrnInfoPtr pScrn;
253
 
   DrawablePtr pDraw;
254
 
   unsigned char type;
255
 
   unsigned int subWindowMode;
256
 
   DDXPointRec clipOrg;
257
 
   RegionPtr clientClip;
258
 
   RegionPtr pCompositeClip;
259
 
   Bool FreeCompositeClip;
260
 
   XvAdaptorRecPrivatePtr AdaptorRec;
261
 
   XvStatus isOn;
262
 
   Bool moved;
263
 
   int vid_x, vid_y, vid_w, vid_h;
264
 
   int drw_x, drw_y, drw_w, drw_h;
265
 
   DevUnion DevPriv;
266
 
} XvPortRecPrivate, *XvPortRecPrivatePtr;
267
 
 
268
 
typedef struct _XF86XVWindowRec{
269
 
   XvPortRecPrivatePtr PortRec;
270
 
   struct _XF86XVWindowRec *next;
271
 
} XF86XVWindowRec, *XF86XVWindowPtr;
272
 
 
273
 
#endif  /* _XF86XV_H_ */