Build from Source
All QIM SDK GStreamer plugins and sample applications are already available as pre-built packages via apt installation. In most cases, source compilation is unnecessary.
You can also compile from source directly on the device, which is useful for:
- Modifying plugin source code to customize post-processing logic or add custom model support
- Debugging plugin internals
- Using build options that differ from the pre-built packages
The build produces 34 GStreamer plugin shared libraries (.so), covering AI inference engines (mltflite, mlqnn, mlsnpe), preprocessing (mlvconverter), post-processing (mlpostprocess and others), and video processing (vcomposer and others). See the steps below.
Prerequisites
- Completed QIM SDK Installation
Install Build Dependencies
sudo apt-add-repository -s ppa:ubuntu-qcom-iot/qcom-ppa
sudo apt update
sudo apt install -y \
qcom-adreno-dev \
libgstreamer1.0-qcom-sample-apps-utils-dev
Build QIM Plugins from Source
Step 1: Download QIM Source
cd ~
apt source gst-plugins-qti-oss
cd gst-plugins-qti-oss-*
Step 2: CMake Build
mkdir build && cd build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib/aarch64-linux-gnu \
-DCMAKE_INSTALL_BINDIR=bin \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DGST_VERSION_REQUIRED=1.24.0 \
-DENABLE_GST_PLUGIN_BASE=ON \
-DENABLE_GST_ML_PLUGINS=ON \
-DENABLE_GST_VIDEOPROC_PLUGINS=ON \
-DENABLE_GST_SAMPLE_APPS=ON \
..
make -j$(nproc)
Step 3: Install
sudo make install
Step 4: Verify
ls /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstqti*.so | wc -l
Approximately 34 plugin shared libraries are installed, such as libgstqtimltflite.so, libgstqtimlvclassification.so, etc.
Troubleshooting
CMake cannot find GStreamer
Verify GStreamer development packages are installed:
pkg-config --modversion gstreamer-1.0
If not found, install:
sudo apt install libgstreamer1.0-dev
Reference
- Python GStreamer Apps — Python development approach