This section explains how to compile QIMSDK plugins directly on a x86 host machine running Ubuntu.Prerequisites
Before you begin, ensure the following:
- Internet connectivity for downloading packages and source code.
- Sufficient space on the host to download the SDK. Upto ~5GB.
Download and install the sdk.
Download SDK
wget -O sdk.zip https://artifacts.codelinaro.org/artifactory/qli-ci/flashable-binaries/meta-qcom/qcom-armv8a/x86-qli-2.0-standardsdk.zip
wget -O sdk.zip https://artifacts.codelinaro.org/artifactory/qli-ci/flashable-binaries/meta-qcom/qcom-armv8a/arm-qli-2.0-standardsdk.zip
Extract and Install the SDK
unzip sdk.zip && cd images/qcom-armv8a/sdk/
bash qcom-distro-x86_64-qcom-multimedia-proprietary-image-armv8a-qcom-armv8a-toolchain-2.0.sh -d <path_to_install_sdk> -y
bash qcom-distro-aarch64-qcom-multimedia-proprietary-image-armv8a-qcom-armv8a-toolchain-2.0.sh -d <path_to_install_sdk> -y
Source the cross-compilation toolchain environment
source <path_to_install_sdk>/environment-setup-armv8a-qcom-linux
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script in Step 4.
Steps to Compile
To download the source code and compile the sample applications, run the following commands.Clone the sources from github
git clone https://github.com/qualcomm/gst-plugins-imsdk.git
cd gst-plugins-imsdk
Run CMake to generate the Makefile and build
cmake -B build -S . \
-DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_GST_IMSDK_PLUGINS=1 \
-DENABLE_GST_PLUGIN_MLTFLITE=1 \
-DENABLE_GST_PYTHON_EXAMPLES=1 \
-DENABLE_GST_SAMPLE_APPS=1 \
-DENABLE_GST_SAMPLE_APPS_CAMERA=1 \
-DENABLE_GST_PLUGIN_TOOLS=1 \
-DENABLE_GST_CAMERA_PLUGINS=1 \
&& cmake --build build
After modifying any part of the source code, re-run step 2 to rebuild your changes.
The corresponding libs from build directory can then be copied on to device.
Steps to build custom application
Go through the prerequisites and Steps to Compile section before starting this.Create a subdirectory in gst-sample-apps
cd gst-plugins-imsdk/gst-sample-apps && mkdir gst-<your_sample_apps>
Copy the binary to target device
#The application will be found in the below location
gst-plugins-imsdk/build/gst-sample-apps/gst-<your_sample_apps>/
On-device compilation for Yocto is not yet available in this documentation. Please refer to the on-host compilation instructions.