glimagesink: Performance Bottlenecks, New GL Texture w/Every Frame
Matthew Waters
ystreet00 at gmail.com
Tue Oct 6 23:53:00 UTC 2020
The code for reusing textures is the same no matter the OpenGL platform
(EGL, GLX, etc), Window system (X11, Wayland, etc) and is part of
GstGLBufferPool usage. If your pipeline is not using some kind of
bufferpool (or holding onto buffers indefinitely) then textures will be
created every frame. Another failure case is if the GstBuffer is
modified in some incompatible way that the GstGLBufferPool throws away
the buffer instead of reusing it. This all depends entire on your
pipeline and would require debugging as to what case you're hitting.
Cheers
-Matt
On 7/10/20 3:07 am, Kenneth Sloat wrote:
> Hello all,
>
> I am using gstreamer 1.14 on an aarch64 based embedded Linux system with glimagesink. This particular platform uses an X11 EGL backend for GPU usage. I can successfully get video images on my screen, but am running into some real performance bottlenecks with dropped frames if the images get relatively large. This occurs in any pipeline, even pure gstreamer OpenGL ones. So for simplified testing purposes, to try and find the bottleneck, I have been using a simple OpenGL pipeline like:
>
> gst-inspect-1.0 gltestsrc ! glimagesink
>
> Turning on various levels of gst debugging, and also comparing the behavior of running the same pipeline on my x64 Linux machine, I managed to observe some different behavior between the two.
>
> My PC seems to allocate a handful of textures (and buffers obviously) when the pipeline is created, and then appears to reuse these throughout the lifetime of the application.
>
> The embedded system however, allocates a new texture with every frame. I believe that this may be causing the performance penalty I am seeing and essentially blocking the pipeline for a longer period of time with each frame.
>
> Obviously I have two different display platforms here so it's not an apples to apples comparison. What I am trying to do however is find where and why this behavior is invoked for this display platform to determine if it can be optimized. The call to actually create the texture is _gl_tex_create() within gstglmemory but I am continuing to try and trace this further up the pipe. In the mean time, I wanted to reach out here and see if this rings any bells with anyone that might have had a similar experience.
>
> Thanks!
>
> Sincerely,
> Ken Sloat
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201007/149d0167/attachment.sig>
More information about the gstreamer-devel
mailing list