VirtualBox

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

最後變更 在這個檔案是 43272,由 vboxsync 提交於 12 年 前

Additions/x11: more original X server headers.

  • 屬性 svn:eol-style 設為 native
檔案大小: 5.1 KB
 
1
2/*
3 * Copyright (c) 2001 by The XFree86 Project, Inc.
4 *
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:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
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.
22 *
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).
27 */
28
29#ifndef _XF86XVMC_H
30#define _XF86XVMC_H
31
32#include "xvmcext.h"
33#include "xf86xv.h"
34
35typedef struct {
36 int num_xvimages;
37 int *xvimage_ids; /* reference the subpictures in the XF86MCAdaptorRec */
38} XF86MCImageIDList;
39
40typedef struct {
41 int surface_type_id; /* Driver generated. Must be unique on the port */
42 int chroma_format;
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;
48 int mc_type;
49 int flags;
50 XF86MCImageIDList *compatible_subpictures; /* can be null, if none */
51} XF86MCSurfaceInfoRec, *XF86MCSurfaceInfoPtr;
52
53
54/*
55 xf86XvMCCreateContextProc
56
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.
65*/
66
67
68typedef int (*xf86XvMCCreateContextProcPtr) (
69 ScrnInfoPtr pScrn,
70 XvMCContextPtr context,
71 int *num_priv,
72 CARD32 **priv
73);
74
75typedef void (*xf86XvMCDestroyContextProcPtr) (
76 ScrnInfoPtr pScrn,
77 XvMCContextPtr context
78);
79
80/*
81 xf86XvMCCreateSurfaceProc
82
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.
87*/
88
89
90typedef int (*xf86XvMCCreateSurfaceProcPtr) (
91 ScrnInfoPtr pScrn,
92 XvMCSurfacePtr surface,
93 int *num_priv,
94 CARD32 **priv
95);
96
97typedef void (*xf86XvMCDestroySurfaceProcPtr) (
98 ScrnInfoPtr pScrn,
99 XvMCSurfacePtr surface
100);
101
102/*
103 xf86XvMCCreateSubpictureProc
104
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
111 created.
112
113 The driver may pass data back to the client in the same manner as the
114 xf86XvMCCreateContextProc.
115*/
116
117
118typedef int (*xf86XvMCCreateSubpictureProcPtr) (
119 ScrnInfoPtr pScrn,
120 XvMCSubpicturePtr subpicture,
121 int *num_priv,
122 CARD32 **priv
123);
124
125typedef void (*xf86XvMCDestroySubpictureProcPtr) (
126 ScrnInfoPtr pScrn,
127 XvMCSubpicturePtr subpicture
128);
129
130
131typedef struct {
132 char *name;
133 int num_surfaces;
134 XF86MCSurfaceInfoPtr *surfaces;
135 int num_subpictures;
136 XF86ImagePtr *subpictures;
137 xf86XvMCCreateContextProcPtr CreateContext;
138 xf86XvMCDestroyContextProcPtr DestroyContext;
139 xf86XvMCCreateSurfaceProcPtr CreateSurface;
140 xf86XvMCDestroySurfaceProcPtr DestroySurface;
141 xf86XvMCCreateSubpictureProcPtr CreateSubpicture;
142 xf86XvMCDestroySubpictureProcPtr DestroySubpicture;
143} XF86MCAdaptorRec, *XF86MCAdaptorPtr;
144
145/*
146 xf86XvMCScreenInit
147
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.
152*/
153
154Bool xf86XvMCScreenInit(
155 ScreenPtr pScreen,
156 int num_adaptors,
157 XF86MCAdaptorPtr *adaptors
158);
159
160XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void);
161void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor);
162
163#endif /* _XF86XVMC_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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