Hi Sebastian,
<br/>Thanks very much for your help!
<br/>Do initialize via Gstreamer.init( ) is necessary?
<br/>Now I want to use gstreamer instead of stagefright , and package interfaces of gstreamer player to native interfaces that could be called by java via jni.
<br/>l want to write executed application used C code and built in ndk-build ,that execute on android , how could I do initialized used C code, and then could use static plugins?
<br/>Thanks a lot!
<br/><br/><br/><br/><br/><br/><br/><br/>在 2015-05-02 15:47:49,"Sebastian Dröge-3 [via GStreamer-devel]" <<a href="/user/SendEmail.jtp?type=node&node=4671770&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> 写道:
<div class='shrinkable-quote'><br/>>On Di, 2015-04-28 at 22:08 -0700, Yingsheng wrote:
<br/>>
<br/>>> Hi,
<br/>>> I am a new learner of gstreamer and i want to port gstreamer to android.
<br/>>> Now
<br/>>> 1. I could build gstreamer using command "cerbero -c cross-android.cbc
<br/>>> package gstreamer-1.0" and create package "gstreamer-1.0-android-arm-1.5.0"
<br/>>> sucessfully.
<br/>>> 2. I could use ndk-build to build gstreamer package
<br/>>> "gstreamer-1.0-android-arm-1.5.0" and create libgstreamer_android.so.
<br/>>> 3. I wrote a application about to play mp3 file using c language, and
<br/>>> ndk-build sucessfully, and create a executed file.After I push the executed
<br/>>> file and "libgstreamer_android.so" to directory "/system/lib", I could not
<br/>>> executed the file.
<br/>>> Because I could not create element in app, such as:
<br/>>> source = gst_element_factory_make("audiotestsrc", "audio_source");
<br/>>> How could I do?
<br/>>That's not how you're supposed to use GStreamer on Android. You should
<br/>>do it like e.g. in the example applications here, i.e. include
<br/>>libgstreamer_android.so in your application and initialize it via
<br/>>GStreamer.init() from Java, and then use GStreamer from some C code that
<br/>>you call via JNI.
<br/>>
<br/>><a href="http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials" target="_top" rel="nofollow" link="external">http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials</a><br/>>(android-tutorial 1-5)
<br/>>
<br/>>The important part here is how the initialization works, as
<br/>>libgstreamer_android.so contains static plugins that have to be
<br/>>explicitly initialized by something (GStreamer.init() in this case)
<br/>>before usage.
<br/>>
<br/>>--
<br/>>Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" target="_top" rel="nofollow" link="external">http://www.centricular.com</a><br/>>
<br/>>_______________________________________________
<br/>>gstreamer-devel mailing list
<br/>>[hidden email]
<br/>><a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_top" rel="nofollow" link="external">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br/>>
<br/>>
<br/>>signature.asc (968 bytes) Download Attachment
<br/>>
<br/>>
<br/>>
<br/>>If you reply to this email, your message will be added to the discussion below:
<br/>><a href="http://gstreamer-devel.966125.n4.nabble.com/How-to-link-element-to-pipeline-in-android-tp4671727p4671761.html" target="_top" rel="nofollow" link="external">http://gstreamer-devel.966125.n4.nabble.com/How-to-link-element-to-pipeline-in-android-tp4671727p4671761.html</a><br/>>To unsubscribe from How to link element to pipeline in android?, click here.
<br/>>NAML</div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/How-to-link-element-to-pipeline-in-android-tp4671727p4671770.html">Re:Re: How to link element to pipeline in android?</a><br/>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>