What is the GStreamer App Builder Skill?
The QIM SDK GStreamer App Builder is an AI coding skill that generates GStreamer pipelines/applications using theQIM SDK GStreamer API. You describe the pipeline behavior and configuration in natural language, and the agent produces either a native GStreamer C application (main.c + CMakeLists.txt) or a gst-launch shell script — along with a README.md that documents the generated app.
The skill can generate both native C applications and gst-launch shell scripts. The example on this page shows a native C application; use the prompt to request a
gst-launch script instead when you want a quick, build-free pipeline.
main.c— a complete, buildable native GStreamer C application, including element creation, property configuration, dynamic pad handling, linking, and bus/event-loop managementCMakeLists.txt— the build script that compilesmain.cagainst GStreamer and linksgstappsutilsREADME.md— a detailed document covering:- Purpose and pipeline behavior summary
- Configuration placeholders (input, model, labels, output paths)
- A step-by-step pipeline flow (text summary + Mermaid diagram)
- Steps to build and run the app on device
gst-launch request, the agent instead produces a shell script containing the full gst-launch-1.0 pipeline plus a README.md.
Supported use cases:
Prerequisites
For generating code
Qualcomm dev kits are not needed for code generation.
This skill is designed to work well even with low-reasoning / smaller models.Eg: A Sonnet 4.5 model is sufficient.
For deploying and running apps
The target devices where QIM SDK is supported (see QIM SDK Installation Guide)How to Use
Step 1: Get the skill
Clone the skill repository to your host machine, then copy the QIM SDK GStreamer App Builder skill into your coding agent’s skills directory. Also copy the qimsdk-deploy skill, which builds, deploys, and runs the generated app on device (see Step 4):The skills directory is agent-specific — Claude Code uses
~/.claude/skills/. Check your coding agent’s documentation for its skills location. You can also scope skills to a single workspace (e.g. Claude Code supports <project>/.claude/skills/).Step 2: Load the skill
Restart (or reload) your coding agent after placing the skills so it picks them up. They will appear automatically in the/skills list.
To verify, open the agent panel and run:
qimsdk-gstreamer-app-builder and qimsdk-deploy listed.
Step 3: Generate the application
Describe your pipeline to the agent. It will automatically activate the skill and generate a completemain.c, CMakeLists.txt, and README.md (or a gst-launch script plus README.md).
Sample Prompt
Prompt format — describe pipeline behavior and configuration:To generate a
gst-launch shell script instead of a C app, ask for it explicitly — e.g. “Create a gst-launch script for single-stream YOLOX object detection …”.Generated README.md
The README documents the generated app in full:
- Purpose — a plain-English summary of what the pipeline does
- Files — lists
main.c,CMakeLists.txt, andREADME.mdwith descriptions - Assumptions — codec format, quantization requirements, camera defaults, output directory pre-conditions
- Configuration — all user-supplied paths (input, model, labels, output) with instructions on where to change them
- Placeholders to Fill — any values you still need to supply, or a note that none remain when the request was fully specified
- Pipeline Flow — a
Text Summarywalkthrough of every element plus aMermaid Diagramof the full pipeline - Steps to Compile — how to build the app for Yocto
- Steps to Run — exact commands to run on device
README.md
README.md
QIM SDK GStreamer C App — Single-Stream YOLOX Object Detection (MP4 → MP4)
Purpose
Decode an MP4 file with the Qualcomm hardware decoder, run YOLOX object detection on full frames using the TFLite external delegate on the HTP/NPU, merge the detection metadata with the video stream, overlay bounding boxes and class labels, then hardware-encode the annotated video to an output MP4 file. Headless (no display).Files
main.c— GStreamer C sample app (usesgst_parse_launch)CMakeLists.txt— build targetgst-qimsdk-yolox-obj-detect-encodeREADME.md— this file
Assumptions
- Input is H.264-in-MP4, decoded with
v4l2h264dec(capture-io-mode=4,output-io-mode=4). - YOLOX (
yolox_w8a8.tflite) uses theyolov8postprocess module withyolov8.jsonlabels, per the model catalog. - Confidence threshold:
{"confidence": 51.0}. - No
bbox-stabilization— this is a file source, not a live camera feed. - Encoder
v4l2h264encio-modes4/4— correct for decoder-produced (DMA) NV12 buffers from a file source. - All file paths are resolved at runtime via
g_getenv("HOME")— C string literals do not expand$HOME.
Configuration (resolved at runtime from $HOME)
Placeholders to Fill
None — all paths and values are concrete. If you need different paths, edit theg_strdup_printf calls in main.c.Pipeline Flow
Text Summary
filesrc reads the MP4; qtdemux demuxes the H.264 stream, h264parse
prepares it, and v4l2h264dec hardware-decodes to NV12. A tee (t) splits:- AI branch:
qtimlvconverter→qtimltflite(YOLOX, HTP/NPU external delegate) →qtimlpostprocess(module=yolov8, confidence 51.0) →text/x-rawcaps-filter →qtimetamux. - Passthrough / video branch: →
qtimetamux(metamux).
qtimetamux merges metadata onto the video frames, qtivoverlay draws
bounding boxes and labels, and v4l2h264enc encodes back to H.264.
h264parse + mp4mux + filesink write the output MP4.Mermaid Diagram
Steps to Compile
Yocto: https://imsdkdocs.qualcomm.com/advanced/yocto-build#steps-to-build-custom-applicationSteps to Run
All referenced files — the input MP4, theyolox_w8a8.tflite model, and the
yolov8.json labels — must already be present on the device at the paths
listed in Configuration above.$HOME/Downloads/qimsdk_samples/media/obj_detect_out.mp4 on the device.Generated main.c
- The generated application uses
gst_parse_launchto build the full pipeline from a single pipeline string — no manual element creation or pad linking. - All file paths are resolved at runtime via
g_getenv("HOME")and formatted withg_strdup_printf— C string literals do not expand$HOME. - A GLib main loop and bus watch handle EOS and errors; a
SIGINThandler (g_unix_signal_add) allows clean shutdown. qtivoverlaydraws bounding boxes, and the result is hardware-encoded and written to an MP4 file viafilesink.
main.c
main.c
Generated CMakeLists.txt
- Uses
pkg-configto locate the requiredgstreamer-1.0development package. - Builds a single executable (
gst-qimsdk-yolox-obj-detect-encode) frommain.cand links GStreamer libraries plusgstappsutils. - Installs the binary to
${GST_PLUGINS_QTI_OSS_INSTALL_BINDIR}with standard executable permissions.
CMakeLists.txt
CMakeLists.txt
Step 4: Running the applications
1
Download Required Files
If the downloaded model file is a
.zip archive, extract it on your host machine before copying: unzip filename.zip2
Copy the assets to the device
The input video, model, and labels must be present on the device before running — regardless of how you build and run the app. Copy them to the paths
main.c expects:3
Build and run the application
Unlike a
gst-launch script, a native C app must be compiled before it can run. With the assets in place, you have two options to build and run the agent-generated app:Option A — Use the QIM SDK Deploy skill:The qimsdk-deploy skill builds the app on your host against the SDK, then pushes the compiled binary to the device and runs it over SSH. It handles only the app build and binary transfer — the assets from the previous step must already be on the device.Option B — Follow the generated README:Follow the steps in the generated README.md to compile the app, then push the binary to the device and run it:-
Compile the app by following the build steps for your platform:
- Yocto: Yocto Build
-
Push the compiled binary to the device and run it:
~/Downloads/qimsdk_samples/media/obj_detect_out.mp4.Available Sample Prompts
- C App
- gst-launch

