1 |
|
---|
2 | #ifndef _XVMC_H
|
---|
3 | #define _XVMC_H
|
---|
4 | #include <X11/extensions/Xv.h>
|
---|
5 | #include "xvdix.h"
|
---|
6 |
|
---|
7 | typedef struct {
|
---|
8 | int num_xvimages;
|
---|
9 | int *xvimage_ids;
|
---|
10 | } XvMCImageIDList;
|
---|
11 |
|
---|
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;
|
---|
24 |
|
---|
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 | void *port_priv;
|
---|
35 | void *driver_priv;
|
---|
36 | } XvMCContextRec, *XvMCContextPtr;
|
---|
37 |
|
---|
38 | typedef struct {
|
---|
39 | XID surface_id;
|
---|
40 | int surface_type_id;
|
---|
41 | XvMCContextPtr context;
|
---|
42 | void *driver_priv;
|
---|
43 | } XvMCSurfaceRec, *XvMCSurfacePtr;
|
---|
44 |
|
---|
45 | typedef struct {
|
---|
46 | XID subpicture_id;
|
---|
47 | int xvimage_id;
|
---|
48 | unsigned short width;
|
---|
49 | unsigned short height;
|
---|
50 | int num_palette_entries;
|
---|
51 | int entry_bytes;
|
---|
52 | char component_order[4];
|
---|
53 | XvMCContextPtr context;
|
---|
54 | void *driver_priv;
|
---|
55 | } XvMCSubpictureRec, *XvMCSubpicturePtr;
|
---|
56 |
|
---|
57 | typedef int (*XvMCCreateContextProcPtr) (XvPortPtr port,
|
---|
58 | XvMCContextPtr context,
|
---|
59 | int *num_priv, CARD32 **priv);
|
---|
60 |
|
---|
61 | typedef void (*XvMCDestroyContextProcPtr) (XvMCContextPtr context);
|
---|
62 |
|
---|
63 | typedef int (*XvMCCreateSurfaceProcPtr) (XvMCSurfacePtr surface,
|
---|
64 | int *num_priv, CARD32 **priv);
|
---|
65 |
|
---|
66 | typedef void (*XvMCDestroySurfaceProcPtr) (XvMCSurfacePtr surface);
|
---|
67 |
|
---|
68 | typedef int (*XvMCCreateSubpictureProcPtr) (XvMCSubpicturePtr subpicture,
|
---|
69 | int *num_priv, CARD32 **priv);
|
---|
70 |
|
---|
71 | typedef void (*XvMCDestroySubpictureProcPtr) (XvMCSubpicturePtr subpicture);
|
---|
72 |
|
---|
73 | typedef struct {
|
---|
74 | XvAdaptorPtr xv_adaptor;
|
---|
75 | int num_surfaces;
|
---|
76 | XvMCSurfaceInfoPtr *surfaces;
|
---|
77 | int num_subpictures;
|
---|
78 | XvImagePtr *subpictures;
|
---|
79 | XvMCCreateContextProcPtr CreateContext;
|
---|
80 | XvMCDestroyContextProcPtr DestroyContext;
|
---|
81 | XvMCCreateSurfaceProcPtr CreateSurface;
|
---|
82 | XvMCDestroySurfaceProcPtr DestroySurface;
|
---|
83 | XvMCCreateSubpictureProcPtr CreateSubpicture;
|
---|
84 | XvMCDestroySubpictureProcPtr DestroySubpicture;
|
---|
85 | } XvMCAdaptorRec, *XvMCAdaptorPtr;
|
---|
86 |
|
---|
87 | extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr);
|
---|
88 |
|
---|
89 | extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
|
---|
90 | int num, XvMCAdaptorPtr adapt);
|
---|
91 |
|
---|
92 | extern _X_EXPORT XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
|
---|
93 |
|
---|
94 | extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name,
|
---|
95 | const char *busID, int major, int minor,
|
---|
96 | int patchLevel);
|
---|
97 |
|
---|
98 | #endif /* _XVMC_H */
|
---|