What is the highest gestreamer version on Ubuntu 18.04

cfd new newcfd at yahoo.com
Wed Feb 8 19:59:36 UTC 2023


 Pretty sure that memory leaks exits. Simply toggle StatePlaying/StateNull and memory leak can be observed. My app will eventually crash when too many times of toggle are done. 

   Joe


    On Wednesday, February 8, 2023, 12:47:52 p.m. EST, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:  
 
 Hi,

The installed gstreamer version 1.14.5 has a lot of memory leak in rtsp
streaming. I want to installed the highest one possible for Ubuntu
18.04.

The main requirement to build a more recent version of GStreamer is a recent-enough version of the Meson build system, which in turn might require a newer python version than you might have available on your system.
>From memory (on the Jetson nano running L4T Ubuntu 18.04), I think what you could do was something like:
 apt install python3.8 apt remove python-pip python3-pip python3-wheel (since this is for the too-old python3.6) wget https://bootstrap.pypa.io/get-pip.py python3.8 get-pip.py pip3 --version pip3 install -U meson meson --version
Which should hopefully get you a recent-enough meson installed using python 3.8. (I'm sure someone will chime in if there's a better way.)
Obviously this is only a good idea if you don't have other python things installed with the existing pip3, so please only try that on a clean/new system.
Once you have a recent-enough meson, you can build an uninstalled GStreamer version from the GStreamer monorepo:
 git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git cd gstreamer (optionally) git checkout -b 1.22 origin/1.22 meson builddir -Dgpl=enabled ninja -C builddir ninja -C builddir devenv gst-inspect-1.0 --version
The GLib version on your system will likely be too old (2.56) for what GStreamer requires (2.62), so the monorepo build will build its own newer GLib as a subproject. It's possible that requires additional build dependencies (-dev packages) and/or meson compile switches, I don't recall, but it should be doable. Once you've got that set up you may need to make sure that you've got the right -dev packages for the various gstreamer plugins you need installed. sudo apt build-dep gstreamer1.0-plugins-base gstreamer1.0-plugins-good might be a good start.
You can use this setup uninstalled, so that it doesn't mess up your system deps.
The uninstalled setup won't pick up any of the nvidia plugins from the system (if you're on such a system), so you may need/want to copy any nvidia plugins into the uninstalled devenv if you want to use them. Don't remember if there was any special to take into account here, I'm sure someone will chime in.
Alternatively you could also use docker of course.
Are you sure what you're seeing are actually memory leaks? Perhaps it's just memory allocator fragmentation? In which case running your app with G_SLICE=always-malloc might help a bit.
Cheers  Tim
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230208/5a5c942f/attachment-0001.htm>


More information about the gstreamer-devel mailing list