Android issue with Gst-Player and Qt Framework

Allan Elkaim allan.elkaim at gmail.com
Thu Jun 2 13:56:25 UTC 2016


Hi everyone,

I want to make the gst-player Qt app written by Sebastian Dröge work on
both Android and iOS.

(link to the Qt App : https://github.com/sdroege/gst-player/tree/master/qt )

On Linux, I first compile all dependencies (including GStreamer,
gst-plugins-base, gst-plugins-good, gst-plugins-bad...), put them as
dependencies of the project and link them to it.
On Android, I also first compile all dependencies with the NDK and link
them to my Qt project, which will then be using qmake and will package the
libraries into my APK.

In the main.cpp, I have the following line :

   * gst_init(NULL,NULL);*

But is seems that it is not called on Android. Here's why I think it is not
called:

I have modified the gstreamer's gst_init function to display glib message
when the function is called:








*    voidgst_init (int *argc, char **argv[]){    g_info("---- GST_INIT !
----");    GError *err = NULL;    if (!gst_init_check (argc, argv, &err)) {
[...]    }}*

On Linux, everything works fine, the message is printed when gst_init is
called in my main function.

But on Android, the message doesn't appear in the logcat. (i have an
additional library which redirects glib output messages to the logcat).

But if I call :

    *g_info("---- THIS IS A TEST ----");*

directly from my main.cpp, the message is printed in the logcat, which
shows that gst_init is NOT called on Android, but the glib logging works as
intended.


After looking up a bit on the internet, I found that there was a
gst_android_init function, but it doesn't seem to be available in the
gstreamer sources, the only reference to this function I've found is from a
file called gstreamer_android-1.0.c.in, which is for some reason, not
included in the gstreamer-1.8.1 sources, but available here:
https://cgit.freedesktop.org/gstreamer/cerbero/tree/data/ndk-build

I am very confused by this, and I know I'm not taking the easy way by
wanting only a Qt App instead of two different codes for two different
targets, but could someone clarify this for me ? I really don't understand
what is going on here.

I thank you in advance for your answers.

Regards,

Allan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160602/bc88f518/attachment.html>


More information about the gstreamer-devel mailing list