45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef _XVMC_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _XVMC_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/extensions/Xv.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "xvdix.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync int num_xvimages;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *xvimage_ids;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} XvMCImageIDList;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync int surface_type_id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int chroma_format;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int color_description;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned short max_width;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned short max_height;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned short subpicture_max_width;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned short subpicture_max_height;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int mc_type;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int flags;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCImageIDList *compatible_subpictures;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID context_id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync ScreenPtr pScreen;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int adapt_num;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int surface_type_id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned short width;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned short height;
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 flags;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int refcnt;
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer port_priv;
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer driver_priv;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} XvMCContextRec, *XvMCContextPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID surface_id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int surface_type_id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCContextPtr context;
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer driver_priv;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} XvMCSurfaceRec, *XvMCSurfacePtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID subpicture_id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int xvimage_id;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned short width;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned short height;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int num_palette_entries;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int entry_bytes;
45e9809aff7304721fddb95654901b32195c9c7avboxsync char component_order[4];
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCContextPtr context;
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer driver_priv;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} XvMCSubpictureRec, *XvMCSubpicturePtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*XvMCCreateContextProcPtr) (
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvPortPtr port,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCContextPtr context,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *num_priv,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 **priv
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*XvMCDestroyContextProcPtr) (
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCContextPtr context
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*XvMCCreateSurfaceProcPtr) (
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCSurfacePtr surface,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *num_priv,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 **priv
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*XvMCDestroySurfaceProcPtr) (
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCSurfacePtr surface
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*XvMCCreateSubpictureProcPtr) (
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCSubpicturePtr subpicture,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *num_priv,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 **priv
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*XvMCDestroySubpictureProcPtr) (
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCSubpicturePtr subpicture
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvAdaptorPtr xv_adaptor;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int num_surfaces;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCSurfaceInfoPtr *surfaces;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int num_subpictures;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvImagePtr *subpictures;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCCreateContextProcPtr CreateContext;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCDestroyContextProcPtr DestroyContext;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCCreateSurfaceProcPtr CreateSurface;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCDestroySurfaceProcPtr DestroySurface;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCCreateSubpictureProcPtr CreateSubpicture;
45e9809aff7304721fddb95654901b32195c9c7avboxsync XvMCDestroySubpictureProcPtr DestroySubpicture;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} XvMCAdaptorRec, *XvMCAdaptorPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncvoid XvMCExtensionInit(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncint XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr adapt);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncXvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncint xf86XvMCRegisterDRInfo(ScreenPtr pScreen, char *name,
45e9809aff7304721fddb95654901b32195c9c7avboxsync char *busID, int major, int minor,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int patchLevel);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* _XVMC_H */