[vlc-devel] [PATCH 0/5] android/iomx as a separate shared library

Martin Storsjö martin at martin.st
Fri Dec 16 22:47:01 CET 2011


This patchset fixes the iomx code for android to be built
as a small separate shared library, that can be loaded by
the android application. This approach has four benefits:

- Avoids having to link libvlcjni.so directly against private
  functions, which could lead to it failing to load on some
- Avoids having to use private headers during the build of the
  main VLC code (only needed when building the IOMX wrapper)
- Eases supporting different ABI versions. Since the IOMX API
  is a private API, the ABI has changed between gingerbread
  and honeycomb (even though the gingerbread version works
  on most froyo devices, too). With this variant, one apk
  can include a separate version of the IOMX wrapper code
  shared library for each targeted ABI version - this is
  only about 20 KB per library.
- The separate IOMX wrapper library has exactly the same external
  API/ABI as any OMX Core, and one could load it just like the
  other ones if one wanted. (dlopen on android doesn't look in
  the app's private library directory though, so it would require
  a bit of extra work to find the path. Therefore it's loaded
  by the android java code instead, which also can figure out
  which version to load.)

Also, I kinda like the amount of removed code in this
patchset. :-)

Martin Storsjö (5):
  omxil: Make the iomx wrapper not depend on the omxil utils.c file
  omxil: Build the iomx wrapper code as a separate shared library
  omxil: Remove the header check for the iomx module
  android: Don't add private header include directories when building
    the full VLC tree
  omxil: Use a fake library name when loading IOMX

 configure.ac                        |   13 +-----
 extras/package/android/configure.sh |    5 --
 modules/codec/omxil/Modules.am      |    2 +-
 modules/codec/omxil/iomx.cpp        |   83 +++++++++++++++--------------------
 modules/codec/omxil/iomx.h          |   33 --------------
 modules/codec/omxil/omxil.c         |   12 +++--
 6 files changed, 45 insertions(+), 103 deletions(-)
 delete mode 100644 modules/codec/omxil/iomx.h


More information about the vlc-devel mailing list