summaryrefslogtreecommitdiff
path: root/src/xvmc/intel_xvmc.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2007-11-16 16:08:06 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2007-11-16 16:08:06 +0800
commitdf718a77c854c9110a81c2bc2a32a9aac85850f2 (patch)
treea27e47d3feaeb1685a67cf20b2068544af5c99cd /src/xvmc/intel_xvmc.c
parenta03a758db0df615fbb44dae1ab6910bfeaeb54f9 (diff)
xvmc: add xvmc decoder type string
Diffstat (limited to 'src/xvmc/intel_xvmc.c')
-rw-r--r--src/xvmc/intel_xvmc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index 1de53f3b..0b90e81f 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -142,8 +142,7 @@ Status XvMCCreateContext(Display *display, XvPortID port,
}
comm = (struct _intel_xvmc_common *)priv_data;
- XVMC_INFO("hw xvmc type %d", comm->type);
- //XXX: how to handle different driver types
+
if (xvmc_driver == NULL || xvmc_driver->type != comm->type) {
switch (comm->type) {
case XVMC_I915_MPEG2_MC:
@@ -158,17 +157,15 @@ Status XvMCCreateContext(Display *display, XvPortID port,
priv_data = NULL;
return BadValue;
}
- } else {
- XVMC_ERR("wrong hw xvmc type returned\n");
- free(priv_data);
- priv_data = NULL;
- return BadValue;
}
if (xvmc_driver == NULL || xvmc_driver->type != comm->type) {
XVMC_ERR("fail to load xvmc driver for type %d\n", comm->type);
return BadValue;
}
+
+ XVMC_INFO("decoder type is %s", intel_xvmc_decoder_string(comm->type));
+
xvmc_driver->sarea_size = comm->sarea_size;
xvmc_driver->batchbuffer.handle = comm->batchbuffer.handle;
xvmc_driver->batchbuffer.offset = comm->batchbuffer.offset;