First import
[xorg_rtime.git] / xorg-server-1.4 / Xext / xvmcext.h
blob9c019fee6f7a10b58a702354adf6f03ee7be54f6
2 #ifndef _XVMC_H
3 #define _XVMC_H
4 #include <X11/extensions/Xv.h>
5 #include "xvdix.h"
7 typedef struct {
8 int num_xvimages;
9 int *xvimage_ids;
10 } XvMCImageIDList;
12 typedef struct {
13 int surface_type_id;
14 int chroma_format;
15 int color_description;
16 unsigned short max_width;
17 unsigned short max_height;
18 unsigned short subpicture_max_width;
19 unsigned short subpicture_max_height;
20 int mc_type;
21 int flags;
22 XvMCImageIDList *compatible_subpictures;
23 } XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr;
25 typedef struct {
26 XID context_id;
27 ScreenPtr pScreen;
28 int adapt_num;
29 int surface_type_id;
30 unsigned short width;
31 unsigned short height;
32 CARD32 flags;
33 int refcnt;
34 pointer port_priv;
35 pointer driver_priv;
36 } XvMCContextRec, *XvMCContextPtr;
38 typedef struct {
39 XID surface_id;
40 int surface_type_id;
41 XvMCContextPtr context;
42 pointer driver_priv;
43 } XvMCSurfaceRec, *XvMCSurfacePtr;
46 typedef struct {
47 XID subpicture_id;
48 int xvimage_id;
49 unsigned short width;
50 unsigned short height;
51 int num_palette_entries;
52 int entry_bytes;
53 char component_order[4];
54 XvMCContextPtr context;
55 pointer driver_priv;
56 } XvMCSubpictureRec, *XvMCSubpicturePtr;
58 typedef int (*XvMCCreateContextProcPtr) (
59 XvPortPtr port,
60 XvMCContextPtr context,
61 int *num_priv,
62 CARD32 **priv
65 typedef void (*XvMCDestroyContextProcPtr) (
66 XvMCContextPtr context
69 typedef int (*XvMCCreateSurfaceProcPtr) (
70 XvMCSurfacePtr surface,
71 int *num_priv,
72 CARD32 **priv
75 typedef void (*XvMCDestroySurfaceProcPtr) (
76 XvMCSurfacePtr surface
79 typedef int (*XvMCCreateSubpictureProcPtr) (
80 XvMCSubpicturePtr subpicture,
81 int *num_priv,
82 CARD32 **priv
85 typedef void (*XvMCDestroySubpictureProcPtr) (
86 XvMCSubpicturePtr subpicture
90 typedef struct {
91 XvAdaptorPtr xv_adaptor;
92 int num_surfaces;
93 XvMCSurfaceInfoPtr *surfaces;
94 int num_subpictures;
95 XvImagePtr *subpictures;
96 XvMCCreateContextProcPtr CreateContext;
97 XvMCDestroyContextProcPtr DestroyContext;
98 XvMCCreateSurfaceProcPtr CreateSurface;
99 XvMCDestroySurfaceProcPtr DestroySurface;
100 XvMCCreateSubpictureProcPtr CreateSubpicture;
101 XvMCDestroySubpictureProcPtr DestroySubpicture;
102 } XvMCAdaptorRec, *XvMCAdaptorPtr;
104 void XvMCExtensionInit(void);
106 int XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr adapt);
108 XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
110 int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name,
111 char *busID, int major, int minor,
112 int patchLevel);
115 #endif /* _XVMC_H */