N-to-N plugin

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

N-to-N plugin

hydrex508
Hi all
I'm trying to write N-to-N a gstreamer plugin:
I have 2 main input streams and 2 output streams
- is this supported by gstreamer ? I mean if I write multi pads plugin, I'll be allowed to connect all pads to other plugins ?
- which template is more suitable for such plugin ? filter ? encoder ?
or may I start using demuc example ?

Thank you very much
Reply | Threaded
Open this post in threaded view
|

Re: N-to-N plugin

caoxi
I think you can use GstBin to do design since the number of input equals output, and I think source plugin is more suitable
Reply | Threaded
Open this post in threaded view
|

Re: N-to-N plugin

hydrex508
Hello Caoxi
thanks for your reply
may be I wasn't clear enoght:
- I'm not about using other plugins to make my treatement, I'll write my own code to generate outputs streams

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: N-to-N plugin

Tim Müller
In reply to this post by hydrex508
On Tue, 2017-04-18 at 00:37 -0700, hydrex508 wrote:

Hi,

> I'm trying to write N-to-N a gstreamer plugin:
> I have 2 main input streams and 2 output streams
> - is this supported by gstreamer ? I mean if I write multi pads
> plugin, I'll
> be allowed to connect all pads to other plugins ?
> - which template is more suitable for such plugin ? filter ? encoder
> ?
> or may I start using demux example ?

Of course this is supported.

What to use as base class depends a bit on your use case, in particular
how the scheduling works.

If the input streams operate independently, you will probably want to
derive from GstElement. Multiqueue is an example of this kind of
element.

If you aggregate inputs (i.e. you want to wait for buffers on all input
pads before you decide what to output on which output pad(s)), then you
probably want to derive from GstAggregator.

Cheers
 -Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: N-to-N plugin

caoxi
In reply to this post by hydrex508
Maybe try SOMETIMES_PAD or REQUEST_PAD :)
Reply | Threaded
Open this post in threaded view
|

Re: N-to-N plugin

hydrex508
In reply to this post by Tim Müller
Hi Tim
Thanks for reply

inputs are independant, I mean the treatement is the same even if there is no input

loop()
{
   if inpput1, handle1, output 1 and output2
   if input2, handle2, output 1 and output2
}

Is there a remplate like encoder/filter to make developement easier ?


Thank you
Reply | Threaded
Open this post in threaded view
|

Re: N-to-N plugin

Nicolas Dufresne-5
In reply to this post by hydrex508
Le mardi 18 avril 2017 à 00:55 -0700, hydrex508 a écrit :
> - I'm not about using other plugins to make my treatement, I'll write
> my own
> code to generate outputs streams

In this case, you will have to start from GstElement as a base class.
Note that the handling of events, queries etc. may get complex. I would
recommend looking very closely into your threading model before you
start.

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

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

Re: N-to-N plugin

hydrex508
Hi Nicolas
Thanks fo your post,
exactly, I'm wondering if It's easier to user simple templates (filter/encoder)

since my code is pretty simple, I started focusing in encoder example to add more pads, but in my understanding it's not possible to write from encoder1 input to encoder2 output

now i' trying to add input pad to demux code, I hope it will work :\

else it seems I'll have no choice about using  GstEelement

Merciii