Building newer GStreamer versions

I’d like to use the newest version of GStreamer and pipewire while developing but I cannot figure out how to build and install it properly while retaining functionality. I’m relying on pipewiresrc which always seems to be missing when I build.

git clone https://gitlab.freedesktop.org/gstreamer/gstreamer
cd gstreamer
meson setup builddir -Dtests=disabled-Dintrospection=disabled
meson compile -C builddir

I can then run ./gst-env.pyto get into an environment that uses it but

gst-inspect-1.0 pipewiresrc
No such element or plugin ‘pipewiresrc’

Which of course works fine with my system install

gst-inspect-1.0 pipewiresrc
Factory Details:
  Rank                     primary + 1 (257)
  Long-name                PipeWire source
  Klass                    Source/Audio/Video
  Description              Uses PipeWire to create audio/video
  Author                   Wim Taymans <wim.taymans@gmail.com>

Plugin Details:
  Name                     pipewire
  Description              Uses PipeWire to handle media streams
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpipewire.so
  Version                  1.0.7


Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpipewire.so

How exactly do I make it use a newer pipewire?

The pipewire plugin ships with pipewire and is not included in the GStreamer monorepo checkout.

If you’re using the dev environment, you could just copy the libgstpipewire.so file into path/to/gstreamer/prefix/lib/gstreamer-1.0 where path/to/gstreamer is the location of your monorepo checkout. You may have to mkdir -p prefix/lib/gstreamer-1.0 first. If you’re lucky that works.

I built pipewire and found this .so file that I need to copy. So I ran

sudo meson install -C builddir

Which should make a prefix in the default location of /usr/local and I can see inside /usr/local/lib/x86_64-linux-gnu a folder called gstreamer-1.0 that the plugin could go inside.

My problem now is whenever I try to do something with this new gstreamer I get

Terminal:~$ gst-inspect-1.0 --version
gst-inspect-1.0: symbol lookup error: gst-inspect-1.0: undefined symbol: _gst_value_unique_list_type

Terminal:~$ which gst-inspect-1.0
/usr/local/bin/gst-inspect-1.0

So clearly I’m still missing something. I don’t see anything obvious in GStreamer / gstreamer · GitLab that explains what else I need.

Before you were talking about an uninstalled dev env checkout, now you install things into a prefix, those are different things.

Because you installed into /usr/local there’s probably a mismatch/clash with your system packages now, things are picked up from different versions.

_gst_value_unique_list_type is something that only exists in the very latest GStreamer version from the main branch, so something you built might be pulling in an older libgstremaer-1.0.so from somewhere (probably your system prefix).

I had to add a few .bashrc entries to force it to use the new version.

export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
export GST_PLUGIN_PATH=/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0
export PATH=/usr/local/bin:$PATH

I built the newest pipewire and used the new libgstpipewire.so it generated but that didn’t work. I ended up copying my system libgstpipewire.so instead which looks to have picked up the newer of pipewire I installed.