Performance impact of bins/ghostpads?

Florian Echtler floe at butterbrot.org
Fri Mar 3 10:11:47 UTC 2023


On 03.03.23 09:57, Edward Hervey wrote:
> On Fri, 2023-03-03 at 09:29 +0100, Florian Echtler via gstreamer-devel wrote:
>> The default content of videopipe is just "videoconvert !
>> fpsdisplaysink".
> 
>    So you "just" added a video conversion element which does take
> processing time.

No, that was probably too unclear in my first message, but the videoconvert was 
already there in the original pipeline as well. The _only_ difference is whether 
converter and displaysink are in a bin or not.

>    Never connect such elements directly to a sink, put a `queue` element
> just before the (video) sink so that it can have a thread dedicated tod
> displaying. Without that ... videoconvert will be idling until the
> previous frame has been displayed (which won't happen if you disable
> sync in the sink, ergo what you observed).

For good measure, I tried adding a queue before as well as after the 
videoconvert element (and even in both places), but it doesn't make any 
difference. I'm still getting the 50% FPS drop when the elements are in a bin.

>    * it's not bins/ghostpads that introduce this kind of overhead.

I beg to differ - in this case, the only difference between the two graphs is 
whether there's a bin around the two output elements or not. Everything else is 
identical.

>    * Always add a queue just before your sinks

That may be a good general suggestion, but it doesn't help in this case.

>    * never disabled sync on sinks (except for *reaaaaaally* good
> reasons)

I'd still like to understand why it makes a difference in this scenario, the 
description in the docs for what that parameter does ("sync on the clock") isn't 
exactly exhaustive.

>    * fpsdisplaysink has a bunch of issues ... just use of debugging
> purposes and try with regular video sinks (or autovideosink)

Well, debugging is exactly what I'm trying to do, innit? ;-)

Best, Florian
-- 
SENT FROM MY DEC VT50 TERMINAL

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230303/1b3922f3/attachment.sig>


More information about the gstreamer-devel mailing list