summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2009-11-20 16:07:03 +0800
committerAustin Yuan <shengquan.yuan@intel.com>2009-11-20 16:07:03 +0800
commit1ead54598b3562dec0bb17e9a35284a274c47056 (patch)
treee8f54736c22146c3b2c9caae1f5912548d95875c /src
parent7e62098ac9851fde3b86d8c73f742c0d7685e056 (diff)
parent2135de7e7c18e3668c2a8f9fc15db6e671fab8df (diff)
downloadlibva-1ead54598b3562dec0bb17e9a35284a274c47056.tar.gz
Merge branch 'master' of git+ssh://AustinYuan@git.freedesktop.org/git/libva20091120_Alpha3
Diffstat (limited to 'src')
-rw-r--r--src/va.c2
-rwxr-xr-x[-rw-r--r--]src/va.h4
-rw-r--r--src/x11/dri1_util.c1
-rw-r--r--src/x11/va_x11.c76
4 files changed, 19 insertions, 64 deletions
diff --git a/src/va.c b/src/va.c
index 2eaa966..6bc9c06 100644
--- a/src/va.c
+++ b/src/va.c
@@ -313,6 +313,8 @@ const char *vaErrorStr(VAStatus error_status)
return "resolution not supported";
case VA_STATUS_ERROR_UNIMPLEMENTED:
return "the requested function is not implemented";
+ case VA_STATUS_ERROR_SURFACE_IN_DISPLAYING:
+ return "surface is in displaying (may by overlay)" ;
case VA_STATUS_ERROR_UNKNOWN:
return "unknown libva error";
}
diff --git a/src/va.h b/src/va.h
index d3f901b..525e192 100644..100755
--- a/src/va.h
+++ b/src/va.h
@@ -127,7 +127,8 @@ typedef int VAStatus; /* Return status type from functions */
#define VA_STATUS_ERROR_FLAG_NOT_SUPPORTED 0x00000011
#define VA_STATUS_ERROR_INVALID_PARAMETER 0x00000012
#define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013
-#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014
+#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014
+#define VA_STATUS_ERROR_SURFACE_IN_DISPLAYING 0x00000015
#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF
/*
@@ -569,6 +570,7 @@ typedef struct _VASliceParameterBufferMPEG2
unsigned int slice_data_offset;/* the offset to the first byte of slice data */
unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */
+ unsigned int slice_horizontal_position;
unsigned int slice_vertical_position;
int quantiser_scale_code;
int intra_slice_flag;
diff --git a/src/x11/dri1_util.c b/src/x11/dri1_util.c
index b3db5b4..3e67e2a 100644
--- a/src/x11/dri1_util.c
+++ b/src/x11/dri1_util.c
@@ -107,7 +107,6 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
dri_state->fd = drmOpenOnce(NULL, BusID, &newlyopened);
XFree(BusID);
- assert(dri_state->fd >= 0);
if (dri_state->fd < 0)
goto err_out1;
diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c
index 9de904e..5908fbe 100644
--- a/src/x11/va_x11.c
+++ b/src/x11/va_x11.c
@@ -42,26 +42,6 @@
static VADisplayContextP pDisplayContexts = NULL;
-static void va_errorMessage(const char *msg, ...)
-{
- va_list args;
-
- fprintf(stderr, "libva error: ");
- va_start(args, msg);
- vfprintf(stderr, msg, args);
- va_end(args);
-}
-
-static void va_infoMessage(const char *msg, ...)
-{
- va_list args;
-
- fprintf(stderr, "libva: ");
- va_start(args, msg);
- vfprintf(stderr, msg, args);
- va_end(args);
-}
-
static int va_DisplayContextIsValid (
VADisplayContextP pDisplayContext
)
@@ -132,49 +112,21 @@ static VAStatus va_NVCTRL_GetDriverName (
)
{
VADriverContextP ctx = pDisplayContext->pDriverContext;
- VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
- int direct_capable;
- int driver_major;
- int driver_minor;
- int driver_patch;
- Bool result = True;
- char *nvidia_driver_name = NULL;
+ int direct_capable, driver_major, driver_minor, driver_patch;
+ Bool result;
- if (result)
- {
- result = VA_NVCTRLQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen, &direct_capable);
- if (!result)
- {
- va_errorMessage("VA_NVCTRLQueryDirectRenderingCapable failed\n");
- }
- }
- if (result)
- {
- result = direct_capable;
- if (!result)
- {
- va_errorMessage("VA_NVCTRLQueryDirectRenderingCapable returned false\n");
- }
- }
- if (result)
- {
- result = VA_NVCTRLGetClientDriverName(ctx->x11_dpy, ctx->x11_screen, &driver_major, &driver_minor,
- &driver_patch, &nvidia_driver_name);
- if (!result)
- {
- va_errorMessage("VA_NVCTRLGetClientDriverName returned false\n");
- }
- }
- if (result)
- {
- vaStatus = VA_STATUS_SUCCESS;
- va_infoMessage("va_NVCTRL_GetDriverName: %d.%d.%d %s (screen %d)\n",
- driver_major, driver_minor, driver_patch,
- nvidia_driver_name, ctx->x11_screen);
- if (driver_name)
- *driver_name = nvidia_driver_name;
- }
- return vaStatus;
+ result = VA_NVCTRLQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen,
+ &direct_capable);
+ if (!result || !direct_capable)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ result = VA_NVCTRLGetClientDriverName(ctx->x11_dpy, ctx->x11_screen,
+ &driver_major, &driver_minor,
+ &driver_patch, driver_name);
+ if (!result)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ return VA_STATUS_SUCCESS;
}
static VAStatus va_DisplayContextGetDriverName (