X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2FX11%2Fva_x11.c;h=85b21d5c12929e134dafe6c57c17f422a972ad77;hb=91455761d2584f08dba4e893ef042ce41b33626c;hp=f050648276b3348ddc12630470ad4081a810a212;hpb=997d59cf2092a29979c19a62fbe43d7f8d4dfa29;p=android-x86%2Fhardware-intel-common-libva.git diff --git a/src/X11/va_x11.c b/src/X11/va_x11.c index f050648..85b21d5 100644 --- a/src/X11/va_x11.c +++ b/src/X11/va_x11.c @@ -27,9 +27,14 @@ #include "va_backend.h" #include "va_x11.h" #include "va_dri.h" +#include "va_dri2.h" #include #include #include +#include +#include +#include +#include static VADisplayContextP pDisplayContexts = NULL; @@ -97,7 +102,8 @@ static VAStatus va_DRI2GetDriverName ( { VADriverContextP ctx = pDisplayContext->pDriverContext; VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN; - char *driverName, *deviceName; + int eventBase, errorBase; + char *device_name; int driver_major; int driver_minor; int driver_patch; @@ -114,7 +120,7 @@ static VAStatus va_DRI2GetDriverName ( } if (!VA_DRI2Connect(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), - &driver_name, &device_name)) { + driver_name, &device_name)) { va_infoMessage("DRI2 isn't enabled, fallback to DRI1\n"); return VA_STATUS_ERROR_UNKNOWN; } @@ -214,7 +220,7 @@ static VAStatus va_DisplayContextGetDriverName ( { /* For easier debugging */ if (*driver_name) - Xfree(*driver_name); + XFree(*driver_name); *driver_name = strdup(getenv("LIBVA_DRIVER_NAME")); return VA_STATUS_SUCCESS;