Unload plugin library when destroy pipeline

Sebastian Dröge sebastian at centricular.com
Thu Sep 16 06:15:43 UTC 2021


On Thu, 2021-09-16 at 05:40 +0000, Kevin Song via gstreamer-devel
wrote:
>  
> I found GStreamer don’t unload plugin library when destroy pipeline.
> Why we have this kind of design? Is it possible to unload the plugin
> library? We need this as there maybe big library linked to plugin, we
> need save memory after removed the plugin in the pipeline.

The reason is that getting this right is very complicated. It's not
just GStreamer and plugin code that would need to be suitable for
unloading (and reloading), but also any plugin's dependencies.
Many libraries don't safely allow this, and even GLib is an example of
a library that can't be safely unloaded/reloaded.

For memory usage, shared libraries are usually just mmap'd into the
process and because of that don't necessarily use a lot of memory. If
your library actually does use a lot of memory, it might be a good sign
for it being a case that can't be safely unloaded/reloaded.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210916/d6e10675/attachment.htm>


More information about the gstreamer-devel mailing list