summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2009-07-02 09:15:58 +0000
committerAustin Yuan <shengquan.yuan@intel.com>2009-07-08 14:19:00 +0800
commit1a24c916774a313a306223a094c90863bedeca3e (patch)
treee7c6b8aa6271df2d5ef81125f6fae5db9d45dc23 /test
parent7dcb5b1c2476a0e29fca316bb655dfa1f5991586 (diff)
Fix build of vainfo.
commit f8aebf54e0d6b2411cb495f9fab71dc8a05c245c Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com> Date: Thu Jun 25 14:06:38 2009 +0000 Further fixes to vainfo: use strrchr() instead of rindex(), make profile_string() and entrypoint_string() always return a value. commit 4e6d19d5588998b5a9da30500ce727410b5787ef Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com> Date: Wed Jun 24 12:43:55 2009 +0000 Fix vainfo error messages. Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am2
-rw-r--r--test/vainfo.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 37b3f06..6554962 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -23,7 +23,7 @@
check_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \
test_07 test_08 test_09 test_10 test_11 test_12
-bin_PROGRAMS =
+bin_PROGRAMS = vainfo
testdir = $(bindir)
diff --git a/test/vainfo.c b/test/vainfo.c
index a886815..ed05881 100644
--- a/test/vainfo.c
+++ b/test/vainfo.c
@@ -22,7 +22,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <X11/va_x11.h>
+#include <va_x11.h>
#include <stdarg.h>
#include <stdio.h>
@@ -32,7 +32,7 @@
#define CHECK_VASTATUS(va_status,func, ret) \
if (va_status != VA_STATUS_SUCCESS) { \
- fprintf(stderr,"%s failed with error code %d (%s),exit\n",func, vaErrorStr(va_status)); \
+ fprintf(stderr,"%s failed with error code %d (%s),exit\n",func, va_status, vaErrorStr(va_status)); \
exit(ret); \
}
@@ -52,6 +52,7 @@ static char * profile_string(VAProfile profile)
case VAProfileVC1Advanced: return "VAProfileVC1Advanced";
case VAProfileH263Baseline: return "VAProfileH263Baseline";
}
+ return "<unknown profile>";
}
@@ -65,6 +66,7 @@ static char * entrypoint_string(VAEntrypoint entrypoint)
case VAEntrypointDeblocking:return "VAEntrypointDeblocking";
case VAEntrypointEncSlice:return "VAEntrypointEncSlice";
}
+ return "<unknown entrypoint>";
}
int main(int argc, const char* argv[])
@@ -75,7 +77,7 @@ int main(int argc, const char* argv[])
int major_version, minor_version;
const char *driver;
const char *display = getenv("DISPLAY");
- const char *name = rindex(argv[0], '/');
+ const char *name = strrchr(argv[0], '/');
VAProfile profile;
VAEntrypoint entrypoint, entrypoints[10];
int num_entrypoint;