Release RAM, when close or reload stream
Deymos s via gstreamer-devel <[email protected]> Wed, 17 Apr 2024 16:01:40 +0300
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <CAMi4ONH0_53oy_JHrETLdPDNwMpWV2P6eVP6MssYUY_m5gN5qw@mail.gmail.com> |
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.