Hardware decoder availability on exynos CPU

jeremi.wojcicki jeremi.wojcicki at gmail.com
Tue Jul 25 07:15:04 UTC 2017


Hi Nicolas, thanks for helping me out with it.

I have done quite some investigation into the matter and I agree that the
issue lays in the fact that the symbol
"gst_android_get_application_class_loader" cannot be found. The problem,
tough, is that the gstreamer_android.c is, as a matter of fact in my
project, it is being "regenerated" by Android.mk (or rather gstreamer
makefile), it is compiled and linked into an .so file which does upload to
the phone.
To verify that it is loaded on runtime I also added some android info
printfs into the init functions in the gstreamer_android.c and they do run
on application load. The "gst_android_get_application_class_loader" is never
called tough.

As they are called (or should be) dynamically by glib, i though that maybe
optimizer removes this function at compilation time as they seem to be
unused. To exclude this possibility I added a call to it in a rather unused
part of gstreamer_android.c (some error handler), to make sure that compiler
doesn't kick it out. But this did not help either.
To make sure that there is nothing wrong in my project config (I develop
with android studio under windows), I installed sdk and ndk on ubuntu and
compiled the "bare" android-tutorial-3 (following the very nice tutorial
https://gstreamer.freedesktop.org/documentation/installing/for-android-development.html),
modifying solely the Android.mk by adding "androidmedia" plugin. Problem
occurs again...

Then I tried some other devices, and here, surprise surprise, I actually got
some results. I use Galaxy S8 (android 7.0, api=24, aarch64, arm64-v8a) - 
fail, I tried on Galaxy S6 (android 7.0, api=24, aarch64, arm64-v8a) - fail,
and eventually, on an old Sony Xperia SP (android 4.3, api=18, i guess arm
or arm7) and here it worked - I could finally see some amc* plugins.

So.. to wrap it up, its either something about android 7.0, or exynos chips
or the architecture. Difficult do judge what precisely. Anyhow looking at
the gstjniutils (below), the code may fail in two places:
=>g_module_open (NULL, G_MODULE_BIND_LOCAL);
or
=>g_module_symbol (module, "gst_android_get_application_class_loader",
          (gpointer *) & get_class_loader)


gstjniutils.c wrote
> static gboolean
> check_application_class_loader (void)
> {
>   gboolean ret = TRUE;
>   GModule *module = NULL;
> 
>   module = g_module_open (NULL, G_MODULE_BIND_LOCAL);
>   if (!module) {
>     return FALSE;
>   }
>   if (!g_module_symbol (module,
> "gst_android_get_application_class_loader",
>           (gpointer *) & get_class_loader)) {
>     ret = FALSE;
>   }
> 
>   g_module_close (module);
> 
>   return ret;
> }

Is it possible that I am missing some sort of "permission" to load a module
or symbol? Can it be the 64bit architecture that does not work well with
glib?
Do you have any suggestions on how to move from there? I am "strongly
attached" to developing on the Galaxy S8 because of the required hw codec
performace (if I ever get it to work).

Best,
Jeremi

PS. for reference I attach my Android.mk =>
https://hastebin.com/opitulagar.rb
my ndk build output => https://hastebin.com/awokimimef.tex

Oh, and one more thing, however I dont know if it is relevant. During init
gstreamer complains about the registry.bin:

07-25 09:30:22.022
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_PLUGIN_LOADING: 0:00:00.011871269 0x7ccf5ff600
gstplugin.c:317:_priv_gst_plugin_initialize registering 0 static plugins
07-25 09:30:22.022
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_PLUGIN_LOADING: 0:00:00.012398346 0x7ccf5ff600
gstplugin.c:225:gst_plugin_register_static registered static plugin
"staticelements"
07-25 09:30:22.022
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_PLUGIN_LOADING: 0:00:00.012438500 0x7ccf5ff600
gstplugin.c:227:gst_plugin_register_static added static plugin
"staticelements", result: 1
07-25 09:30:22.022
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_REGISTRY: 0:00:00.012462269 0x7ccf5ff600
gstregistry.c:1721:ensure_current_registry reading registry cache:
/data/user/0/org.freedesktop.gstreamer.tutorials.tutorial_3/cache/registry.bin
07-25 09:30:22.024
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_REGISTRY: 0:00:00.013840692 0x7ccf5ff600
gstregistrybinary.c:539:priv_gst_registry_binary_read_cache Unable to mmap
file
/data/user/0/org.freedesktop.gstreamer.tutorials.tutorial_3/cache/registry.bin
: Failed to open file
'/data/user/0/org.freedesktop.gstreamer.tutorials.tutorial_3/cache/registry.bin':
open() failed: No such file or directory
07-25 09:30:22.024
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_REGISTRY: 0:00:00.013921076 0x7ccf5ff600
gstregistrybinary.c:549:priv_gst_registry_binary_read_cache Unable to read
file
/data/user/0/org.freedesktop.gstreamer.tutorials.tutorial_3/cache/registry.bin
: Failed to open file
'/data/user/0/org.freedesktop.gstreamer.tutorials.tutorial_3/cache/registry.bin':
No such file or directory
07-25 09:30:22.024
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_REGISTRY: 0:00:00.013940923 0x7ccf5ff600
gstregistry.c:1577:scan_and_update_registry Validating plugins from registry
cache:
/data/user/0/org.freedesktop.gstreamer.tutorials.tutorial_3/cache/registry.bin
07-25 09:30:22.024
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_REGISTRY: 0:00:00.014343000 0x7ccf5ff600
gstregistry.c:1679:scan_and_update_registry Registry cache has not changed
07-25 09:30:22.024
25496-25496/org.freedesktop.gstreamer.tutorials.tutorial_3
I/GStreamer+GST_REGISTRY: 0:00:00.014373576 0x7ccf5ff600
gstregistry.c:1756:ensure_current_registry registry reading and updating
done, result = 1




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Hardware-decoder-availability-on-exynos-CPU-tp4683878p4683936.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list