Building GstQtOverlay plugin
GStreamer Qt Overlay |
---|
Overview |
Getting Started |
Examples |
Performance |
Similar Solutions |
Troubleshooting |
FAQ |
Contact Us |
GstQtOverlay can be built and installed GstQtOverlay either on Stand-alone or through Yocto. In this section, the two methods are detailed in order to add GstQtOverlay to your system.
Stand-alone Build
GstQtOverlay can be built and installed stand-alone easily using Autotools. This method is recommended for PC-based (x86/x64) platforms, Qualcomm RB5/RB6 and NVIDIA Jetson boards.
The following steps should be executed natively on your target hardware, for instance, if you are using a Jetson or an RB5, you need to run everything on that board. We assume that your board has Ubuntu installed. If your board doesn't have Ubuntu, please take a look at the instructions to build GstQtOverlay with Yocto.
Step 1: Install the Dependencies
Make sure that you install GstQtOverlay dependencies following our Dependencies section.
Step 2: Get the Source Code
Once you purchase GstQtOverlay, RidgeRun will provide source code access through a private GitLab repository. You need this access to build GstQtOverlay in your system and add it to your GStreamer plug-ins catalog. You will receive a repository URL that you can use to clone the source code using the following command:
git clone ${REPOSITORY_URL_PROVIDED_BY_RIDGERUN}
Where ${REPOSITORY_URL_PROVIDED_BY_RIDGERUN}
is the URL provided by RidgeRun after the purchase.
Step 3: Define the libdir path
Define the LIBDIR
environment variable according to your platform, this variable will define the path where the GstQtOverlay libraries will be installed. Table 1 shows the LIBDIR path for common platforms:
Platform | LIBDIR path |
---|---|
PC 32-bits/x86 | /usr/lib/i386-linux-gnu/ |
PC 64-bits/x86 | /usr/lib/x86_64-linux-gnu/ |
NVIDIA Jetson, Qualcomm RB5/RB6 | /usr/lib/aarch64-linux-gnu/ |
For example, if you are building GstQtOverlay for PC 64-bits/x86, you will need to run the following command in your terminal:
LIBDIR=/usr/lib/x86_64-linux-gnu/
But if you are building GstQtOverlay for an NVIDIA Jetson, you will need to run the following command instead:
LIBDIR=/usr/lib/aarch64-linux-gnu/
Step 4: Enable NVIDIA Jetson NVMM Support
You can skip this step if your platform is not an NVIDIA Jetson.
For NVIDIA Jetson Platforms you will need to export the path to the Multimedia API includes. The Multimedia API includes are usually located in the directory /usr/src/jetson_multimedia_api/include/
. You can run the following in the terminal to define this environment variable:
export CXXFLAGS=-I/usr/src/jetson_multimedia_api/include/
Enable NVMM support on Jetpack
Depending on the Major Jetpack version you need to set the --with-jp flag a. Set this configuration flag to enable NVIDIA Jetson support. For this, you can run the following command to define the {$QTO_FLAGS}
environment variable:
- For Jetpack 4.X:
QTO_FLAGS=" --with-platform=jetson --with-jp=4"
- For Jetpack 5.X:
QTO_FLAGS=" --with-platform=jetson --with-jp=5"
Step 5: Build and Install GstQtOverlay
Now can proceed with the build and install, executing the following commands:
cd gst-qt-overlay ./autogen.sh ./configure --libdir $LIBDIR $QTO_FLAGS make sudo make install
If you experience any error during the build, please check our Troubleshooting section. If the build finishes successfully, you can test the plugin installation as described in our Checking GstQtOverlay Install section.
Yocto Build
Step 1: Install the Dependencies
Make sure that you install GstQtOverlay dependencies following our Dependencies section.
Step 2: Get meta-ridgerun
RidgeRun offers a Yocto layer containing the recipes for RidgeRun's commonly used packages, including GstQtOverlay. You can clone RidgeRun meta-layer to your Yocto sources directory with the following command:
git clone https://github.com/RidgeRun/meta-ridgerun $YOCTO_DIR/sources/meta-ridgerun
Where $YOCTO_DIR
is the location of your Yocto project, make sure to replace it appropriately.
Step 3: Add meta-ridgerun to your Yocto build
Next, you will need to add the RidgeRun meta-layer to your bblayers.conf file, you can do this by adding the following line to your $YOCTO_DIR/BUILD_DIR/conf/bblayers.conf
file:
BBLAYERS += "${BSPDIR}/sources/meta-ridgerun
Step 4: Setup your SSH key
The RidgeRun meta-layer GstQtOverlay recipe will fetch the repository using your SSH keys; thus it is necessary to add your SSH public key to GitLab. You can get your SSH public key with the following command:
cat ~/.ssh/id_rsa.pub
If you do not have an SSH key yet, you can generate and get it using the following commands:
ssh-keygen -t rsa -C "your_email@example.com" cat ~/.ssh/id_rsa.pub
Make sure to replace "your_email@example.com" with your email address.
For adding your SSH key go to the GitLab web interface and open the user menu, click Preferences -> SSH Keys, add your public key information and a title and finally click the Add key button.
Step 5: Add the Repository URL
Once you purchase GstQtOverlay, RidgeRun will provide a GitLab repository URL for you to access GstQtOverlay source code. You will need to modify GstQtOverlay Yocto recipe to add this URL. Open the $YOCTO_DIR/sources/meta-ridgerun/recipes-multimedia/gstreamer/gst-qt-overlay_*.bb
file, you should see a line similar to the following:
SRC_URI = "git://git@gitlab.com/RidgeRun/orders/<Customer-Directory>/gst-qt-overlay.git;protocol=ssh;branch=${SRCBRANCH}"
Replace the git://git@gitlab.com/RidgeRun/orders/<Customer-Directory>/gst-qt-overlay.git
section of the line with the URL provided by RidgeRun.
Step 6: Change the platform flag
- If using I.MX platform go to the recipe and add the platform flag:
If the platform uses kirkstone release or above
EXTRA_OECONF += "--with-platform=imx CPPFLAGS='-I${RECIPE_SYSROOT}/usr/include -I${WORKDIR}/recipe-sysroot/usr/include/gstreamer-1.0/gst/allocators/imx/' "
Othewise:
EXTRA_OECONF += "--with-platform=legacy-imx CPPFLAGS='-I${RECIPE_SYSROOT}/usr/include -I${WORKDIR}/recipe-sysroot/usr/include/gstreamer-1.0/gst/allocators/imx/' "
Also check the graphics api version and update the name of the recipe located on:
meta-ridgerun/recipes-graphics/imx-gpu-viv/imx-gpu-viv_5.0.11.p8.6-hfp.bbappend
- For x86:
EXTRA_OECONF += "--with-platform=x86 CPPFLAGS='-I${RECIPE_SYSROOT}/usr/include -I${WORKDIR}/recipe-sysroot/usr/include/gstreamer-1.0/gst/allocators/imx/' "
- For jetson:
EXTRA_OECONF += "--with-platform=jetson CPPFLAGS='-I${RECIPE_SYSROOT}/usr/include -I${WORKDIR}/recipe-sysroot/usr/include/gstreamer-1.0/gst/allocators/imx/' "
Step 7: Build GstQtOverlay
Finally, build the recipe by running:
bitbake gst-qt-overlay
If you experience any error during the build, please check our Troubleshooting section. If the build finishes successfully, you can test the plugin installation as described in our Checking GstQtOverlay Install section.