summaryrefslogtreecommitdiff
path: root/va/va.c
diff options
context:
space:
mode:
Diffstat (limited to 'va/va.c')
-rw-r--r--va/va.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/va/va.c b/va/va.c
index a573bd7..0a129a9 100644
--- a/va/va.c
+++ b/va/va.c
@@ -159,6 +159,24 @@ vaMessageCallback vaSetInfoCallback(vaMessageCallback callback)
return old_callback;
}
+void va_MessagingInit()
+{
+#if ENABLE_VA_MESSAGING
+ char env_value[1024];
+
+ if (va_parseConfig("LIBVA_MESSAGING_LEVEL", &env_value[0]) == 0) {
+ if (strcmp(env_value, "0") == 0) {
+ vaSetInfoCallback(NULL);
+ vaSetErrorCallback(NULL);
+ }
+
+ if (strcmp(env_value, "1") == 0) {
+ vaSetInfoCallback(NULL);
+ }
+ }
+#endif
+}
+
void va_errorMessage(const char *msg, ...)
{
#if ENABLE_VA_MESSAGING
@@ -591,6 +609,8 @@ VAStatus vaInitialize (
va_FoolInit(dpy);
+ va_MessagingInit();
+
va_infoMessage("VA-API version %s\n", VA_VERSION_S);
vaStatus = va_getDriverName(dpy, &driver_name);