Creating a simple 1-N plugin

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

Creating a simple 1-N plugin

Albert Costa
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() ? I tried to see what is done in gstreamer built-in plugins, but found nothing 'simple'...
Any help or guidelines would be appreciated!
Regards,
Al


Envoyé avec Yahoo! Mail.
Une boite mail plus intelligente.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Creating a simple 1-N plugin

Tim-Philipp Müller-2
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



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel