roundrobin usage

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

roundrobin usage

yair
hi,
i have single thread decoder plugin 
i would like to use round robin plugin to send a timestamped src to the 3 different decoder instances. 


1. am i thinking about this wrong? should queue handle this in some why?
2. how do i use the roundrobin plugin, as its described as a "reverse of tee"

gst-launch-1.0 -v videotestsrc ! roundrobin name=s ! fpsdisplaysink s. ! fpsdisplaysink s. ! fpsdisplaysink 

"This is a generic element that will distribute equally incoming buffers over multiple src pads. This is the opposite of tee element, which duplicates buffers over all pads. This element can be used to distrute load across multiple branches when the buffer can be processed independently."

note: ubuntu's stock 1.14.5 gst build doesnt show it. but gst-build exposed it. 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: roundrobin usage

Nicolas Dufresne-5


Le lun. 10 févr. 2020 07 h 15, Yair Reshef <[hidden email]> a écrit :
hi,
i have single thread decoder plugin 
i would like to use round robin plugin to send a timestamped src to the 3 different decoder instances. 


1. am i thinking about this wrong? should queue handle this in some why?

If your decoder can handle random frames, yes, it's possible to add parallel processing this way (e.g. would work with PNG or jpeg). Would require: roundrobin, then a queue after each pads, though we are missing an element to close the loop, we need funnel, but with synchronization so that buffers comes out in order. That would be a nice addition, and like roundrobin should be very simple.

2. how do i use the roundrobin plugin, as its described as a "reverse of tee"

Now that you highlight this, I need to rework that doc. Reverse of tee is funnel, roundrobin is like tee, 1 to N, but sends each buffer to one pad, were tee sends buffer to all pads.



gst-launch-1.0 -v videotestsrc ! roundrobin name=s ! fpsdisplaysink s. ! fpsdisplaysink s. ! fpsdisplaysink 

"This is a generic element that will distribute equally incoming buffers over multiple src pads. This is the opposite of tee element, which duplicates buffers over all pads. This element can be used to distrute load across multiple branches when the buffer can be processed independently."

note: ubuntu's stock 1.14.5 gst build doesnt show it. but gst-build exposed it. 

roundrobin element was added in current development phase, so will be available in next stable release (1.18). It's a trivial element, feel free to copy into your project if LGPL is compatible. It's part of -bad/gst/rist, as this is the only usage inside GStreamer for now.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: roundrobin usage

yair
thank you for the clarification. 
lets say i dont care for their outgoing sync/order.  

i can mux them into a single file.

gst-launch-1.0 -v \
videotestsrc ! roundrobin name=source \
matroskamux name=mkvMux ! filesink location=/opt/mv/foo.mkv \
source. ! queue ! coloreffects ! mkvMux. \
source. ! queue ! coloreffects ! mkvMux. \
source. ! queue ! coloreffects ! mkvMux.

but is there a (dirty?) way to merge them into a single stream?



On Mon, Feb 10, 2020 at 4:11 PM Nicolas Dufresne <[hidden email]> wrote:


Le lun. 10 févr. 2020 07 h 15, Yair Reshef <[hidden email]> a écrit :
hi,
i have single thread decoder plugin 
i would like to use round robin plugin to send a timestamped src to the 3 different decoder instances. 


1. am i thinking about this wrong? should queue handle this in some why?

If your decoder can handle random frames, yes, it's possible to add parallel processing this way (e.g. would work with PNG or jpeg). Would require: roundrobin, then a queue after each pads, though we are missing an element to close the loop, we need funnel, but with synchronization so that buffers comes out in order. That would be a nice addition, and like roundrobin should be very simple.

2. how do i use the roundrobin plugin, as its described as a "reverse of tee"

Now that you highlight this, I need to rework that doc. Reverse of tee is funnel, roundrobin is like tee, 1 to N, but sends each buffer to one pad, were tee sends buffer to all pads.



gst-launch-1.0 -v videotestsrc ! roundrobin name=s ! fpsdisplaysink s. ! fpsdisplaysink s. ! fpsdisplaysink 

"This is a generic element that will distribute equally incoming buffers over multiple src pads. This is the opposite of tee element, which duplicates buffers over all pads. This element can be used to distrute load across multiple branches when the buffer can be processed independently."

note: ubuntu's stock 1.14.5 gst build doesnt show it. but gst-build exposed it. 

