From 62c16bad5a92c98d3bfaed297cb9eb4f99b0a3a4 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sat, 15 Jun 2013 11:04:42 -0700 Subject: [PATCH] X11rdp: work on xv, still off by default --- xorg/X11R7.6/rdp/rdpmain.c | 2 ++ xorg/X11R7.6/rdp/rdpxv.c | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/xorg/X11R7.6/rdp/rdpmain.c b/xorg/X11R7.6/rdp/rdpmain.c index 2254f128..ffb43d1f 100644 --- a/xorg/X11R7.6/rdp/rdpmain.c +++ b/xorg/X11R7.6/rdp/rdpmain.c @@ -527,6 +527,8 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) } + //rdpXvInit(pScreen); + ErrorF("rdpScreenInit: ret %d\n", ret); return ret; diff --git a/xorg/X11R7.6/rdp/rdpxv.c b/xorg/X11R7.6/rdp/rdpxv.c index 862bbc6a..d0ce8345 100644 --- a/xorg/X11R7.6/rdp/rdpxv.c +++ b/xorg/X11R7.6/rdp/rdpxv.c @@ -29,7 +29,11 @@ XVideo extension #include +extern rdpScreenInfoRec g_rdpScreen; /* from rdpmain.c */ + static DevPrivateKey g_XvScreenKey; +static char g_xv_adaptor_name[] = "xrdp XVideo adaptor"; +static char g_xv_encoding_name[] = "XV_IMAGE"; #define GET_XV_SCREEN(pScreen) \ ((XvScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, g_XvScreenKey)) @@ -359,10 +363,11 @@ rdpXvInitAdaptors(ScreenPtr pScreen) pAdaptor = malloc(sizeof(XvAdaptorRec)); memset(pAdaptor, 0, sizeof(XvAdaptorRec)); - pAdaptor->type = XvInputMask | XvImageMask | XvVideoMask | XvStillMask; + pAdaptor->type = XvInputMask | XvOutputMask | XvImageMask | + XvVideoMask | XvStillMask; pAdaptor->pScreen = pScreen; - pAdaptor->name = "xrdp XVideo adaptor"; + pAdaptor->name = g_xv_adaptor_name; pAdaptor->nEncodings = T_NUM_ENCODINGS; pAdaptor->pEncodings = g_encodings; @@ -394,15 +399,15 @@ rdpXvInitAdaptors(ScreenPtr pScreen) memset(g_encodings, 0, sizeof(g_encodings)); g_encodings[0].id = FakeClientID(0); g_encodings[0].pScreen = pScreen; - g_encodings[0].name = "XV_IMAGE"; + g_encodings[0].name = g_xv_encoding_name; g_encodings[0].width = 2046; g_encodings[0].height = 2046; g_encodings[0].rate.numerator = 1; g_encodings[0].rate.denominator = 1; memset(g_formats, 0, sizeof(g_formats)); - g_formats[0].depth = 24; - g_formats[0].visual = TrueColor; + g_formats[0].depth = g_rdpScreen.depth; + g_formats[0].visual = pScreen->rootVisual; memset(g_ports, 0, sizeof(g_ports)); g_ports[0].id = FakeClientID(0);