# GStreamer plugin architecture The Qualcomm IM SDK hides the complexity of the hardware within the plugin architecture and provides APIs to applications. Using this framework, you can create applications without the need to access the low-level platform libraries and hardware details, which can vary across platforms. The [Configure Qualcomm GStreamer plugins](https://docs.qualcomm.com/doc/80-80021-50/topic/qim-sdk-plugins.html) include video encoding/decoding, camera ISP, GPU, display, audio DSP (aDSP), and AI/ML accelerators. Customer Application Qualcomm IM SDK Plugins HAL/Platform libraries Multimedia subsytem Audio encode/decode Camera source Socket source/sink Video compose Video overlay Video split Video transform File parse Pulse source/sink Stream muxers/demuxers Video encode/decode Waylandsink AI/ML subsystem Tensorpostprocessing LiteRT Qualcomm NeuralProcessing Engine Video to tensorconverter Metamuxer Tensor demuxer Batching Detection Pose estimation Classification Segmentation Network subsystem RTSP Camera service Camera source Qualcommcomputer vision Weston FastRPC GBM GLES/OpenCL CAMX/HAL3 Pulse audio Drivers CAMX/Camera Audio Display WLAN ALSA GPU DSP Video ION/DMA Hardware Camera/ISP Computer vision Sensors Audio Video Hardware Qualcomm Open source **Figure : Qualcomm IM SDK GStreamer plugin architecture** ## Graphics and display architecture The Wayland server uses the Wayland protocol to enable communication between the display and graphics servers, and its clients. The display and graphics architecture uses the Weston server (Weston). Weston manages both composition and display while it runs as a separate process in the system. Weston server Wayland / GLES Client OpenGL ES EGL DRM backend Weston server EGL subdriver libdrm DRM/KMS Waylandprotocol Waylandprotocol GPUcomposition KGSL GSL Qualcomm Open source **Figure : Weston/Wayland architecture** Weston/Wayland components | Component | Description | | --- | --- | | Wayland/ GLES client | Implements the Wayland protocol for Weston. | | Weston server | Implements the Wayland compositor. - Uses the Kernel Mode Setting (KMS) to set up the display. - Performs the compositing using OpenGL ES and Direct Rendering Manager (DRM). | | Secure dynamic messaging (SDM) back-end | | | GBM buffer management library (libGBM) | | | EGL platform-specific driver (EGL sub-driver) | Interacts with GBM and Wayland protocol to communicate with the Weston compositor. | ## Camera architecture The camera architecture provides a high-level abstraction on how the underlying camera driver and hardware interact with the [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-80021-50/topic/qtiqmmfsrc.html) camera plugin. The following figure shows the camera architecture, where the qtimmfsrc plugin acts as a client to the Qualcomm Camera Service. GST BIN qmmfsrc Waylandsink Sensor IFE IPE LE camera service Unix domain socket IPC Camx Cameraadapter Buffermanager Qualcomm Open source **Figure : Camera pipeline** Camera pipeline components | Component | Description | | --- | --- | | Linux embedded (LE) camera service | | | Client/server architecture | Allows the multi-client and multi-camera use cases to do the following:

| | qtiqmmfsrc |

For example, if there are three parallel streams, they’re processed as follows:


  1. One stream for local storage.


  2. One stream for YUV stream for live camera preview on a local display.


  3. One for network streaming.



