• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/libva


Commit MetaInfo

Revisionb4d0874dcbe99d1f47bd39d0c156ea89ecd0ebcc (tree)
Time2017-06-12 14:55:40
AuthorGiuseppe <giuscri@gmai...>
CommiterXiang, Haihao

Log Message

Add va_MessagingInit().

Previous to this commit, changing verbosity level
was only possible at build time via the definition
of ENABLE_VA_MESSAGING.

Now it's possible to choose a verbosity level between
{0, 1, 2} by modifying /etc/libva.conf or by setting
the corresponding environment variable LIBVA_MESSAGING_LEVEL.

Signed-off-by: Giuseppe <giuscri@gmail.com>

Change Summary

Incremental Difference

--- a/va/va.c
+++ b/va/va.c
@@ -159,6 +159,24 @@ vaMessageCallback vaSetInfoCallback(vaMessageCallback callback)
159159 return old_callback;
160160 }
161161
162+void va_MessagingInit()
163+{
164+#if ENABLE_VA_MESSAGING
165+ char env_value[1024];
166+
167+ if (va_parseConfig("LIBVA_MESSAGING_LEVEL", &env_value[0]) == 0) {
168+ if (strcmp(env_value, "0") == 0) {
169+ vaSetInfoCallback(NULL);
170+ vaSetErrorCallback(NULL);
171+ }
172+
173+ if (strcmp(env_value, "1") == 0) {
174+ vaSetInfoCallback(NULL);
175+ }
176+ }
177+#endif
178+}
179+
162180 void va_errorMessage(const char *msg, ...)
163181 {
164182 #if ENABLE_VA_MESSAGING
@@ -591,6 +609,8 @@ VAStatus vaInitialize (
591609
592610 va_FoolInit(dpy);
593611
612+ va_MessagingInit();
613+
594614 va_infoMessage("VA-API version %s\n", VA_VERSION_S);
595615
596616 vaStatus = va_getDriverName(dpy, &driver_name);