[gst-devel] Creating a simple 1-N plugin

Tim Müller t.i.m at zen.co.uk
Fri Jun 13 16:49:00 CEST 2008


On Fri, 2008-06-13 at 14:27 +0000, Albert Costa wrote:

Hi,

> I want to create a plugin that has 1 sink pad and N (fixed, no request
>  nor sometimes, so let's say 2) source pads. The sink gets some video,
>  and source pads 1 & 2 would send both home-generated data buffers. Is
>  there any simple example on how to create such a plugin. Can it work
>  on the basic '1-1' model, but with creating 2 src pads, pushing my
>  buffers over the pads in the chain() method? Or does it have to use a
>  loop() ? 

You can do that from within a chain function. You can push one buffer on
one pad, and then push a buffer on the other pad (or the same pad again)
next time. Or push one buffer on both source pads, or save the buffer
for later processing and not push anything at all - it's all allowed.

Most demuxers work like this. Deinterleave in gst-plugins-bad is another
element which pushes buffers on multiple source pads from a chain
function.

 Cheers
  -Tim






More information about the gstreamer-devel mailing list