1 /* SPDX-License-Identifier: MIT OR X11
3 * Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
5 #ifndef _XORG_XVDIX_PRIV_H
9 #include "include/pixmap.h"
10 #include "include/regionstr.h"
11 #include "Xext/xvdix.h"
13 #define VALIDATE_XV_PORT(portID, pPort, mode)\
15 int rc = dixLookupResourceByType((void **)&(pPort), portID,\
16 XvRTPort, client, mode);\
23 #define _XvBadPort (XvBadPort+XvErrorBase)
26 int version
, revision
;
28 XvAdaptorPtr pAdaptors
;
29 DestroyWindowProcPtr DestroyWindow
;
30 DestroyPixmapProcPtr DestroyPixmap
;
31 CloseScreenProcPtr CloseScreen
;
32 } XvScreenRec
, *XvScreenPtr
;
34 typedef struct _XvPortNotifyRec
{
35 struct _XvPortNotifyRec
*next
;
38 } XvPortNotifyRec
, *XvPortNotifyPtr
;
41 extern int XvErrorBase
;
43 extern RESTYPE XvRTPort
;
45 /* dispatch functions */
46 int ProcXvDispatch(ClientPtr
);
47 int SProcXvDispatch(ClientPtr
);
49 void XvFreeAdaptor(XvAdaptorPtr pAdaptor
);
51 void XvFillColorKey(DrawablePtr pDraw
, CARD32 key
, RegionPtr region
);
53 int XvdiSelectVideoNotify(ClientPtr client
, DrawablePtr pDraw
, BOOL onoff
);
54 int XvdiSelectPortNotify(ClientPtr client
, XvPortPtr pPort
, BOOL onoff
);
56 int XvdiPutVideo(ClientPtr client
, DrawablePtr pDraw
, XvPortPtr pPort
,
57 GCPtr pGC
, INT16 vid_x
, INT16 vid_y
, CARD16 vid_w
,
58 CARD16 wid_h
, INT16 drw_x
, INT16 drw_y
, CARD16 drw_w
,
60 int XvdiPutStill(ClientPtr client
, DrawablePtr pDraw
, XvPortPtr pPort
,
61 GCPtr pGC
, INT16 vid_x
, INT16 vid_y
, CARD16 vid_w
,
62 CARD16 vid_h
, INT16 drw_x
, INT16 drw_y
, CARD16 drw_w
,
64 int XvdiPutImage(ClientPtr client
, DrawablePtr pDraw
, XvPortPtr pPort
,
65 GCPtr pGC
, INT16 src_x
, INT16 src_y
, CARD16 src_w
,
66 CARD16 src_h
, INT16 drw_x
, INT16 drw_y
, CARD16 drw_w
,
67 CARD16 drw_h
, XvImagePtr image
, unsigned char *data
,
68 Bool sync
, CARD16 width
, CARD16 height
);
70 int XvdiGetVideo(ClientPtr client
, DrawablePtr pDraw
, XvPortPtr pPort
,
71 GCPtr pGC
, INT16 vid_x
, INT16 vid_y
, CARD16 vid_w
,
72 CARD16 vid_h
, INT16 drw_x
, INT16 drw_y
, CARD16 drw_w
,
74 int XvdiGetStill(ClientPtr client
, DrawablePtr pDraw
, XvPortPtr pPort
,
75 GCPtr pGC
, INT16 vid_x
, INT16 vid_y
, CARD16 vid_w
,
76 CARD16 vid_h
, INT16 drw_x
, INT16 drw_y
, CARD16 drw_w
,
79 int XvdiSetPortAttribute(ClientPtr client
, XvPortPtr pPort
, Atom attribute
,
81 int XvdiGetPortAttribute(ClientPtr client
, XvPortPtr pPort
, Atom attribute
,
84 int XvdiStopVideo(ClientPtr client
, XvPortPtr pPort
, DrawablePtr pDraw
);
86 int XvdiMatchPort(XvPortPtr pPort
, DrawablePtr pDraw
);
88 int XvdiGrabPort(ClientPtr client
, XvPortPtr pPort
, Time ctime
, int *p_result
);
89 int XvdiUngrabPort(ClientPtr client
, XvPortPtr pPort
, Time ctime
);
91 XvImagePtr
XvMCFindXvImage(XvPortPtr pPort
, CARD32 id
);
93 #endif /* _XORG_XVDIX_PRIV_H */