How to create a new plugin for Android.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to create a new plugin for Android.

Haiming Wang
Hi guys,


   Firstly I'd like to thank you all very much for the help you have given me .

   I'm now trying to write a camera source plugin  for Android. 

   I have read "GStreamer Plugin Writer's Guide (1.0.6)" at http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/index.html   , and understand how to write a simple plugin,and make it run on Linux/Windows.

   I also know how to build the android sdk from source with Cerbero.

  
   But as we know, cerbero will fetch the source code automatically , there is no a development environment for android plugin.

   Can anyone tell me  the brief procedure about how to write a plugin for android? How the environment should be?  Or at least, if I write a plugin on PC, how should I build the .so for android ?


Thanks and Best Regards,
Haiming Wang
  

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to create a new plugin for Android.

Tim-Philipp Müller-2
On Sun, 2013-06-30 at 21:16 +0800, Haiming Wang wrote:

Hi,

>    Can anyone tell me  the brief procedure about how to write a plugin
> for android? How the environment should be?  Or at least, if I write a
> plugin on PC, how should I build the .so for android ?

I realise I'm not really answering your question at all, but just so you
know: you don't have to write a plugin as a separate .so file, if it's
specific to your application you can just keep it as a 'static plugin'
as part of your application binary, see

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPlugin.html#gst-plugin-register-static

Cheers
 -Tim



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to create a new plugin for Android.

Sebastian Dröge
On So, 2013-06-30 at 19:18 +0100, Tim-Philipp Müller wrote:

> On Sun, 2013-06-30 at 21:16 +0800, Haiming Wang wrote:
>
> Hi,
>
> >    Can anyone tell me  the brief procedure about how to write a plugin
> > for android? How the environment should be?  Or at least, if I write a
> > plugin on PC, how should I build the .so for android ?
>
> I realise I'm not really answering your question at all, but just so you
> know: you don't have to write a plugin as a separate .so file, if it's
> specific to your application you can just keep it as a 'static plugin'
> as part of your application binary, see
And that's exactly how you should do it on Android, as Android's support
for dynamically loading .so plugins is rather... restricted.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: How to create a new plugin for Android.

Haiming Wang
HI Tim and Sebastian,

   Thank you very much for your kindly help.  

   I have one more question, how to write a static plugin, looks like I didn't find it in the document? 
   how can I compile it to a static library for Android?  
    
   Could you please help?

Thanks and Regards,
Haiming Wang

Subject: Re: How to create a new plugin for Android.
From: [hidden email]
To: [hidden email]
Date: Sun, 30 Jun 2013 20:40:55 +0200

On So, 2013-06-30 at 19:18 +0100, Tim-Philipp Müller wrote:

> On Sun, 2013-06-30 at 21:16 +0800, Haiming Wang wrote:
>
> Hi,
>
> > Can anyone tell me the brief procedure about how to write a plugin
> > for android? How the environment should be? Or at least, if I write a
> > plugin on PC, how should I build the .so for android ?
>
> I realise I'm not really answering your question at all, but just so you
> know: you don't have to write a plugin as a separate .so file, if it's
> specific to your application you can just keep it as a 'static plugin'
> as part of your application binary, see

And that's exactly how you should do it on Android, as Android's support
for dynamically loading .so plugins is rather... restricted.

_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to create a new plugin for Android.

Sebastian Dröge
On Mo, 2013-07-01 at 16:27 +0800, Haiming Wang wrote:

> HI Tim and Sebastian,
>
>
>    Thank you very much for your kindly help.  
>
>
>    I have one more question, how to write a static plugin, looks like
> I didn't find it in the document?
>    how can I compile it to a static library for Android?  
>    
>    Could you please help?
You would add it to your code like any other code from your application.
And then just call gst_plugin_register_static() from a central place and
pass the plugin initialization function and some other metadata to it.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to create a new plugin for Android.

yoyosuper8
Hi, I'm still a bit lost on how to use gst_plugin_register_static().
So I have a custom plugin, ex: testplugin.h and testplugin.c
and I have another file tester.c which contains gstreamer code that is loaded into the android app mytestapp.java.

In tester.c I need to load my custom plugin testplugin.h so that I can use it on my gstreamer pipeline gst_parser_launcher("videotestsrc ! testplugin ! ffmpegcolorspace ! audiovideolink")

Any idea how I can do this? ANy help would be appreciated it.

THanks
Andy
Reply | Threaded
Open this post in threaded view
|

Re: How to create a new plugin for Android.

Victor Enriquez
Im also looking to archive this. But when I add the .c files in the Android.mk file (inside jni folder) the compiler complains abut missing glib functions.
In this case Im trying to add the fluendo-timeShifter plugin.