roundrobin element was added in current development phase, so will be available in next stable release (1.18). It's a trivial element, feel free to copy into your project if LGPL is compatible. It's part of -bad/gst/rist, as this is the only usage inside GStreamer for now.

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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: roundrobin usage

yair
gst-launch-1.0 -v \
videotestsrc ! roundrobin name=source \
multipartmux name=mkvMux ! filesink location=/opt/mv/foo.mkv \
source. ! queue ! coloreffects ! pngenc ! mkvMux. \
source. ! queue ! coloreffects ! pngenc ! mkvMux. \
source. ! queue ! coloreffects ! pngenc ! mkvMux.

On Tue, Feb 11, 2020 at 11:48 AM Yair Reshef <[hidden email]> wrote:

>
> thank you for the clarification.
> lets say i dont care for their outgoing sync/order.  
>
> i can mux them into a single file.
>
> gst-launch-1.0 -v \
> videotestsrc ! roundrobin name=source \
> matroskamux name=mkvMux ! filesink location=/opt/mv/foo.mkv \
> source. ! queue ! coloreffects ! mkvMux. \
> source. ! queue ! coloreffects ! mkvMux. \
> source. ! queue ! coloreffects ! mkvMux.
>
> but is there a (dirty?) way to merge them into a single stream?
>
>
>
> On Mon, Feb 10, 2020 at 4:11 PM Nicolas Dufresne <[hidden email]> wrote:
>>
>>
>>
>> Le lun. 10 févr. 2020 07 h 15, Yair Reshef <[hidden email]> a écrit :
>>>
>>> hi,
>>> i have single thread decoder plugin
>>> i would like to use round robin plugin to send a timestamped src to the 3 different decoder instances.
>>>
>>>
>>> 1. am i thinking about this wrong? should queue handle this in some why?
>>
>>
>> If your decoder can handle random frames, yes, it's possible to add parallel processing this way (e.g. would work with PNG or jpeg). Would require: roundrobin, then a queue after each pads, though we are missing an element to close the loop, we need funnel, but with synchronization so that buffers comes out in order. That would be a nice addition, and like roundrobin should be very simple.
>>
>>> 2. how do i use the roundrobin plugin, as its described as a "reverse of tee"
>>
>>
>> Now that you highlight this, I need to rework that doc. Reverse of tee is funnel, roundrobin is like tee, 1 to N, but sends each buffer to one pad, were tee sends buffer to all pads.
>>
>>
>>>
>>> gst-launch-1.0 -v videotestsrc ! roundrobin name=s ! fpsdisplaysink s. ! fpsdisplaysink s. ! fpsdisplaysink
>>>
>>> "This is a generic element that will distribute equally incoming buffers over multiple src pads. This is the opposite of tee element, which duplicates buffers over all pads. This element can be used to distrute load across multiple branches when the buffer can be processed independently."
>>>
>>> note: ubuntu's stock 1.14.5 gst build doesnt show it. but gst-build exposed it.
>>
>>
>> roundrobin element was added in current development phase, so will be available in next stable release (1.18). It's a trivial element, feel free to copy into your project if LGPL is compatible. It's part of -bad/gst/rist, as this is the only usage inside GStreamer for now.
>>
>>>
>>> https://gstreamer.freedesktop.org/documentation/rist/roundrobin.html?gi-language=c
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> [hidden email]
>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: roundrobin usage

Nicolas Dufresne-5
In reply to this post by yair
On mar, 2020-02-11 at 11:48 +0200, Yair Reshef wrote:
thank you for the clarification. 
lets say i dont care for their outgoing sync/order.  

i can mux them into a single file.

gst-launch-1.0 -v \
videotestsrc ! roundrobin name=source \
matroskamux name=mkvMux ! filesink location=/opt/mv/foo.mkv \
source. ! queue ! coloreffects ! mkvMux. \
source. ! queue ! coloreffects ! mkvMux. \
source. ! queue ! coloreffects ! mkvMux.

but is there a (dirty?) way to merge them into a single stream?

gst-launch-1.0 -v \
videotestsrc ! roundrobin name=source \
funnel name=fun ! matroskamux ! filesink location=/opt/mv/foo.mkv \
source. ! queue ! coloreffects ! fun. \
source. ! queue ! coloreffects ! fun. \
source. ! queue ! coloreffects ! fun.

(not tested)



