Release RAM, when close or reload stream
Deymos s
yarmolovichv at gmail.com
Wed Apr 17 13:01:40 UTC 2024
I am developing a video wall for 32-64 streams, I faced the problem of
increasing memory when restarting streams I have an example illustrating my
problem.
Example: https://github.com/Deymoss/Rtsp-player
When I start the application, a pipeline is created, as a result, the
application initially takes 54MB of RAM, when I start the stream, the
volume increases to ~ 110 MB, when I close the stream, the memory is not
freed, when I run the same stream again, the amount of RAM increases to 120
MB, and so on, 36 streams eats 5 gb RAM for 12 hours, the same is true for
file files descriptors (I suspect BUS creates them)
How to properly clear the memory and all information about the stream when
closing?
At the moment I'm setting the pipeline to NULL and not making an unref, but
if I uncomment these lines:
gst_bus_set_sync_handler(m_videoPipe->bus, nullptr, nullptr,
nullptr);gst_object_unref(m_videoPipe->pipeline);gst_object_unref(m_videoPipe->bus);
nothing changes in memory consumption, although the refcount of each
element and the pipeline itself at the end of the function is zero.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20240417/4c3f257e/attachment.htm>
More information about the gstreamer-devel
mailing list