How to provide a custom plugin to gstreamer in Android ?

stic at free.fr stic at free.fr
Wed Mar 27 06:39:53 PDT 2013


ok it works ! I was using -DGST_PLUGIN_STATIC_BUILD instead of -DGST_PLUGIN_BUILD_STATIC flag following your first answer.
Thank you very much.

----- Mail original -----
De: "Andoni Morales" <ylatuya at gmail.com>
À: "Discussions about GStreamer on Android" <gstreamer-android at lists.freedesktop.org>
Envoyé: Mardi 26 Mars 2013 10:58:45
Objet: Re: How to provide a custom plugin to gstreamer in Android ?

2013/3/25  <stic at free.fr>:
> any help about how to recognize custom plugin in gstreamer Android please ??

Hi,

I am sorry for getting back to you so late.

In the SDK, static plugins are built in the following way:
  * Using GST_PLUGIN_DEFINE2 instead of GST_PLUGINS_DEFINE [1]
  * Adding the cflag -DGST_PLUGIN_BUILD_STATIC

When GST_PLUGIN_BUILD_STATIC is defined, a funtion to register this
plugins statically is defined with the name:
gst_plugin_foo_register.

To check that this function is define properly you can use nm in the
following way:
arm-linux-androideabi-nm
$CERBERO/PREFIX/lib/gstreamer-0.10/static/libgstfoo.a | grep
gst_plugin_foo_register

Your plugin should be therefore built with -DGST_PLUGIN_BUILD_STATIC
and installed to lib/gstreamer-0.10/static/ together with its libtool
library.
In case you are adding a new plugin to an existent gstreamer project,
you will only to need to configure with the options "
--enable-static-plugins --enable-static --disable-shared"
and make sure your plugins is installed in lib/gstreamer-0.10/static/
instead of lib/gstreamer-0.10/

Cheers,
Andoni

[1] http://cgit.freedesktop.org/gstreamer-sdk/gst-plugins-base/tree/gst/volume/gstvolume.c#n1046
[2] http://cgit.freedesktop.org/gstreamer-sdk/gst-plugins-base/tree/configure.ac#n375
[3] http://cgit.freedesktop.org/gstreamer-sdk/gstreamer/tree/gst/gstplugin.h#n341
>
> ----- Mail original -----
> De: stic at free.fr
> À: "Discussions about GStreamer on Android" <gstreamer-android at lists.freedesktop.org>
> Envoyé: Mardi 19 Mars 2013 11:19:43
> Objet: Re: How to provide a custom plugin to gstreamer in Android ?
>
> Hello Andoni,
>
> I'm still waiting for any documentation about this that would help :)
> Thank you very much.
>
> ----- Mail original -----
> De: "Andoni Morales" <ylatuya at gmail.com>
> À: "Discussions about GStreamer on Android" <gstreamer-android at lists.freedesktop.org>
> Cc: gstreamer-devel at lists.freedesktop.org
> Envoyé: Samedi 16 Mars 2013 21:23:39
> Objet: Re: How to provide a custom plugin to gstreamer in Android ?
>
> 2013/3/14 Jacques Bride <jacques.bride at gmail.com>:
>> Hello
>>
>> Similar to your message, a colleague and I are trying to add a custom plugin
>> to the gstreamer-sdk for Android.
>> - we built with success the sdk (package gstreamer-sdk) with cerbero and
>> cross-android.cbc on Ubuntu1204 (we had to remove the package
>> "video-editing" in gstreamer-sdk.package since the gnonlin source code could
>> not be correctly fetch by git today (could not understand why))
>> - we added a directory with our code in the plugins-bad/gst directory with
>> is Makefile.am.
>> - we added a static recipe in the recipe folder and added our recipe in the
>> plugin-bad recipe
>>
>> Anyway we are still not done and we we are a bit stuck on how to progress.
>> Any hint?
>
> I am on vacations and I can't reply with all the details as I would
> like :) I'll be back on Monday and I will try to document all the
> steps correctly.
>
> Cheers,
> Andoni
>
>> Thanks
>>
>>
>>
>> 2013/3/13 <stic at free.fr>
>>
>>> I tried using -DGST_PLUGIN_STATIC_BUILD in CFLAGS, and using
>>> GST_PLUGIN_DEFINE2.
>>> But it still does not work for me, always same error when trying to use
>>> the plugin: undefined reference to 'gst_plugin_testplugin_register'.
>>> Do I have to build the plugin using Cerbero or can I compile plugin with
>>> GST SDK release ?
>>>
>>> Thank you
>>>
>>> El 12/03/2013 21:23, "Andoni Morales" < ylatuya at gmail.com > escribió:
>>> >
>>> >
>>> > El 11/03/2013 12:10, < stic at free.fr > escribió:
>>> >
>>> > >
>>> > > Hello,
>>> > >
>>> > > in the case I am trying to create a custom gstreamer plugin, how can I
>>> > > provide it to gstreamer in Android app ?
>>> > > I didn't find how to provide a custom plugin to Android gstreamer.
>>> > > Gstreamer finds only plugins already available in the GST SDK.
>>> > > I even tried to add the static library of custom plugin in the same
>>> > > path as the standard plugins (GSTREAMER_SDK_ROOT/lib/gstreamer-0.10/static)
>>> > > but I always have the following message when trying to provide the plugin :
>>> > > error: undefined reference to 'gst_plugin_testplugin_register'
>>> > > (where testplugin is the name of my plugin)
>>> > >
>>> > You will also need to create a libtool library for it in this directory
>>> > (eg: libgsttestplugin.la ) to help the linker find and link your plugin. And
>>> > you must compile your plugin with -DGST_PLUGIN_STATIC_BUILD in your CFLAGS.
>>>
>>> And use GST_PLUGIN_DEFINE2. It is something we should document :)
>>> Andoni
>>> > Andoni
>>> >
>>> > > Thanks a lot for any help :)
>>> > > _______________________________________________
>>> > > gstreamer-android mailing list
>>> > > gstreamer-android at lists.freedesktop.org
>>> > > http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>>>
>>> _______________________________________________
>>> gstreamer-android mailing list
>>> gstreamer-android at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>>> _______________________________________________
>>> gstreamer-android mailing list
>>> gstreamer-android at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>>
>>
>>
>> _______________________________________________
>> gstreamer-android mailing list
>> gstreamer-android at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>>
>
>
>
> --
> Andoni Morales Alastruey
>
> LongoMatch:The Digital Coach
> http://www.longomatch.ylatuya.es
> _______________________________________________
> gstreamer-android mailing list
> gstreamer-android at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
> _______________________________________________
> gstreamer-android mailing list
> gstreamer-android at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
> _______________________________________________
> gstreamer-android mailing list
> gstreamer-android at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android



-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es
_______________________________________________
gstreamer-android mailing list
gstreamer-android at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-android


More information about the gstreamer-android mailing list