Overview
Theqtisocketsink is a GStreamer sink element that transmits GstBuffers between processes over UNIX domain sockets. It is designed for zero-copy buffer sharing between tightly coupled components, such as a media pipeline and an AI inference engine running in a separate process or container.
The element sends FD-backed buffers, such as DMA buffers, to a receiving process that uses qtisocketsrc as first element in pipeline to receive FD-backed buffers. This avoids memory copies, reduces CPU overhead, and improves overall performance.
To use qtisocketsink, provide a valid UNIX socket path through the socket property. The socket file must use the .sock extension. Buffer lifetime is managed through reference counting mechanism when buffers are sent and returned back.
Supported buffer types include:
video/x-rawfor raw video framesneural-network/tensorsfor ML tensor datatext/x-rawfor textual or structured metadata
qtisocketsink is well suited for modular and containerized pipelines where capture, transform, inference, encoding, or visualization run in separate processes. Common use cases include:
- Sending raw camera or decode video frames from capture pipeline running in separate process to another process for encoding/ live streaming, live display, or AI inference.
- Sending AI tensor data
neural-network/tensorsbetween the pipelines running in separate processes. - Streaming AI metadata, such as bounding boxes, using
text/x-raw
qtisocketsink enables the transmission of buffers from a camera source qticamsrc, to a separate process or container, where qtisocketsrc receives the buffers for subsequent processing, including encoding, muxing, or storage. This architecture facilitates a modular pipeline design, supports containerized deployment, and enables efficient zero-copy buffer sharing.

Hierarchy
GObjectGstObject
GstElement
GstBaseSink
qtisocketsink
Pad Templates
sink
| Capabilities || Capabilities | |
|---|---|
video/x-raw | format: NA |
text/x-raw | format: NA |
neural-network/tensors | format: NA |
| Availability: Always | |
| Direction: sink |
Element Properties
| Property | Description |
|---|---|
socket | Location of the Unix Domain Socket.Type: StringDefault: NULLFlags: readable/writable (changeable only in NULL or READY state) |
Example Pipeline

Download Required Files
| File | Download | Save as |
|---|---|---|
| Sample video | Input video | video.mp4 |
Internal Architecture Details
Core Components
Sink Pad
ReceivesGstBuffer objects from upstream pipeline elements.
Socket Manager
Establishes and manages a UNIX domain socket connection to the consumer process.Transfers buffer file descriptors over the socket.
Buffer Tracker
Tracks buffer ownership and reference counts after transmission.Prevents buffer release until the receiving process returns ownership.
Timing Controller
Applies timing-based drop decisions using max-lateness.Throttles outgoing data rate using max-bitrate.
Async Transition Handler
Whenasync=false, the element completes the transition to PAUSED synchronously instead of asynchronously.
Data Flow
Buffer reception
Buffers are received on the sink pad from upstream elements. To be transferable over a UNIX domain socket, buffers must be backed by a valid file descriptor, such as DMA-backed memory.Socket Transmission
For each eligible buffer, the element sends the associated file descriptor to the receiver process over the UNIX domain socket. Any required metadata is transmitted either together with the file descriptor or through a separate channel, depending on implementation.Buffer Reference Count Management
When a buffer is sent to the receiver, the plugin increments its internal reference tracking. Once the receiver returns the buffer, the plugin decrements the corresponding reference count. A buffer is released only after all outstanding references have been returned.Timing and Drop Control
Ifasync=false, the element performs a synchronous state transition to PAUSED.
max-lateness defines the maximum allowed delay for a buffer relative to its expected presentation time. Buffers exceeding this threshold are dropped.
max-bitrate limits the transmission rate by capping the total number of bits sent per second.
Usage
Ensure you have followed the prerequisites before continuing
Encode raw frames in a secondary process to a file
This example demonstrates a camera pipeline executing in one process and transferring raw frames to a second process, which receives the frames, performs encoding, and muxes the resulting stream into an output file.
Render raw frames from a secondary process to display
This example demonstrates a camera pipeline executing in one process and transferring raw frames to a second process, which receives the frames, performs AI inference, Overlay and rendering the composed out to a display.
