# GStreamer plugin architecture Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html) 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-70022-50/topic/qim-sdk-plugins.html) include video encoding/decoding, camera ISP, GPU, display, audio DSP (aDSP), and AI/ML accelerators. Figure : Qualcomm IM SDK GStreamer plugin architecture 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 ## Graphics and display architecture Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html) 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. Figure : Weston/Wayland architecture 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 Table : Weston/Wayland components | Component | Description | | --- | --- | | Wayland/ GLES client | Implements the Wayland protocol for Weston. | | Weston server | Implements the Wayland compositor. | | 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 Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html) 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-70022-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. Figure : Camera pipeline GST BIN qmmfsrc Waylandsink Sensor IFE IPE LE camera service Unix domain socket IPC Camx Cameraadapter Buffermanager Qualcomm Open source Table : 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 | | | [Waylandsink](https://docs.qualcomm.com/doc/80-70022-50/topic/waylandsink.html) | | | Buffers | | ### Related information [Camera use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/camera.html) ## Video architecture Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html) The [v4l2h264enc](https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h264enc.html) and [v4l2h265enc](https://docs.qualcomm.com/doc/80-70022-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-70022-50/topic/v4l2h264dec.html) and [v4l2h265dec](https://docs.qualcomm.com/doc/80-70022-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-70022-50/topic/camera-and-video-encode.html). Figure : Video encode pipeline 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 Table : Video encode components | Components | Description | | --- | --- | | qtiqmmfsrc | Captures and provides several video streams in parallel. For more
information about the camera service, see [Camera architecture](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html#camera). | | Video encode plugins | Uses the V4L2 driver and APIs to encode the video stream. | | 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. Figure : Video decode pipeline GST BIN Filesrc Stream demux Video decode Waylandsink V4l2 driver DRM/KMS Weston DRM libdrm Open source For video decode use cases, see [Video playback use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/video-playback-use-cases.html). Table : 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. | | 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 Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html) For audio capture and playback, use the [pulsesrc](https://docs.qualcomm.com/doc/80-70022-50/topic/pulsesrc.html) and [pulsesink](https://docs.qualcomm.com/doc/80-70022-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. Figure : Audio capture pipeline GST BIN Pulsesrc PCM filesink ALSA PulseAudioserver Open source Table : 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). Figure : Audio playback pipeline GST BIN filesrc PCM Pulsesink ALSA PulseAudioserver Open source Table : Audio playback components | Component | Description | | --- | --- | | Pulsesink | | | PulseAudio server | | ### Encode You can encode the audio using an open-source audio encoder plugin. Figure : Audio encoding pipeline GST BIN Pulsesrc Audio encode Parse FileMux(MP4 or MPEGTS) ALSA PulseAudioserver Softwareencoding Open source Table : 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. Figure : Audio decode pipeline GST BIN filesrc Stream demux Audio decode Pulsesink Softwareencoding ALSA PulseAudioserver Open source Table : 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 Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html) 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. Figure : ML pipeline 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 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. Table : ML pipeline processing stages | Process | Description | | --- | --- | | Source | | | Preprocessing | [qtimlvconverter](https://docs.qualcomm.com/doc/80-70022-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
plugins: | | 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-70022-50/topic/machine-learning-use-cases.html) Last Published: Feb 20, 2026 [Previous Topic Qualcomm GStreamer architecture and plugins](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/gst-plugin-architecture.md) [Next Topic Configure Qualcomm GStreamer plugins](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/qim-sdk-plugins.md)