- Integrate your own models, media, or logic
- Optimize performance for specific runtime targets (CPU, GPU, NPU)
- Add new features or modify existing ones to match your use case
- Experiment with different pipeline configurations using GStreamer
- Build production-ready applications starting from a working baseline
- Setup the Device.
- Ensure that the IQ‑9075 device is running Ubuntu OS.
- Setup Wi-Fi and access IQ-9075 EVK device via SSH.
- If the PPA packages are not already installed, run the Install needed packages step.
Install needed packages
To install the needed pre-built packages, refer to the 🔗Install required software packages section and run the provided “Install PPA Packages script”.Build from Source
Follow the steps below to download, configure, and compile the sample application source code. This allows you to modify application behavior and integrate your own logic as needed. Install the following packages to download source code:Build the dependencies
Run the following command to get the plugins needed for source code compilation:Download source code
Download the sample application source code:Sample application code walkthrough
Consider the gst-ai-usb-camera-app for code walkthrough. This is a GStreamer-based application developed by Qualcomm to demonstrate how to use a USB camera for different purposes:- Show live video on a display
- Save video to a file
- Stream video over RTSP
- Run object detection using AI models
Details
Header Files and Constants:- GLib: Utility functions and main loop
- GStreamer: Multimedia framework
- Video4Linux2 (V4L2): Accessing USB camera
- JSON-GLib: Reading configuration from JSON
- GstCameraAppCtx
This structure holds the state of the application:
- GstAppOptions
This structure holds user-defined options from the config file:
Example config:
This function loops through /dev/video0 to /dev/video63 to find a valid USB camera.
This function builds a pipeline based on the output type (display, file, or RTSP). Example 1: Live Preview
v4l2src → capsfilter → waylandsink
Code:
v4l2src → capsfilter → qtivtransform → v4l2h264enc → h264parse → filesink
Code:
v4l2src → capsfilter → qtivtransform → v4l2h264enc → h264parse → qtirtspbin Object Detection Pipeline: Function: create_pipe()
This builds a more complex pipeline for AI-based object detection. Pipeline Flow:
v4l2src → capsfilter → tee → qtivcomposer → waylandsink Code:
- Preprocessing: qtimlvconverter
- Inference: qtimltflite, qtimlsnpe, or qtimlqnn
- Postprocessing: qtimlvdetection
- Overlay: qtivcomposer
- Initializes the app context
- Reads the config file
- Finds the USB camera
- Builds the pipeline
- Runs the main loop
Compile sample app
Compile
This example shows how to build the object detection app.Note: Every sample app needs to be compiled individually.
Run the compiled sample application
- Set the required environment variables to connect a Wayland application to the active user session.
- For Ubuntu Desktop, run the following command to creates a missing symbolic link (for TensorFlow Lite C library).
- Run
gst-ai-usb-camera-appapplication by using following command:
- To display the available help options, run the following command in the SSH shell:
Set GST_DEBUG environment variable used by GStreamer to control the verbosity and category of debug messages.
- To stop the use case, press CTRL + C

