gst-android: implement support for using GStreamer on Qt/Android applications
The gst-android recipe currently installs support files that are good for embedding GStreamer into android applications built with the native Java toolkit. They include:
- JVM / toolkit integration
- Android.mk build system integration (which is deprecated now, but that's another story)
In the end, this produces a
libgstreamer_android.so that the Java app can load and interface with it using JNI.
However, this is no good for Qt apps built for android. Qt apps:
- do not use Android.mk
- do not interface with Java at all; there is a hidden layer inside Qt to interface with the native APIs, but the app only deals with native C/C++ code
What we need to do:
- Implement qmake (and optionally also cmake) integration. Ideally the user should only need to specify a list of gst plugins and libraries to link to and the buildsystem should create the appropriate include & link command lines.
- Build respectively a shared library that includes gstreamer plugin initialization, environment initialization and android log system integration. This is all already included in gst-android, but the code should be split out and separated from the Java stuff, allowing code sharing between the two systems.
Note to self: pkg-config can be used to create the compiler flags, but:
- the qmake pkg-config integration won't work out of the box
- pkg-config needs to be called with --static
- environment variables need to be modified (the PKG_CONFIG_PATH for plugins is different)
- pkg-config environment variables for cross-compilation need to be specified
- in the linker command line, the order in which static libraries appear matters
- in the linker command line, any libraries that must be linked dynamically need to be filtered out and prefixed with
-Wl,-Bdynamic. the obvious ones are: EGL, GLESv2, SLES