summaryrefslogtreecommitdiff
path: root/xc/include/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'xc/include/extensions')
-rw-r--r--xc/include/extensions/Imakefile19
-rw-r--r--xc/include/extensions/XKBsrv.h3
-rw-r--r--xc/include/extensions/Xext.h9
-rw-r--r--xc/include/extensions/XvMC.h117
-rw-r--r--xc/include/extensions/XvMClib.h145
-rw-r--r--xc/include/extensions/XvMCproto.h204
6 files changed, 486 insertions, 11 deletions
diff --git a/xc/include/extensions/Imakefile b/xc/include/extensions/Imakefile
index 496bb4f38..5f698cb90 100644
--- a/xc/include/extensions/Imakefile
+++ b/xc/include/extensions/Imakefile
@@ -3,31 +3,32 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/18 04:05:44 coskrey Exp $
-XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.37 2001/01/17 17:53:15 dawes Exp $
+XCOMM $XFree86: xc/include/extensions/Imakefile,v 3.39 2001/03/25 05:31:58 tsi Exp $
-#if BuildScreenSaverLibrary
+#if BuildScreenSaverExt
SCREENSAVERHEADERS = saver.h saverproto.h scrnsaver.h
#endif
-#if BuildXF86MiscLibrary
+#if BuildXF86MiscExt
XF86MISCHEADERS = xf86misc.h xf86mscstr.h
#endif
#if BuildXF86BigfontExt
XF86BIGFONTHEADERS = xf86bigfont.h xf86bigfstr.h
#endif
-#if BuildXF86VidModeLibrary
+#if BuildXF86VidModeExt
XF86VIDMODEHEADERS = xf86vmode.h xf86vmstr.h
#endif
-#if BuildXF86DGALibrary
+#if BuildXF86DGA
XF86DGAHEADERS = xf86dga.h xf86dgastr.h xf86dga1.h xf86dga1str.h
#endif
#if BuildLBX
LBXHEADERS = lbxbuf.h lbxbufstr.h lbxdeltastr.h lbximage.h lbxopts.h lbxstr.h lbxzlib.h
#endif
-#if BuildXvLibrary
+#if BuildXvExt
XVHEADERS = Xv.h Xvlib.h Xvproto.h
+XVMCHEADERS = XvMC.h XvMClib.h XvMCproto.h
#endif
-#if BuildXF86RushLibrary
+#if BuildXF86RushExt
XF86RUSHHEADERS = xf86rush.h xf86rushstr.h
#endif
#if BuildFontCache
@@ -36,13 +37,13 @@ FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h
#if BuildXinerama
XINERAMAHEADERS = panoramiXext.h panoramiXproto.h Xinerama.h
#endif
-#if BuildRenderLibrary
+#if BuildRender
RENDERHEADERS = render.h renderproto.h
#endif
EXTRAHEADERS = $(SCREENSAVERHEADERS) $(XF86MISCHEADERS) $(XF86BIGFONTHEADERS) \
$(XF86VIDMODEHEADERS) $(XF86DGAHEADERS) $(XINERAMAHEADERS) \
- $(LBXHEADERS) $(XVHEADERS) $(XF86RUSHHEADERS) \
+ $(LBXHEADERS) $(XVHEADERS) $(XVMCHEADERS) $(XF86RUSHHEADERS) \
$(FONTCACHEHEADERS) $(RENDERHEADERS)
diff --git a/xc/include/extensions/XKBsrv.h b/xc/include/extensions/XKBsrv.h
index eb8cfcc0e..d070c26d2 100644
--- a/xc/include/extensions/XKBsrv.h
+++ b/xc/include/extensions/XKBsrv.h
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.18 2001/01/17 17:53:18 dawes Exp $ */
+/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.19 2001/03/25 05:31:59 tsi Exp $ */
#ifndef _XKBSRV_H_
#define _XKBSRV_H_
@@ -291,6 +291,7 @@ extern int DeviceButtonPress,DeviceButtonRelease;
(c)->curKeySyms.minKeyCode+1)
#define XConvertCase(s,l,u) XkbConvertCase(s,l,u)
+#undef IsKeypadKey
#define IsKeypadKey(s) XkbKSIsKeypad(s)
#define Status int
diff --git a/xc/include/extensions/Xext.h b/xc/include/extensions/Xext.h
index e7dc8faf1..48c543328 100644
--- a/xc/include/extensions/Xext.h
+++ b/xc/include/extensions/Xext.h
@@ -19,6 +19,7 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/include/extensions/Xext.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */
#ifndef _XEXT_H_
#define _XEXT_H_
@@ -37,7 +38,13 @@ extern int (*XSetExtensionErrorHandler(
#endif
)
#endif
-))();
+))(
+#if NeedNestedPrototypes
+ Display *,
+ char *,
+ char *
+#endif
+);
extern int XMissingExtension(
#if NeedFunctionPrototypes
diff --git a/xc/include/extensions/XvMC.h b/xc/include/extensions/XvMC.h
new file mode 100644
index 000000000..2503ef11c
--- /dev/null
+++ b/xc/include/extensions/XvMC.h
@@ -0,0 +1,117 @@
+/* $XFree86: xc/include/extensions/XvMC.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */
+
+#ifndef _XVMC_H_
+#define _XVMC_H_
+
+#include <X11/X.h>
+#include <X11/extensions/Xv.h>
+
+#define XvMCName "XVideo-MotionCompensation"
+#define XvMCNumEvents 0
+#define XvMCNumErrors 3
+#define XvMCVersion 0
+#define XvMCRevision 1
+
+#define XvMCBadContext 0
+#define XvMCBadSurface 1
+#define XvMCBadSubpicture 2
+
+/* Chroma formats */
+#define XVMC_CHROMA_FORMAT_420 0x00000001
+#define XVMC_CHROMA_FORMAT_422 0x00000002
+#define XVMC_CHROMA_FORMAT_444 0x00000003
+
+/* XvMCSurfaceInfo Flags */
+#define XVMC_OVERLAID_SURFACE 0x00000001
+#define XVMC_BACKEND_SUBPICTURE 0x00000002
+#define XVMC_SUBPICTURE_INDEPENDENT_SCALING 0x00000004
+
+/* Motion Compensation types */
+#define XVMC_IDCT 0x00010000
+
+#define XVMC_MPEG_1 0x00000001
+#define XVMC_MPEG_2 0x00000002
+#define XVMC_H263 0x00000003
+#define XVMC_MPEG_4 0x00000004
+
+#define XVMC_MB_TYPE_QUANT 0x01
+#define XVMC_MB_TYPE_MOTION_FORWARD 0x02
+#define XVMC_MB_TYPE_MOTION_BACKWARD 0x04
+#define XVMC_MB_TYPE_PATTERN 0x08
+#define XVMC_MB_TYPE_INTRA 0x10
+
+#define XVMC_PREDICTION_FIELD 0x01
+#define XVMC_PREDICTION_FRAME 0x02
+#define XVMC_PREDICTION_DUAL_PRIME 0x03
+#define XVMC_PREDICTION_16x8 0x02
+#define XVMC_PREDICTION_4MV 0x04
+
+#define XVMC_SELECT_FIRST_FORWARD 0x01
+#define XVMC_SELECT_FIRST_BACKWARD 0x02
+#define XVMC_SELECT_SECOND_FORWARD 0x04
+#define XVMC_SELECT_SECOND_BACKWARD 0x08
+
+#define XVMC_DCT_TYPE_FRAME 0x00
+#define XVMC_DCT_TYPE_FIELD 0x01
+
+#define XVMC_TOP_FIELD 0x00000001
+#define XVMC_BOTTOM_FIELD 0x00000002
+#define XVMC_FRAME_PICTURE (XVMC_TOP_FIELD | XVMC_BOTTOM_FIELD)
+#define XVMC_TOP_FIELD_FIRST 0x00000001
+#define XVMC_PROGRESSIVE_FRAME 0x00000002
+
+#define XVMC_DIRECT 0x00000001
+
+#define XVMC_SCAN_ORDER_ZIG_ZAG 0x00000000
+#define XVMC_SCAN_ORDER_ALTERNATIVE_HORIZONTAL 0x00000001
+#define XVMC_SCAN_ORDER_ALTERNATIVE_VERTICAL 0x00000002
+#define XVMC_SCAN_ORDER_RASTER 0x00000003
+
+#define XVMC_RENDERING 0x00000001
+#define XVMC_DISPLAYING 0x00000002
+
+
+typedef struct {
+ int surface_type_id;
+ int chroma_format;
+ int color_description;
+ unsigned short max_width;
+ unsigned short max_height;
+ unsigned short subpicture_max_width;
+ unsigned short subpicture_max_height;
+ int mc_type;
+ int flags;
+} XvMCSurfaceInfo;
+
+typedef struct {
+ XID context_id;
+ int surface_type_id;
+ unsigned short width;
+ unsigned short height;
+ XvPortID port;
+ int flags;
+ void * privData; /* private to the library */
+} XvMCContext;
+
+typedef struct {
+ XID surface_id;
+ XID context_id;
+ int surface_type_id;
+ unsigned short width;
+ unsigned short height;
+ void *privData; /* private to the library */
+} XvMCSurface;
+
+typedef struct {
+ XID subpicture_id;
+ XID context_id;
+ int xvimage_id;
+ unsigned short width;
+ unsigned short height;
+ int num_palette_entries;
+ int entry_bytes;
+ char component_order[4];
+ void *privData; /* private to the library */
+} XvMCSubpicture;
+
+#endif
diff --git a/xc/include/extensions/XvMClib.h b/xc/include/extensions/XvMClib.h
new file mode 100644
index 000000000..4ac8ff43e
--- /dev/null
+++ b/xc/include/extensions/XvMClib.h
@@ -0,0 +1,145 @@
+/* $XFree86: xc/include/extensions/XvMClib.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */
+
+#ifndef _XVMCLIB_H_
+#define _XVMCLIB_H_
+
+#include <X11/extensions/Xvlib.h>
+#include <X11/extensions/XvMC.h>
+
+Bool XvMCQueryExtension (Display *display, int *eventBase, int *errBase);
+Status XvMCQueryVersion (Display *display, int *major, int *minor);
+
+XvMCSurfaceInfo * XvMCListSurfaceTypes(Display *dpy, XvPortID port, int *num);
+
+Status XvMCCreateContext (
+ Display *display,
+ XvPortID port,
+ int surface_type_id,
+ int width,
+ int height,
+ int flags,
+ XvMCContext * context
+);
+
+Status XvMCDestroyContext (Display *display, XvMCContext * context);
+
+Status
+XvMCCreateSurface(
+ Display *display,
+ XvMCContext * context,
+ XvMCSurface * surface
+);
+
+Status XvMCDestroySurface(Display *display, XvMCSurface *surface);
+
+XvImageFormatValues * XvMCListSubpictureTypes (
+ Display * display,
+ XvPortID port,
+ int surface_type_id,
+ int *count_return
+);
+
+Status
+XvMCPutSurface(
+ Display *display,
+ XvMCSurface *surface,
+ Drawable draw,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth,
+ int flags
+);
+
+Status XvMCHideSurface(Display *display, XvMCSurface *surface);
+
+Status
+XvMCCreateSubpicture (
+ Display *display,
+ XvMCContext *context,
+ XvMCSubpicture *subpicture,
+ unsigned short width,
+ unsigned short height,
+ int xvimage_id
+);
+
+
+Status
+XvMCClearSubpicture (
+ Display *display,
+ XvMCSubpicture *subpicture,
+ short x,
+ short y,
+ unsigned short width,
+ unsigned short height,
+ unsigned int color
+);
+
+Status
+XvMCCompositeSubpicture (
+ Display *display,
+ XvMCSubpicture *subpicture,
+ XvImage *image,
+ short srcx,
+ short srcy,
+ unsigned short width,
+ unsigned short height,
+ short dstx,
+ short dsty
+);
+
+Status
+XvMCDestroySubpicture (Display *display, XvMCSubpicture *subpicture);
+
+Status
+XvMCSetSubpicturePalette (
+ Display *display,
+ XvMCSubpicture *subpicture,
+ unsigned char *palette
+);
+
+Status
+XvMCBlendSubpicture (
+ Display *display,
+ XvMCSurface *target_surface,
+ XvMCSubpicture *subpicture,
+ short subx,
+ short suby,
+ unsigned short subw,
+ unsigned short subh,
+ short surfx,
+ short surfy,
+ unsigned short surfw,
+ unsigned short surfh
+);
+
+Status
+XvMCBlendSubpicture2 (
+ Display *display,
+ XvMCSurface *source_surface,
+ XvMCSurface *target_surface,
+ XvMCSubpicture *subpicture,
+ short subx,
+ short suby,
+ unsigned short subw,
+ unsigned short subh,
+ short surfx,
+ short surfy,
+ unsigned short surfw,
+ unsigned short surfh
+);
+
+Status XvMCSyncSurface (Display *display, XvMCSurface *surface);
+Status XvMCFlushSurface (Display *display, XvMCSurface *surface);
+Status XvMCGetSurfaceStatus (Display *display, XvMCSurface *surface, int *stat);
+
+Status XvMCSyncSubpicture (Display *display, XvMCSubpicture *subpicture);
+Status XvMCFlushSubpicture (Display *display, XvMCSubpicture *subpicture);
+Status
+XvMCGetSubpictureStatus (Display *display, XvMCSubpicture *subpic, int *stat);
+
+#endif
diff --git a/xc/include/extensions/XvMCproto.h b/xc/include/extensions/XvMCproto.h
new file mode 100644
index 000000000..34405f056
--- /dev/null
+++ b/xc/include/extensions/XvMCproto.h
@@ -0,0 +1,204 @@
+/* $XFree86: xc/include/extensions/XvMCproto.h,v 1.3 2001/04/01 13:59:59 tsi Exp $ */
+
+#ifndef _XVMCPROTO_H_
+#define _XVMCPROTO_H_
+
+#define xvmc_QueryVersion 0
+#define xvmc_ListSurfaceTypes 1
+#define xvmc_CreateContext 2
+#define xvmc_DestroyContext 3
+#define xvmc_CreateSurface 4
+#define xvmc_DestroySurface 5
+#define xvmc_CreateSubpicture 6
+#define xvmc_DestroySubpicture 7
+#define xvmc_ListSubpictureTypes 8
+#define xvmc_LastRequest xvmc_ListSubpictureTypes
+
+#define xvmcNumRequest (xvmc_LastRequest + 1)
+
+
+typedef struct {
+ CARD32 surface_type_id B32;
+ CARD16 chroma_format B16;
+ CARD16 color_description B16;
+ CARD16 max_width B16;
+ CARD16 max_height B16;
+ CARD16 subpicture_max_width B16;
+ CARD16 subpicture_max_height B16;
+ CARD32 mc_type B32;
+ CARD32 flags B32;
+} xvmcSurfaceInfo;
+#define sz_xvmcSurfaceInfo 24;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+} xvmcQueryVersionReq;
+#define sz_xvmcQueryVersionReq 4;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE padb1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 major B32;
+ CARD32 minor B32;
+ CARD32 padl4 B32;
+ CARD32 padl5 B32;
+ CARD32 padl6 B32;
+ CARD32 padl7 B32;
+} xvmcQueryVersionReply;
+#define sz_xvmcQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+ CARD32 port B32;
+} xvmcListSurfaceTypesReq;
+#define sz_xvmcListSurfaceTypesReq 8;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE padb1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 num B32;
+ CARD32 padl3 B32;
+ CARD32 padl4 B32;
+ CARD32 padl5 B32;
+ CARD32 padl6 B32;
+ CARD32 padl7 B32;
+} xvmcListSurfaceTypesReply;
+#define sz_xvmcListSurfaceTypesReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+ CARD32 context_id B32;
+ CARD32 port B32;
+ CARD32 surface_type_id B32;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD32 flags B32;
+} xvmcCreateContextReq;
+#define sz_xvmcCreateContextReq 24;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE padb1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 width_actual B16;
+ CARD16 height_actual B16;
+ CARD32 flags_return B32;
+ CARD32 padl4 B32;
+ CARD32 padl5 B32;
+ CARD32 padl6 B32;
+ CARD32 padl7 B32;
+} xvmcCreateContextReply;
+#define sz_xvmcCreateContextReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+ CARD32 context_id B32;
+} xvmcDestroyContextReq;
+#define sz_xvmcDestroyContextReq 8;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+ CARD32 surface_id B32;
+ CARD32 context_id B32;
+} xvmcCreateSurfaceReq;
+#define sz_xvmcCreateSurfaceReq 12;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE padb1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 padl2 B32;
+ CARD32 padl3 B32;
+ CARD32 padl4 B32;
+ CARD32 padl5 B32;
+ CARD32 padl6 B32;
+ CARD32 padl7 B32;
+} xvmcCreateSurfaceReply;
+#define sz_xvmcCreateSurfaceReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+ CARD32 surface_id B32;
+} xvmcDestroySurfaceReq;
+#define sz_xvmcDestroySurfaceReq 8;
+
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+ CARD32 subpicture_id B32;
+ CARD32 context_id B32;
+ CARD32 xvimage_id B32;
+ CARD16 width B16;
+ CARD16 height B16;
+} xvmcCreateSubpictureReq;
+#define sz_xvmcCreateSubpictureReq 20;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE padb1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 width_actual B16;
+ CARD16 height_actual B16;
+ CARD16 num_palette_entries B16;
+ CARD16 entry_bytes B16;
+ CARD8 component_order[4];
+ CARD32 padl5 B32;
+ CARD32 padl6 B32;
+ CARD32 padl7 B32;
+} xvmcCreateSubpictureReply;
+#define sz_xvmcCreateSubpictureReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+ CARD32 subpicture_id B32;
+} xvmcDestroySubpictureReq;
+#define sz_xvmcDestroySubpictureReq 8;
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xvmcReqType;
+ CARD16 length B16;
+ CARD32 port B32;
+ CARD32 surface_type_id B32;
+} xvmcListSubpictureTypesReq;
+#define sz_xvmcListSubpictureTypesReq 12;
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE padb1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 num B32;
+ CARD32 padl2 B32;
+ CARD32 padl3 B32;
+ CARD32 padl4 B32;
+ CARD32 padl5 B32;
+ CARD32 padl6 B32;
+ CARD32 padl7 B32;
+} xvmcListSubpictureTypesReply;
+#define sz_xvmcListSubpictureTypesReply 32
+
+#endif