Problem with GStreamer-1.0 on Android with Qt/C++ ... most elements are NULL

Liru7 lukas.riezler at googlemail.com
Wed Jul 8 09:24:34 PDT 2015


Hey GStreamers :)

I've a question about GStreamer on Android with Qt. I'm now able to call the
necessary android-specific function from gstreamer to initialize:
*gst_android_init(...)*

What I did is:
In my Qt/C++ code I call Java-Code via JNI and pass the necessary
information about the environment (android-activity/context etc.) to the
Java world.
Via a self-written Java class I call the static method
*GStreamer.init(context)* from file *GStreamer.java* which is shipped with
"gstreamer-1.0-android-armv7-release-1.4.5" which I use.

*libgstreamer_android.so* (generated by my working (!) example from
android-tutorial-3 from freedesktop.org) is also available and is loaded by
my self-written java class before calling *GStreamer.init(context)*. Okay -
everything seems to be okay because after running the project the output on
my console in QtCreator tells me: *GStreamer initialization is complete* ...
a string which is the output at the end of *gst_android_init(...)*

But I'm still not able to create any elements. When I try the following, the
elements are still NULL :/

GstElement* fakesrc = gst_element_factory_make("fakesrc", NULL);
...
GstElement* src = gst_element_factory_make("videotestsrc", "src");
...
GstElement* sink = gst_element_factory_make("xvimagesink", "sink");
...
GstElement *pipe = gst_parse_launch(...);

A few weeks ago I thought the reason of this behaviour is because I don't
initilize with gst_android_init(...). But today it still doesn't work? All
the elements seem to be NULL...
But curiously the following seems to work:

GstElement* pipeline = gst_pipeline_new("pipeline");


Does anybody have an idea? :(








--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-with-GStreamer-1-0-on-Android-with-Qt-C-most-elements-are-NULL-tp4672590.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list