Getting a warning containing "too many libraries when loading *.so"

Bionic imposes a hard limit on the number of shared objects you can load at run time. There are a few ways to work around this issue:

  • If you're not using a huge pipeline that actually requires to load a number of plugins at runtime that makes you hit the limit, you can use GST_REGISTRY_REUSE_PLUGIN_SCANNER=no and it should work (This was implemented in GStreamer by commit dd9f244f033ba3978d6ee26d9205d29fdd862d7c, Oct 18/2011 so please check you have a recent enough version).

If your pipeline is complex enough so it makes you hit the limit no matter what. Then you have two alternatives:

  • The first one is to modify Android to change limit. You will be bumping SO_MAX to (for example) 128 in Android's bionic/linker/linker.c and rebuilding with make linker. Then you will need to install this customized version of Android on your device as it's explained in the Installing our bundle on the Nexus S section of this document.

  • Another option is to explore building the plugins as static libraries. You can find a patch implementing this solution here: https://bugzilla.gnome.org/show_bug.cgi?id=667305

你可能感兴趣的:(c,android,plugins,patch)