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