<div dir="ltr"><div>Actually, I'm rendering quite complex text descriptions using cairooverlay. Thank you for your suggestions. For now, I have found another (less effective) way how to solve my problem and I'll be looking forward for the overlaycomposition element.<br></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 1:58 PM Sebastian Dröge <<a href="mailto:sebastian@centricular.com">sebastian@centricular.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2018-10-16 at 13:41 +0200, Václav Mach wrote:<br>
> Dear all,<br>
> I'm facing a problem with cairooverlay element. With the following<br>
> pipeline<br>
> rtspsrc ! rtph264depay ! decodebin ! imxg2dvideotransform ! tee<br>
> (first) ! queue (first) ! cairooverlay ! tee (second) ! queue<br>
> (second) ! imxg2dvideosink<br>
> everything works fine. When observing the CPU load in htop the thread<br>
> created by queue (first) has a CPU load of about 25% of one core.<br>
> <br>
> If I dynamically connect the following bin into tee (first)<br>
> queue (third) ! videorate ! capsfilter framerate=1/1 -> appsink<br>
> the CPU load of the thread created by queue (first) grows up to 60 %<br>
> and some video frames on output are missing the graphics created by<br>
> cairooverlay.<br>
> <br>
> Any advice how to avoid frames with missing cairo graphics and reduce<br>
> the CPU load, please?<br>
<br>
Depending on how/what you overlay, you could make use of the new<br>
overlaycomposition element (not merged yet):<br>
<a href="https://bugzilla.gnome.org/show_bug.cgi?id=797234" rel="noreferrer" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=797234</a><br>
<br>
And then add support for the overlay composition meta to everything<br>
after your second tee (especially the sinks).<br>
<br>
cairooverlay is not going to be very fast generally.<br>
<br>
<br>
Why CPU usage in your specific case increases so much needs further<br>
debugging on your side. E.g. do the caps change when inserting that new<br>
pipeline branch? Does the cairooverlay now copy each frame before<br>
overlaying (because the new branch also has a reference to it)?<br>
<br>
My guess is the second, and the overlaycomposition element would<br>
prevent that.<br>
<br>
-- <br>
Sebastian Dröge, Centricular Ltd · <a href="https://www.centricular.com" rel="noreferrer" target="_blank">https://www.centricular.com</a><br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div></div>