Compile GSTREAMER FROM SOURCE

Hi,

On a new Linux desktop machine, I do the following:

git clone GStreamer / cerbero · GitLab
cd cerbero
./cerbero-uninstalled bootstrap
./cerbero-uninstalled package gstreamer-1.0

Error:
./meson.build:82:22: ERROR: Include dir /usr/lib/python3/dist-packages/cairo/include does not exist.

where the actual cairo is located at: /usr/include/cairo/include

ChatGPT says that I need to force the build to look at /usr/include/cairo/include:

meson build --prefix /path/to/your/gstreamer
-Dcairo-incdir=/usr/include/cairo

What I don’t understand, is where meson come in? since the only previous command i did were:
/cerbero-uninstalled bootstrap
./cerbero-uninstalled package gstreamer-1.0

gstreamer source code includes meson build scripts.

Thanks

Up till now I used the cerbero and it worked fine, until I reached a point when trying to test the Embeddded risc h264 encoder/decoder resides inside the Intel chip processor (called VAAPI) where it found mismatch version between the gst-lauch-1.0 utulity and the plugin.

I will try the meson build next week and keep you informed

You can build Intel driver with your gstreamer version.

Be aware that it can be very messy. It is better to install your build separately at a specific location. I installed the build under /opt/gstreamer on Linux. The reason is that other apps may still need the old gstreamer and driver.

I managed to get started with VA:
gst-launch-1.0
filesrc location=/home/user/working/Video/video.mp4 !
qtdemux name=demux
! h264parse ! vah264dec !
videobalance brightness=0.3 !
vah264enc ! h264parse ! vah264dec ! glimagesink

My question: why vasink was not generated (compile build from source)? So instead i used temporarily the glimagesink

Q1: Is there any advantage to compile the Intel driver from the github?
Q2: I assume that the VAAPI which is the intel driver and plugin already exists in the GSTREAM TREE, is that correct?
Q3: I managed to get started with the VAAPI generated from gstream source, but vasink did not generate, what is the reason?
Q4: Which folder contains the implementation for the Intel hw accelerator in GSTREAM?

Hi,

It is getting complicated to build gstreamer from source using meson

It has dependency requirement for GLIB 2.78 (which i build also from source) but the gstreamer could not find it, and thus failed the build

“undefined symbol: g_task_set_static_name” (see below)

Following are the commands :
export SOURCE_DIR=/home/user/Install/meson/gstreamer
export BUILD_DIR=/home/user/Install/meson/build-gstreamer
export INSTALL_DIR=/opt/gstreamer
export GLIB_INSTALL=$HOME/.local

export PATH=/home/user/.local/bin:$GLIB_INSTALL/bin:$PATH
export PKG_CONFIG_PATH=/home/user/.local/lib/pkgconfig:/home/user/.local/share/pkgconfig:$GLIB_INSTALL/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/home/user/.local/lib:$GLIB_INSTALL/lib:$LD_LIBRARY_PATH

source ~/.bashrc

sudo mkdir -p $INSTALL_DIR
sudo chown $USER:$USER $INSTALL_DIR

mkdir -p $SOURCE_DIR $BUILD_DIR $INSTALL_DIR

cd $SOURCE_DIR/gstreamer

meson setup $BUILD_DIR $SOURCE_DIR
–prefix=$INSTALL_DIR
–libdir=lib
-Dbuildtype=release

ninja -C $BUILD_DIR

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2986/4095] Compiling C++ object subprojects/gst-plugins-bad/sys/nvcodec/libgstnvcodec.so.p/gstcudaconverter.cpp.o
../gstreamer/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.cpp: In function ‘gboolean gst_cuda_converter_setup(GstCudaConverter*)’:
../gstreamer/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.cpp:1386:45: warning: ‘border_color’ may be used uninitialized [-Wmaybe-uninitialized]
1386 | priv->const_buf->border_w = border_color[3];

../gstreamer/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaconverter.cpp:1094:11: note: ‘border_color’ declared here
1094 | gdouble border_color[4];

^~~~~~~~~~~~
[3637/3996] Generating subprojects/gst-devtools/validate/gst/validate/validate-resources_c with a custom command
FAILED: subprojects/gst-devtools/validate/gst/validate/validate-resources.c
/home/user/.local/bin/glib-compile-resources ../gstreamer/subprojects/gst-devtools/validate/gst/validate/validate.res --sourcedir ../gstreamer/subprojects/gst-devtools/validate/gst/validate --c-name validate --internal --generate --target subprojects/gst-devtools/validate/gst/validate/validate-resources.c --dependency-file subprojects/gst-devtools/validate/gst/validate/validate-resources.c.d
/home/user/.local/bin/glib-compile-resources: symbol lookup error: /home/user/.local/bin/glib-compile-resources: undefined symbol: g_task_set_static_name
[3638/3996] Generating subprojects/gst-devtools/validate/gst/validate/validate-resources_h with a custom command
FAILED: subprojects/gst-devtools/validate/gst/validate/validate-resources.h
/home/user/.local/bin/glib-compile-resources ../gstreamer/subprojects/gst-devtools/validate/gst/validate/validate.res --sourcedir ../gstreamer/subprojects/gst-devtools/validate/gst/validate --c-name validate --internal --generate --target subprojects/gst-devtools/validate/gst/validate/validate-resources.h
/home/user/.local/bin/glib-compile-resources: symbol lookup error: /home/user/.local/bin/glib-compile-resources: undefined symbol: g_task_set_static_name
[3658/3996] Linking target subprojects/gst-libav/ext/libav/libgstlibav.so
ninja: build stopped: subcommand failed.

‫בתאריך יום ו׳, 23 במאי 2025 ב-17:08 מאת ‪Joe via GStreamer Discourse‬‏ <‪discourse@gstreamer.org‬‏>:‬

I do not think there is a vasink. try to check if an element exists with gst-inspect-1.0.

what are the contents under /home/user/.local/bin? If this path is needed, you did not set it.