| | [Waylandsink](https://docs.qualcomm.com/doc/80-80021-50/topic/waylandsink.html) | | | Buffers | | ### Related information [Camera use cases](https://docs.qualcomm.com/doc/80-80021-50/topic/camera.html) ## Video architecture The [v4l2h264enc](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h264enc.html) and [v4l2h265enc](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h265enc.html) video encode plugins connect with the camera plugin to implement the advance video encode (H.264 or H.265) use cases. The [v4l2h264dec](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h264dec.html) and [v4l2h265dec](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h265dec.html) video decode plugins connect with Waylandsink to implement the video playback use cases. ### Encode The following figure shows the architecture for video encoding. The v4l2h264enc and v4l2h265enc plugins are connected to a file multiplexer (MP4 or MPEGTS) to save the encode bitstream to the file system. For video encode use cases, see [Video encode and decode](https://docs.qualcomm.com/doc/80-80021-50/topic/camera-and-video-encode.html). GST BIN qmmfsrc Videoencode H264/H265parse Filemux(MP4 or MPEGTS) Camera driver LE camera service Unix domain socket IPC Camx Cameraadapter Buffermanager v42ldriver Qualcomm Open source **Figure : Video encode pipeline** Video encode components | Components | Description | | --- | --- | | qtiqmmfsrc | Captures and provides several video streams in parallel. For more information about the camera service, see Camera architecture. | | Video encode plugins | Uses the V4L2 driver and APIs to encode the video stream. - [v4l2h264enc](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h264enc.html): Encodes the video for AVC (H.264) format. - [v4l2h265enc](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h265enc.html): Encodes the video for HEVC (H.265) format. | | H.264/H.265 parse | Parses the video stream. | | Filemux | Multiplexes encoded video stream and saves to a file. | ### Decode The following figure shows the architecture for video decoding where the video stream from a file is demultiplexed, decoded, and displayed on a local device. The decode parameters are exposed as a property to the application to provide control over the video decode pipeline. GST BIN Filesrc Stream demux Video decode Waylandsink V4l2 driver DRM/KMS Weston DRM libdrm Open source **Figure : Video decode pipeline** For video decode use cases, see [Video playback use cases](https://docs.qualcomm.com/doc/80-80021-50/topic/video-playback-use-cases.html). Video decode components | Components | Description | | --- | --- | | Video decode plugins | Uses the V4L2 driver and APIs to decode the video stream and connects with the Waylandsink plugin. - [v4l2h264dec](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h264dec.html): Decodes the video for AVC (H.264) format. - [v4l2h265dec](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h265dec.html): Decodes the video for HEVC (H.265) format. | | Waylandsink |

  1. Receives the GBM buffers (decoded buffers) as an input.


  2. Sends them to the Weston server (through Wayland protocol) for display composition.


| ## Audio architecture For audio capture and playback, use the [pulsesrc](https://docs.qualcomm.com/doc/80-80021-50/topic/pulsesrc.html) and [pulsesink](https://docs.qualcomm.com/doc/80-80021-50/topic/pulsesink.html) GStreamer plugins. You can encode and decode audio through an open-source software. ### Capture The following figure shows the audio capture using the pulsesrc plugin. The audio stream is then processed and written to a file. GST BIN Pulsesrc PCM filesink ALSA PulseAudioserver Open source **Figure : Audio capture pipeline** Audio capture components | Component | Description | | --- | --- | | Pulsesrc | | | PulseAudio server | | ### Playback Use the pulsesink plugin for audio playback. It’s an upstream plugin that allows you to play audio from various audio sources (live source or an encoded audio file). GST BIN filesrc PCM Pulsesink ALSA PulseAudioserver Open source **Figure : Audio playback pipeline** Audio playback components | Component | Description | | --- | --- | | Pulsesink | | | PulseAudio server | | ### Encode You can encode the audio using an open-source audio encoder plugin. GST BIN Pulsesrc Audio encode Parse FileMux(MP4 or MPEGTS) ALSA PulseAudioserver Softwareencoding Open source **Figure : Audio encoding pipeline** Audio encoding components | Component | Description | | --- | --- | | Pulsesrc | Captures the audio and shares it with the underlying PulseAudio server. | | PulseAudio server | Interacts with the ALSA driver to process the audio data for encoding. | | Encode | Encodes the audio data using an open-source software. | | Parse | Parses the audio data. | | Filemux | Multiplexes it and saves it in an MP4 or MPEGTS container. | ### Decode You can decode the audio using an open-source audio decoder plugin. GST BIN filesrc Stream demux Audio decode Pulsesink Softwareencoding ALSA PulseAudioserver Open source **Figure : Audio decode pipeline** Audio decode components | Component | Description | | --- | --- | | Filesrc | Reads the audio data. | | Stream demux | Demultiplexes the audio data. | | Decode | Decodes the audio data using an open-source software. | | Pulsesink | Interacts with the underlying PulseAudio server and plays the decoded audio. | | PulseAudio server | Interacts with the ALSA driver to process the audio data for decoding. | ## Machine learning architecture Qualcomm IM SDK supports machine learning use cases that include video preprocessing, model inference, output tensor postprocessing, and inference result overlay to stream. The machine learning framework provides the following types of video analytics: - Image classification - Object detection - Image segmentation With machine learning plugins in the framework, use the following for inferencing: - [LiteRT](https://ai.google.dev/edge/litert) (or TFLite) - [Qualcomm Neural Processing SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-2/overview.html) For each of the engines, the delegates speed up the model inference performance. ### ML pipeline processing The following figure depicts the pipeline in which the captured video/audio stream is processed among the preprocessing, inference, and postprocessing plugins. GST BIN Video/Audiosource Pre-processplugin ML inferenceplugin Post-processplugin GPU DSP/GPU/NPU Submodule QNN TFLite SNPE OpenGL ES GstMLTensorMeta + id: Identification number that correspondsto the GstMemory index inside GstBuffer. + type: Tensor type (UINT8, FLOAT32, etc.) + dimensions[CMAX]: Array containing thetensor dimensions (e.g., 1x513x513x3) + n_dimensions: Actual number of the dimensions (e.g., 3 for three dimensions) + gst_buffer_add_ml_tensor_meta(): Add the meta to a GstBuffer+ gst_buffer_get_ml_tensor_meta(): Retrieve the 1st meta entry+ gst_buffer_get_ml_tensor_meta_id(): Retrieve the nst meta entry GstBuffer + GstMemory: Contains a single tensor Example: 1x513x513x3 + GstMemory: Next tensor and so on... + GstMLTensorMeta: Describes the raw data of a single tensor + GstMLTensorMeta: Meta for next tensor entry + ... neural-network/tensors GstCaps have the following common rules: dimensions: GstArray is tensors dimension values separated by ',' and marked with delimiters ‘<’ for beginning and ‘>’ for end. # Example-> < <5, 300, 300, 1>, <1, 1, 1000, 1> >##type: (string) {UINT8, INT8, UINT16, INT16, UINT32, INT32, UINT64, INT64, FLOAT32, FLOAT64} Open source First tensor Second tensor **Figure : ML pipeline** The following table lists the sequential stages during which the video/audio stream is captured, processed, and the output is either displayed on a screen or saved to a file. ML pipeline processing stages | Process | Description | | --- | --- | | Source | | | Preprocessing | [qtimlvconverter](https://docs.qualcomm.com/doc/80-80021-50/topic/qtimlvconverter.html) does the following to prepare the video stream for inferencing:
| | Inferencing |

  1. The preprocessed data is sent to the inference plugin in a tensor format.


  2. The inference plugin sends this data to the machine learning engines:


| | Postprocessing | The output tensor is passed down to the postprocessing plugin [qtimlpostprocess](https://docs.qualcomm.com/doc/80-80021-50/topic/qtimlpostprocess.html). | | Overlay | The overlay plugin that interprets the machine learning metadata.

  1. qtivoverlay draws appropriate overlay on the buffer that allows the inference result to be visualized in real-time.


  2. The stream can be rendered on to the display, streamed over network, or encoded and stored to a local storage.


| | Sink | | ### Related information [Run machine learning use cases](https://docs.qualcomm.com/doc/80-80021-50/topic/machine-learning-use-cases.html) Last Published: Mar 26, 2026 [Previous Topic Qualcomm GStreamer architecture and plugins](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/gst-plugin-architecture.md) [Next Topic Configure Qualcomm GStreamer plugins](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/qim-sdk-plugins.md)