newbie help writing plugin

Rainer Clasen bj at
Thu Jun 23 05:32:29 PDT 2011

Rainer Clasen wrote:
> After plenty other attempts, I'm currently trying to work around this
> issue by writing my own "decodebin" with a static src pad in C and hide
> all the callback stuff deep inside. I'd limit this to decoding a single
> audio/x-raw-(float/int) stream to keep thinks simple.
> The idea was to subclass GstBin, embed decodebin2 and dynamically link it
> to some ghost pads.
> So in my element's _init function I
> - create decodebin2, gst_bin_add() it to $self
> - set caps property on decodebin2 to "audio/x-raw-int;audio/x-raw-float"
> - create sink ghostpad for decodebin2:sink, gst_element_add_pad() it to
>   $self
> - create src ghostpad without target, gst_element_add_pad() it to $self
> - setup a "pad-added" signal handler on decodebin2 to issue
>   gst_ghost_pad_set_target() for the src ghostpad.

Acutally it *is* that easy... if I don't set the caps property of

So I guess, I'm mis-setting the property somehow. Would be nice, if
somebody could check the attached code and point me to my mistake.

Would be nice to have decodebin2 automagically divert non-audio streams to
a fakesink ;)


KeyID=759975BD fingerprint=887A 4BE3 6AB7 EE3C 4AE0  B0E1 0556 E25A 7599 75BD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstdudldecode.c
Type: text/x-csrc
Size: 6184 bytes
Desc: not available
URL: <>

More information about the gstreamer-devel mailing list