On Mon, Feb 10, 2020 at 4:11 PM Nicolas Dufresne <[hidden email]> wrote:


Le lun. 10 févr. 2020 07 h 15, Yair Reshef <[hidden email]> a écrit :
hi,
i have single thread decoder plugin 
i would like to use round robin plugin to send a timestamped src to the 3 different decoder instances. 


1. am i thinking about this wrong? should queue handle this in some why?

If your decoder can handle random frames, yes, it's possible to add parallel processing this way (e.g. would work with PNG or jpeg). Would require: roundrobin, then a queue after each pads, though we are missing an element to close the loop, we need funnel, but with synchronization so that buffers comes out in order. That would be a nice addition, and like roundrobin should be very simple.

2. how do i use the roundrobin plugin, as its described as a "reverse of tee"

Now that you highlight this, I need to rework that doc. Reverse of tee is funnel, roundrobin is like tee, 1 to N, but sends each buffer to one pad, were tee sends buffer to all pads.



gst-launch-1.0 -v videotestsrc ! roundrobin name=s ! fpsdisplaysink s. ! fpsdisplaysink s. ! fpsdisplaysink 

"This is a generic element that will distribute equally incoming buffers over multiple src pads. This is the opposite of tee element, which duplicates buffers over all pads. This element can be used to distrute load across multiple branches when the buffer can be processed independently."

note: ubuntu's stock 1.14.5 gst build doesnt show it. but gst-build exposed it. 

roundrobin element was added in current development phase, so will be available in next stable release (1.18). It's a trivial element, feel free to copy into your project if LGPL is compatible. It's part of -bad/gst/rist, as this is the only usage inside GStreamer for now.

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

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: roundrobin usage

yair

On Tue, Feb 11, 2020 at 5:05 PM Nicolas Dufresne <[hidden email]> wrote:
On mar, 2020-02-11 at 11:48 +0200, Yair Reshef wrote:
thank you for the clarification. 
lets say i dont care for their outgoing sync/order.  

i can mux them into a single file.

gst-launch-1.0 -v \
videotestsrc ! roundrobin name=source \
matroskamux name=mkvMux ! filesink location=/opt/mv/foo.mkv \
source. ! queue ! coloreffects ! mkvMux. \
source. ! queue ! coloreffects ! mkvMux. \
source. ! queue ! coloreffects ! mkvMux.

but is there a (dirty?) way to merge them into a single stream?

gst-launch-1.0 -v \
videotestsrc ! roundrobin name=source \
funnel name=fun ! matroskamux ! filesink location=/opt/mv/foo.mkv \
source. ! queue ! coloreffects ! fun. \
source. ! queue ! coloreffects ! fun. \
source. ! queue ! coloreffects ! fun.

(not tested)



On Mon, Feb 10, 2020 at 4:11 PM Nicolas Dufresne <[hidden email]> wrote:


Le lun. 10 févr. 2020 07 h 15, Yair Reshef <[hidden email]> a écrit :
hi,
i have single thread decoder plugin 
i would like to use round robin plugin to send a timestamped src to the 3 different decoder instances. 


1. am i thinking about this wrong? should queue handle this in some why?

If your decoder can handle random frames, yes, it's possible to add parallel processing this way (e.g. would work with PNG or jpeg). Would require: roundrobin, then a queue after each pads, though we are missing an element to close the loop, we need funnel, but with synchronization so that buffers comes out in order. That would be a nice addition, and like roundrobin should be very simple.

2. how do i use the roundrobin plugin, as its described as a "reverse of tee"

Now that you highlight this, I need to rework that doc. Reverse of tee is funnel, roundrobin is like tee, 1 to N, but sends each buffer to one pad, were tee sends buffer to all pads.



gst-launch-1.0 -v videotestsrc ! roundrobin name=s ! fpsdisplaysink s. ! fpsdisplaysink s. ! fpsdisplaysink 

"This is a generic element that will distribute equally incoming buffers over multiple src pads. This is the opposite of tee element, which duplicates buffers over all pads. This element can be used to distrute load across multiple branches when the buffer can be processed independently."

note: ubuntu's stock 1.14.5 gst build doesnt show it. but gst-build exposed it. 

roundrobin element was added in current development phase, so will be available in next stable release (1.18). It's a trivial element, feel free to copy into your project if LGPL is compatible. It's part of -bad/gst/rist, as this is the only usage inside GStreamer for now.

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

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

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