设为首页 加入收藏

TOP

How to build ffmpeg with hardware accelerated codecs for Android x86(二)
2019-09-01 23:13:26 】 浏览:45
Tags:How build ffmpeg with hardware accelerated codecs for Android x86
detect the video codec capability of the system.

Under the folder external, clone the repository at branch 1.8.3

git clone -b 1.8.3 https://github.com/intel/libva-utils.git

Enter the libva-utils folder, change a bit the source code. The system's libva under driver is 1.1.0, it's not very compatible with the libva-utils, which is a new program.

diff --git a/vainfo/vainfo.c b/vainfo/vainfo.c
index 4405073..5d9f055 100644
--- a/vainfo/vainfo.c
+++ b/vainfo/vainfo.c
@@ -97,7 +97,8 @@ int main(int argc, const char* argv[])
   const char *name = strrchr(argv[0], '/'); 
   VAProfile profile, *profile_list = NULL;
   int num_profiles, max_num_profiles, i;
-  VAEntrypoint entrypoint, entrypoints[10];
+  VAEntrypoint entrypoints[10];
+  int entrypoint_index;
   int num_entrypoint;
   int ret_val = 0;
   
@@ -118,8 +119,8 @@ int main(int argc, const char* argv[])
   va_status = vaInitialize(va_dpy, &major_version, &minor_version);
   CHECK_VASTATUS(va_status, "vaInitialize", 3);
   
-  printf("%s: VA-API version: %d.%d (libva %s)\n",
-         name, major_version, minor_version, LIBVA_VERSION_S);
+  printf("%s: VA-API version: %d.%d\n",
+         name, major_version, minor_version);
 
   driver = vaQueryVendorString(va_dpy);
   printf("%s: Driver version: %s\n", name, driver ? driver : "<unknown>");
@@ -149,8 +150,8 @@ int main(int argc, const char* argv[])
       CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints", 4);
 
       profile_str = profile_string(profile);
-      for (entrypoint = 0; entrypoint < num_entrypoint; entrypoint++)
-          printf("      %-32s: %s\n", profile_str, entrypoint_string(entrypoints[entrypoint]));
+      for (entrypoint_index = 0; entrypoint_index < num_entrypoint; entrypoint_index++)
+          printf("      %-32s: %s\n", profile_str, entrypoint_string(entrypoints[entrypoint_index]));

Just make the vainfo.c is able to be compiled with system libva.

Back to the folder android-x86, type

mmm external/libva-utils

to just build the specific module. That's it, now the /system/bin/vainfo would be there !


References

  • http://www.android-x86.org/getsourcecode
  • https://github.com/CyanogenMod/android_external_ffmpeg
  • https://github.com/intel/libva
  • https://github.com/intel/libva-utils
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇一起学Android之Dialog 下一篇oppo5.0以上系统怎么样不Root激活..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目