XvMC Wrapper, Round 2.

Thomas Hellström unichrome at shipmail.org
Wed Sep 22 05:51:13 PDT 2004


Hi

I had a go of implementing the protocol for XvMC client driver name.
Works like this:

1. The server side driver checks the X server version. If it is compatible
with client name registering, it calls

XvMCRegisterDRIClientDriverName(ScreenPtr pScreen, char *name)

right after

XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt).

This should maintain backwards binary compatibility. If the register
function is not called, the name defaults to NULL.

2. When a client calls one of the wrapper functions, the wrapper tries to
obtain the name from the X server through a
char *XvMCDRIGetClientName (display, port).
If it fails, or the name is NULL, it checks the /etc/X11/XvMCConfig file
for the client driver name, dlopens() and is up running.

This would require the following protocol additions, but the client
drivers need not be changed and there's only a minimal change on the
server driver side:

This could all in fact be implemented in libXvMC.so, but since most
players already link that together with a hardware specific library this
might not be the way to go. The alternative is to provide libXvMCW.so or
bump .so version?

Again, comments and opinions would be appreciated.

/Thomas


diff -u -r1.5 XvMCproto.h
--- XvMCproto.h 14 Nov 2001 21:54:37 -0000      1.5
+++ XvMCproto.h 22 Sep 2004 12:39:40 -0000
@@ -12,7 +12,8 @@
 #define xvmc_CreateSubpicture          6
 #define xvmc_DestroySubpicture         7
 #define xvmc_ListSubpictureTypes       8
-#define xvmc_LastRequest               xvmc_ListSubpictureTypes
+#define xvmc_DRIGetClientDriverName     9
+#define xvmc_LastRequest               xvmc_DRIGetClientDriverName

 #define xvmcNumRequest                 (xvmc_LastRequest + 1)


@@ -200,4 +203,25 @@
 } xvmcListSubpictureTypesReply;
 #define sz_xvmcListSubpictureTypesReply 32

+typedef struct {
+  CARD8 reqType;
+  CARD8 xvmcReqType;
+  CARD16 length B16;
+  CARD32 port B32;
+} xvmcDRIGetClientDriverNameReq;
+#define sz_xvmcDRIGetClientDriverNameReq 4;
+
+typedef struct {
+  BYTE type;  /* X_Reply */
+  BYTE padb1;
+  CARD16 sequenceNumber B16;
+  CARD32 length B32;
+  CARD32 padl2; /* Future extension, like DDX version ??? */
+  CARD32 padl3;
+} xvmcDRIGetClientDriverNameReply;
+#define sz_xvmcGetClientDriverNameReply 16
+
+
+
+
 #endif















More information about the xorg mailing list