Help with Android.mk file for plugin

Sebastian Dröge sebastian at centricular.com
Fri Jan 9 01:26:08 PST 2015


On Mo, 2013-09-23 at 11:54 -0700, yoyosuper8 wrote:
> Hi all, so I'm having a lot of issues registering a plugin in Android. I
> think it may be my Android.mk file that its missing something. I'm hoping
> that someone can help me resolve this.
> Here is what I have in my jni folder within my android project:
> [...]
> 
> This generates a libgstplugin.a static library. However, it fails because it
> says: undefined reference to 'gst_plugin_myplugin_register'

Make sure that GST_PLUGIN_BUILD_STATIC is actually #defined in your code
where you use GST_PLUGIN_DEFINE2(). The only reason for that symbol to
not be defined would be that, or a problem in your build system.

Are there any other symbols defined by libgstplugin.a? Which?

Also note that usually you don't need to build a static plugin, see
https://stackoverflow.com/questions/27816992/static-plugin-gstreamer-on-android/27839855#27839855

Also don't use GStreamer 0.10 anymore, it's not maintained any longer
since more than 2 years. You can get the latest Android binaries from
here:
http://gstreamer.freedesktop.org/data/pkg/android/1.4.5/

> I'm registering the plugin using GST_PLUGIN_STATIC_REGISTER(myplugin) and
> GST_PLUGIN_STATIC_DECLARE(myplugin) in tutorial-3.c. The tutorial-3.c does
> not have a main method, but instead it is "main" method is gst_native_init()
> which is initiated in java. In this method, I call gst_init(NULL, NULL)
> followed by GST_PLUGIN_STATIC_REGISTER(myplugin). However, I still get the
> undefined reference error.

Are you still using the gstreamer_android.c that is generated by the
GStreamer build system, i.e. via the GStreamer.java API? If not you'll
have to replicate a lot of code from there for things to work as
expected. Take a look at that code to see what it does.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150109/33adfd3b/attachment.sig>


More information about the gstreamer-devel mailing list