summaryrefslogtreecommitdiff
path: root/va
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@gmail.com>2010-10-26 17:28:21 -0700
committerAustin Yuan <shengquan.yuan@gmail.com>2010-10-26 17:28:21 -0700
commitcdb5675e79e01daf1b4808cf41ac61d6843dd4f9 (patch)
tree7b6f694f99c307f896fb2080e45d972a285c1cf6 /va
parent2b46d6fe6db8d42dad311164d30c2753b62df520 (diff)
downloadlibva-cdb5675e79e01daf1b4808cf41ac61d6843dd4f9.tar.gz
print env.
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
Diffstat (limited to 'va')
-rw-r--r--va/va.c4
-rw-r--r--va/va_fool.c19
-rw-r--r--va/va_trace.c22
3 files changed, 33 insertions, 12 deletions
diff --git a/va/va.c b/va/va.c
index 0705521..0320ed3 100644
--- a/va/va.c
+++ b/va/va.c
@@ -116,7 +116,7 @@ int vaDisplayIsValid(VADisplay dpy)
return pDisplayContext && (pDisplayContext->vadpy_magic == VA_DISPLAY_MAGIC) && pDisplayContext->vaIsValid(pDisplayContext);
}
-static void va_errorMessage(const char *msg, ...)
+void va_errorMessage(const char *msg, ...)
{
va_list args;
@@ -126,7 +126,7 @@ static void va_errorMessage(const char *msg, ...)
va_end(args);
}
-static void va_infoMessage(const char *msg, ...)
+void va_infoMessage(const char *msg, ...)
{
va_list args;
diff --git a/va/va_fool.c b/va/va_fool.c
index 0947400..519304d 100644
--- a/va/va_fool.c
+++ b/va/va_fool.c
@@ -107,6 +107,9 @@ static struct _fool_context {
/* Prototype declarations (functions defined in va.c) */
+void va_errorMessage(const char *msg, ...);
+void va_infoMessage(const char *msg, ...);
+
int va_parseConfig(char *env, char *env_value);
VAStatus vaBufferInfo(
@@ -148,19 +151,27 @@ void va_FoolInit(VADisplay dpy)
if (fool_index == FOOL_CONTEXT_MAX)
return;
- if (va_parseConfig("LIBVA_FOOL_POSTP", NULL) == 0)
+ if (va_parseConfig("LIBVA_FOOL_POSTP", NULL) == 0) {
fool_postp = 1;
+ va_infoMessage("LIBVA_FOOL_POSTP is on, dummy vaPutSurface\n");
+ }
- if (va_parseConfig("LIBVA_FOOL_DECODE", NULL) == 0)
- fool_decode = 1;
+ if (va_parseConfig("LIBVA_FOOL_DECODE", NULL) == 0) {
+ fool_decode = 1;
+ va_infoMessage("LIBVA_FOOL_DECODE is on, dummy decode\n");
+ }
+
+
if (va_parseConfig("LIBVA_FOOL_ENCODE", &env_value[0]) == 0) {
FILE *tmp = fopen(env_value, "r");
if (tmp)
fool_context[fool_index].fool_fp_codedclip = tmp;
- fool_encode = 1;
+ fool_encode = 1;
+
+ va_infoMessage("LIBVA_FOOL_ENCODE is on, dummy encode\n");
}
if (fool_encode || fool_decode)
diff --git a/va/va_trace.c b/va/va_trace.c
index 6179d85..c3d19fe 100644
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -109,6 +109,9 @@ static struct _trace_context {
/* Prototype declarations (functions defined in va.c) */
+void va_errorMessage(const char *msg, ...);
+void va_infoMessage(const char *msg, ...);
+
int va_parseConfig(char *env, char *env_value);
VAStatus vaBufferInfo(
@@ -165,17 +168,24 @@ void va_TraceInit(VADisplay dpy)
trace_context[trace_index].trace_fp_log = stderr;
strcpy(trace_context[trace_index].trace_codedbuf_fn, "/dev/stderr");
}
+ va_infoMessage("LIBVA_TRACE is on, save log into %s\n", trace_context[trace_index].trace_log_fn);
}
if (trace_flag == 0)
return;
/* may re-get the global settings for multiple context */
- if (va_parseConfig("LIBVA_TRACE_LOGSIZE", &env_value[0]) == 0)
+ if (va_parseConfig("LIBVA_TRACE_LOGSIZE", &env_value[0]) == 0) {
trace_logsize = atoi(env_value);
+ va_infoMessage("LIBVA_TRACE_LOGSIZE is on, size is %d\n", trace_logsize);
+ }
+
- if (va_parseConfig("LIBVA_TRACE_BUFDATA", NULL) == 0)
+ if (va_parseConfig("LIBVA_TRACE_BUFDATA", NULL) == 0) {
trace_buffer_data = 1; /* dump buffer data */
+ va_infoMessage("LIBVA_TRACE_BUFDATA is on, dump buffer into log file\n");
+ }
+
/* per-context setting */
if (va_parseConfig("LIBVA_TRACE_CODEDBUF", &env_value[0]) == 0) {
@@ -190,6 +200,8 @@ void va_TraceInit(VADisplay dpy)
trace_context[trace_index].trace_fp_codedbuf = stderr;
strcpy(trace_context[trace_index].trace_codedbuf_fn, "/dev/stderr");
}
+
+ va_infoMessage("LIBVA_TRACE_CODEDBUF is on, save coded clip into %s\n", trace_context[trace_index].trace_codedbuf_fn);
}
if (va_parseConfig("LIBVA_TRACE_SURFACE", &env_value[0]) == 0) {
@@ -204,6 +216,8 @@ void va_TraceInit(VADisplay dpy)
trace_context[trace_index].trace_fp_surface = stderr;
strcpy(trace_context[trace_index].trace_surface_fn, "/dev/stderr");
}
+
+ va_infoMessage("LIBVA_TRACE_SURFACE is on, save coded clip into %s\n", trace_context[trace_index].trace_surface_fn);
}
trace_context[trace_index].dpy = dpy;
@@ -1583,8 +1597,6 @@ void va_TraceGetDisplayAttributes (
int num_attributes
)
{
- int i;
-
DPY2INDEX(dpy);
TRACE_FUNCNAME(idx);
@@ -1598,8 +1610,6 @@ void va_TraceSetDisplayAttributes (
int num_attributes
)
{
- int i;
-
DPY2INDEX(dpy);
TRACE_FUNCNAME(idx);