[gst-devel] Adding plugins to gstreamer

Mario Torre neugens at limasoftware.net
Mon Apr 23 23:29:52 CEST 2007

Il giorno lun, 23/04/2007 alle 14.00 -0700, David Schleef ha scritto:
> On Mon, Apr 23, 2007 at 08:08:42PM +0200, Mario Torre wrote:
> > I have to add a new plugin to GStreamer. The plugin is a Source reader
> > (it reads from a java InoutStream).
> > [1] The location of the new plugin will not be the usual /usr/lib or
> > such
> Why not?
> If the element is something that is only useful in a program written
> in Java, it might be best to keep it inside the java bindings.  The
> java bindings can initialize/register the element during initialization.
> The down side of doing it this way is that the element will not show
> up in gst-inspect.

Thanks for all the reply!

Maybe it's me doing something stupid, but I can't really use this
plugin... I guess I'm initializing it in the wrong way or something.

The plugin is called classpathsrc (innovative!). I have all the #define
in place (GST_TYPE_bla etc..), I also have all the needed functions used
by the plugin.

Then I do:

GST_BOILERPLATE (GstClasspathSrc, gst_classpath_src, GstBaseSrc,
static gboolean
_do_init (GstPlugin *plugin)
  GST_DEBUG_CATEGORY_INIT (gst_classpath_src_debug, "classpathsrc",
      0, "Classpath Src element");

  return gst_element_register (plugin, "classpathsrc",

  "Java InputStream Reader", _do_init, "1.0",
  "GPL + Classpath Exceptions", "Classpath",


Then I have gst_classpath_src_base_init and gst_classpath_src_class_init
defined (pretty much like the template plugin and the FileSrc do).

Now, I compile them, and get a libgstclasspathplugin.so.

No matter what I do, then, I cannot get this plugin to work. If I load
it doing:

$ export GST_PLUGIN_PATH=/where/the/library/is
$ gst-inspect classpathsrc
No such element or plugin 'classpathsrc'

If I link to my test program, and call

gst_element_factory_make("classpathsrc", "fake element");

I get NULL...

Any help really appreciated :)
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Jabber: neugens at jabber.org - Profile: http://www.gtalkprofile.com/profile/9661.html
pgp key: http://subkeys.pgp.net/
PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa ? una parte del messaggio	firmata digitalmente
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070423/87dad4ee/attachment.pgp>

More information about the gstreamer-devel mailing list