VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.0.1/xf86xvmc.h@ 69348

Last change on this file since 69348 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 5.2 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86xvmc.h,v 1.7 2003/10/08 22:31:59 mvojkovi Exp $ */
2
3/*
4 * Copyright (c) 2001 by The XFree86 Project, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Except as contained in this notice, the name of the copyright holder(s)
25 * and author(s) shall not be used in advertising or otherwise to promote
26 * the sale, use or other dealings in this Software without prior written
27 * authorization from the copyright holder(s) and author(s).
28 */
29
30#ifndef _XF86XVMC_H
31#define _XF86XVMC_H
32
33#include "xvmcext.h"
34#include "xf86xv.h"
35
36typedef struct {
37 int num_xvimages;
38 int *xvimage_ids; /* reference the subpictures in the XF86MCAdaptorRec */
39} XF86MCImageIDList;
40
41typedef struct {
42 int surface_type_id; /* Driver generated. Must be unique on the port */
43 int chroma_format;
44 int color_description; /* no longer used */
45 unsigned short max_width;
46 unsigned short max_height;
47 unsigned short subpicture_max_width;
48 unsigned short subpicture_max_height;
49 int mc_type;
50 int flags;
51 XF86MCImageIDList *compatible_subpictures; /* can be null, if none */
52} XF86MCSurfaceInfoRec, *XF86MCSurfaceInfoPtr;
53
54
55/*
56 xf86XvMCCreateContextProc
57
58 DIX will fill everything out in the context except the driver_priv.
59 The port_priv holds the private data specified for the port when
60 Xv was initialized by the driver.
61 The driver may store whatever it wants in driver_priv and edit
62 the width, height and flags. If the driver wants to return something
63 to the client it can allocate space in priv and specify the number
64 of 32 bit words in num_priv. This must be dynamically allocated
65 space because DIX will free it after it passes it to the client.
66*/
67
68
69typedef int (*xf86XvMCCreateContextProcPtr) (
70 ScrnInfoPtr pScrn,
71 XvMCContextPtr context,
72 int *num_priv,
73 CARD32 **priv
74);
75
76typedef void (*xf86XvMCDestroyContextProcPtr) (
77 ScrnInfoPtr pScrn,
78 XvMCContextPtr context
79);
80
81/*
82 xf86XvMCCreateSurfaceProc
83
84 DIX will fill everything out in the surface except the driver_priv.
85 The driver may store whatever it wants in driver_priv. The driver
86 may pass data back to the client in the same manner as the
87 xf86XvMCCreateContextProc.
88*/
89
90
91typedef int (*xf86XvMCCreateSurfaceProcPtr) (
92 ScrnInfoPtr pScrn,
93 XvMCSurfacePtr surface,
94 int *num_priv,
95 CARD32 **priv
96);
97
98typedef void (*xf86XvMCDestroySurfaceProcPtr) (
99 ScrnInfoPtr pScrn,
100 XvMCSurfacePtr surface
101);
102
103/*
104 xf86XvMCCreateSubpictureProc
105
106 DIX will fill everything out in the subpicture except the driver_priv,
107 num_palette_entries, entry_bytes and component_order. The driver may
108 store whatever it wants in driver_priv and edit the width and height.
109 If it is a paletted subpicture the driver needs to fill out the
110 num_palette_entries, entry_bytes and component_order. These are
111 not communicated to the client until the time the surface is
112 created.
113
114 The driver may pass data back to the client in the same manner as the
115 xf86XvMCCreateContextProc.
116*/
117
118
119typedef int (*xf86XvMCCreateSubpictureProcPtr) (
120 ScrnInfoPtr pScrn,
121 XvMCSubpicturePtr subpicture,
122 int *num_priv,
123 CARD32 **priv
124);
125
126typedef void (*xf86XvMCDestroySubpictureProcPtr) (
127 ScrnInfoPtr pScrn,
128 XvMCSubpicturePtr subpicture
129);
130
131
132typedef struct {
133 char *name;
134 int num_surfaces;
135 XF86MCSurfaceInfoPtr *surfaces;
136 int num_subpictures;
137 XF86ImagePtr *subpictures;
138 xf86XvMCCreateContextProcPtr CreateContext;
139 xf86XvMCDestroyContextProcPtr DestroyContext;
140 xf86XvMCCreateSurfaceProcPtr CreateSurface;
141 xf86XvMCDestroySurfaceProcPtr DestroySurface;
142 xf86XvMCCreateSubpictureProcPtr CreateSubpicture;
143 xf86XvMCDestroySubpictureProcPtr DestroySubpicture;
144} XF86MCAdaptorRec, *XF86MCAdaptorPtr;
145
146/*
147 xf86XvMCScreenInit
148
149 Unlike Xv, the adaptor data is not copied from this structure.
150 This structure's data is used so it must stick around for the
151 life of the server. Note that it's an array of pointers not
152 an array of structures.
153*/
154
155Bool xf86XvMCScreenInit(
156 ScreenPtr pScreen,
157 int num_adaptors,
158 XF86MCAdaptorPtr *adaptors
159);
160
161XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void);
162void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor);
163
164#endif /* _XF86XVMC_H */
Note: See TracBrowser for help on using the repository browser.

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