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: void gst_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. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Do, 2016-06-02 at 15:56 +0200, Allan Elkaim wrote:
> > 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-bu > ild > > 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. works for normal GStreamer Android applications. We have some integration into Android's ndk-build that will a) generate a libgstreamer_android.so that contains GStreamer, all dependencies and static versions of all plugins selected in Android.mk b) generates a corresponding gstreamer_android.c from the above linked file, which contains gst_android_init(). That one calls gst_init() but also initializes all the plugins and does setup of lots of Android specific things (including a GLib log handler btw). It also adds a GStreamer.java which provides a Java method to call the gst_android_init() C function but that's not needed. For integration with Qt, you have to use the above and call into the gst_android_init() inside the libgstreamer_android.so. -- Sebastian Dröge, Centricular Ltd · http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (968 bytes) Download Attachment |
Free forum by Nabble | Edit this page |