3 * Copyright (c) 2001 by The XFree86 Project, Inc.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
23 * Except as contained in this notice, the name of the copyright holder(s)
24 * and author(s) shall not be used in advertising or otherwise to promote
25 * the sale, use or other dealings in this Software without prior written
26 * authorization from the copyright holder(s) and author(s).
37 int *xvimage_ids; /* reference the subpictures in the XF86MCAdaptorRec */
41 int surface_type_id; /* Driver generated. Must be unique on the port */
43 int color_description; /* no longer used */
44 unsigned short max_width;
45 unsigned short max_height;
46 unsigned short subpicture_max_width;
47 unsigned short subpicture_max_height;
50 XF86MCImageIDList *compatible_subpictures; /* can be null, if none */
51 } XF86MCSurfaceInfoRec, *XF86MCSurfaceInfoPtr;
55 xf86XvMCCreateContextProc
57 DIX will fill everything out in the context except the driver_priv.
58 The port_priv holds the private data specified for the port when
59 Xv was initialized by the driver.
60 The driver may store whatever it wants in driver_priv and edit
61 the width, height and flags. If the driver wants to return something
62 to the client it can allocate space in priv and specify the number
63 of 32 bit words in num_priv. This must be dynamically allocated
64 space because DIX will free it after it passes it to the client.
68 typedef int (*xf86XvMCCreateContextProcPtr) (
70 XvMCContextPtr context,
75 typedef void (*xf86XvMCDestroyContextProcPtr) (
77 XvMCContextPtr context
81 xf86XvMCCreateSurfaceProc
83 DIX will fill everything out in the surface except the driver_priv.
84 The driver may store whatever it wants in driver_priv. The driver
85 may pass data back to the client in the same manner as the
86 xf86XvMCCreateContextProc.
90 typedef int (*xf86XvMCCreateSurfaceProcPtr) (
92 XvMCSurfacePtr surface,
97 typedef void (*xf86XvMCDestroySurfaceProcPtr) (
99 XvMCSurfacePtr surface
103 xf86XvMCCreateSubpictureProc
105 DIX will fill everything out in the subpicture except the driver_priv,
106 num_palette_entries, entry_bytes and component_order. The driver may
107 store whatever it wants in driver_priv and edit the width and height.
108 If it is a paletted subpicture the driver needs to fill out the
109 num_palette_entries, entry_bytes and component_order. These are
110 not communicated to the client until the time the surface is
113 The driver may pass data back to the client in the same manner as the
114 xf86XvMCCreateContextProc.
118 typedef int (*xf86XvMCCreateSubpictureProcPtr) (
120 XvMCSubpicturePtr subpicture,
125 typedef void (*xf86XvMCDestroySubpictureProcPtr) (
127 XvMCSubpicturePtr subpicture
134 XF86MCSurfaceInfoPtr *surfaces;
136 XF86ImagePtr *subpictures;
137 xf86XvMCCreateContextProcPtr CreateContext;
138 xf86XvMCDestroyContextProcPtr DestroyContext;
139 xf86XvMCCreateSurfaceProcPtr CreateSurface;
140 xf86XvMCDestroySurfaceProcPtr DestroySurface;
141 xf86XvMCCreateSubpictureProcPtr CreateSubpicture;
142 xf86XvMCDestroySubpictureProcPtr DestroySubpicture;
143 } XF86MCAdaptorRec, *XF86MCAdaptorPtr;
148 Unlike Xv, the adaptor data is not copied from this structure.
149 This structure's data is used so it must stick around for the
150 life of the server. Note that it's an array of pointers not
151 an array of structures.
154 extern _X_EXPORT Bool xf86XvMCScreenInit(
157 XF86MCAdaptorPtr *adaptors
160 extern _X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void);
161 extern _X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor);
163 typedef int (*XvMCScreenInitProcPtr)(ScreenPtr, int, XvMCAdaptorPtr);
164 extern _X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc;
166 #endif /* _XF86XVMC_H */