1 /***********************************************************
2 Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
3 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
7 Permission to use, copy, modify, and distribute this software and its
8 documentation for any purpose and without fee is hereby granted,
9 provided that the above copyright notice appear in all copies and that
10 both that copyright notice and this permission notice appear in
11 supporting documentation, and that the names of Digital or MIT not be
12 used in advertising or publicity pertaining to distribution of the
13 software without specific, written prior permission.
15 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
16 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
17 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
18 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
19 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
20 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
23 ******************************************************************/
24 /* $XFree86: xc/include/extensions/Xvlib.h,v 1.3 1999/12/11 19:28:48 mvojkovi Exp $ */
31 ** Xvlib.h --- Xv library public header file
35 ** David Carver (Digital Workstation Engineering/Project Athena)
40 ** - changed XvFreeAdaptors to XvFreeAdaptorInfo
41 ** - changed XvFreeEncodings to XvFreeEncodingInfo
44 ** - changed SetPortControl to SetPortAttribute
45 ** - changed GetPortControl to GetPortAttribute
46 ** - changed QueryBestSize
49 ** - version 2.0 upgrade
52 ** - version 1.4 upgrade
56 #include <X11/Xfuncproto.h>
63 } SDL_NAME(XvRational);
66 int flags; /* XvGettable, XvSettable */
70 } SDL_NAME(XvAttribute);
73 XvEncodingID encoding_id;
77 SDL_NAME(XvRational) rate;
78 unsigned long num_encodings;
79 } SDL_NAME(XvEncodingInfo);
83 unsigned long visual_id;
88 unsigned long num_ports;
91 unsigned long num_formats;
92 SDL_NAME(XvFormat) *formats;
93 unsigned long num_adaptors;
94 } SDL_NAME(XvAdaptorInfo);
98 unsigned long serial; /* # of last request processed by server */
99 Bool send_event; /* true if this came from a SendEvent request */
100 Display *display; /* Display the event was read from */
101 Drawable drawable; /* drawable */
102 unsigned long reason; /* what generated this event */
103 XvPortID port_id; /* what port */
104 Time time; /* milliseconds */
105 } SDL_NAME(XvVideoNotifyEvent);
109 unsigned long serial; /* # of last request processed by server */
110 Bool send_event; /* true if this came from a SendEvent request */
111 Display *display; /* Display the event was read from */
112 XvPortID port_id; /* what port */
113 Time time; /* milliseconds */
114 Atom attribute; /* atom that identifies attribute */
115 long value; /* value of attribute */
116 } SDL_NAME(XvPortNotifyEvent);
120 SDL_NAME(XvVideoNotifyEvent) xvvideo;
121 SDL_NAME(XvPortNotifyEvent) xvport;
126 int id; /* Unique descriptor for the format */
127 int type; /* XvRGB, XvYUV */
128 int byte_order; /* LSBFirst, MSBFirst */
129 char guid[16]; /* Globally Unique IDentifier */
131 int format; /* XvPacked, XvPlanar */
134 /* for RGB formats only */
136 unsigned int red_mask;
137 unsigned int green_mask;
138 unsigned int blue_mask;
140 /* for YUV formats only */
141 unsigned int y_sample_bits;
142 unsigned int u_sample_bits;
143 unsigned int v_sample_bits;
144 unsigned int horz_y_period;
145 unsigned int horz_u_period;
146 unsigned int horz_v_period;
147 unsigned int vert_y_period;
148 unsigned int vert_u_period;
149 unsigned int vert_v_period;
150 char component_order[32]; /* eg. UYVY */
151 int scanline_order; /* XvTopToBottom, XvBottomToTop */
152 } SDL_NAME(XvImageFormatValues);
157 int data_size; /* bytes */
159 int *pitches; /* bytes */
160 int *offsets; /* bytes */
167 extern int SDL_NAME(XvQueryExtension)(
168 #if NeedFunctionPrototypes
169 Display* /* display */,
170 unsigned int* /* p_version */,
171 unsigned int* /* p_revision */,
172 unsigned int* /* p_requestBase */,
173 unsigned int* /* p_eventBase */,
174 unsigned int* /* p_errorBase */
178 extern int SDL_NAME(XvQueryAdaptors)(
179 #if NeedFunctionPrototypes
180 Display* /* display */,
182 unsigned int* /* p_nAdaptors */,
183 SDL_NAME(XvAdaptorInfo)** /* p_pAdaptors */
187 extern int SDL_NAME(XvQueryEncodings)(
188 #if NeedFunctionPrototypes
189 Display* /* display */,
191 unsigned int* /* p_nEncoding */,
192 SDL_NAME(XvEncodingInfo)** /* p_pEncoding */
196 extern int SDL_NAME(XvPutVideo)(
197 #if NeedFunctionPrototypes
198 Display* /* display */,
204 unsigned int /* vw */,
205 unsigned int /* vh */,
208 unsigned int /* dw */,
209 unsigned int /* dh */
213 extern int SDL_NAME(XvPutStill)(
214 #if NeedFunctionPrototypes
215 Display* /* display */,
221 unsigned int /* vw */,
222 unsigned int /* vh */,
225 unsigned int /* dw */,
226 unsigned int /* dh */
230 extern int SDL_NAME(XvGetVideo)(
231 #if NeedFunctionPrototypes
232 Display* /* display */,
238 unsigned int /* vw */,
239 unsigned int /* vh */,
242 unsigned int /* dw */,
243 unsigned int /* dh */
247 extern int SDL_NAME(XvGetStill)(
248 #if NeedFunctionPrototypes
249 Display* /* display */,
255 unsigned int /* vw */,
256 unsigned int /* vh */,
259 unsigned int /* dw */,
260 unsigned int /* dh */
264 extern int SDL_NAME(XvStopVideo)(
265 #if NeedFunctionPrototypes
266 Display* /* display */,
268 Drawable /* drawable */
272 extern int SDL_NAME(XvGrabPort)(
273 #if NeedFunctionPrototypes
274 Display* /* display */,
280 extern int SDL_NAME(XvUngrabPort)(
281 #if NeedFunctionPrototypes
282 Display* /* display */,
288 extern int SDL_NAME(XvSelectVideoNotify)(
289 #if NeedFunctionPrototypes
290 Display* /* display */,
291 Drawable /* drawable */,
296 extern int SDL_NAME(XvSelectPortNotify)(
297 #if NeedFunctionPrototypes
298 Display* /* display */,
304 extern int SDL_NAME(XvSetPortAttribute)(
305 #if NeedFunctionPrototypes
306 Display* /* display */,
308 Atom /* attribute */,
313 extern int SDL_NAME(XvGetPortAttribute)(
314 #if NeedFunctionPrototypes
315 Display* /* display */,
317 Atom /* attribute */,
322 extern int SDL_NAME(XvQueryBestSize)(
323 #if NeedFunctionPrototypes
324 Display* /* display */,
327 unsigned int /* vid_w */,
328 unsigned int /* vid_h */,
329 unsigned int /* drw_w */,
330 unsigned int /* drw_h */,
331 unsigned int* /* p_actual_width */,
332 unsigned int* /* p_actual_width */
336 extern SDL_NAME(XvAttribute)* SDL_NAME(XvQueryPortAttributes)(
337 #if NeedFunctionPrototypes
338 Display* /* display */,
345 extern void SDL_NAME(XvFreeAdaptorInfo)(
346 #if NeedFunctionPrototypes
347 SDL_NAME(XvAdaptorInfo)* /* adaptors */
351 extern void SDL_NAME(XvFreeEncodingInfo)(
352 #if NeedFunctionPrototypes
353 SDL_NAME(XvEncodingInfo)* /* encodings */
358 extern SDL_NAME(XvImageFormatValues) * SDL_NAME(XvListImageFormats) (
359 #if NeedFunctionPrototypes
366 extern SDL_NAME(XvImage) * SDL_NAME(XvCreateImage) (
367 #if NeedFunctionPrototypes
377 extern int SDL_NAME(XvPutImage) (
378 #if NeedFunctionPrototypes
383 SDL_NAME(XvImage) *image,
395 extern int SDL_NAME(XvShmPutImage) (
396 #if NeedFunctionPrototypes
401 SDL_NAME(XvImage) *image,
416 extern SDL_NAME(XvImage) * SDL_NAME(XvShmCreateImage) (
417 #if NeedFunctionPrototypes
424 XShmSegmentInfo *shminfo