# qtivsplit
Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/qtivsplit.html](https://docs.qualcomm.com/doc/80-70020-50/topic/qtivsplit.html)
The qtivsplit plugin uses the GPU hardware to split a single input video stream into
multiple output streams. The number of streams is a user-defined variable and is equal to
the number of source pads.
The mode property for each source pad determines the method for splitting the incoming
stream.
Table : Operational mode properties of qtivsplit
| Operational mode | Description |
| :--- | :--- |
| none |
The incoming video frames on the sink pad are duplicated on each of the source pads.
More color conversion and upscale/downscale are applied based on the negotiated GstCaps on that pad.
Ensure that when the source pads are created, their number is equal to the maximum expected count of GstVideoRegionOfInterestMeta inside a single GstBuffer.
If their source pads are fewer, the ROI meta that doesn't have a corresponding pad is ignored.
|
| batch-roi-meta | Operates the [GstVideoRegionOfInterestMeta](https://gstreamer.freedesktop.org/documentation/video/gstvideometa.html#GstVideoRegionOfInterestMeta) entries attached to the buffer but instead of sending one such entry, it sends all the meta entries on the pads in that mode as separate buffers. |
Each meta entry in the [GstBuffer](https://gstreamer.freedesktop.org/documentation/gstreamer/gstbuffer.html#GstBuffer) is sent to its corresponding source
pad based on the ID and crop, upscale/downscale, and color conversion is performed to
match the negotiated [GstCaps](https://gstreamer.freedesktop.org/documentation/gstreamer/gstcaps.html). The source pads with no corresponding
ROI meta produce GAP buffers.
The plugin uses the Qualcomm IB2C library or Qualcomm Computer Vision SDK for all the
transformation operations.
- The Qualcomm IB2C library is wrapped in the custom GstC2dVideoConverter or
GstGlesVideoConverter abstraction layer.
- It includes APIs to create, configure, and process the incoming and outgoing
buffers.
## Buffer management
Figure : GStreamer pipeline with qtivsplit
Figure : qtivsplit buffer management
The GstImageBufferPool custom buffer pool class allocates either GBM or ION output
buffers depending on the negotiated capabilities between GstImageBufferPool and
downstream plugins.
- The GBM allocation is done using Qualcomm libgbm.
- The ION allocation is done using the IOCTL commands to the kernel.
## Inheritance chain
[GObject](https://docs.gtk.org/gobject/) → [GstObject](https://gstreamer.freedesktop.org/documentation/gstreamer/gstobject.html?gi-language=c) → [GstElement](https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c) → GstVideoSplit
The following tables provide information on pad templates and element properties of
qtivsplit. For use cases, see the following:
- For use case on splitting video into several streams, see [Video split use cases](https://docs.qualcomm.com/doc/80-70020-50/topic/video-split-use-cases.html).
- For use case on dynamic cropping, see [Daisy chain detection and classification](https://docs.qualcomm.com/doc/80-70020-50/topic/daisy-chain-detection-and-classification.html).
## Pad configuration
| Pad Name | Capabilities | Capabilities | Capabilities |
| --- | --- | --- | --- |
| SINK template: 'sink'
flags: readable, writable, changeable only in NULL or READY state
Enum "GstVideoSplitMode" Default: 0, "none"
(0): none - Incoming buffer is rescaled and color converted to match the negotiated pad caps. If the input and output caps match, then the input buffer is moved to the output and its reference count increased.
(1): force-transform - Incoming buffer is rescaled and color converted to match the negotiated pad caps. A new buffer is created even if the negotiated input and output caps match.
(2): single-roi-meta - Incoming buffer is checked for ROI meta. If there is a meta entry that corresponds to this pad, the crop, rescale and color conversion operations are performed on the input buffer. The transformed buffer is sent to the next plugin. A pad with no corresponding ROI meta creates a GAP buffer.
(3): batch-roi-meta - Incoming buffer is checked for ROI meta. For each meta entry a crop, rescaling and color conversion are done on the input buffer. This, for each ROI meta entry, a buffer is produced and sent to the next plugin downstream. In case ROI meta isn't present, the pad creates a GAP buffer.
|
## Element configuration
Table : Element properties of qtivsplit
| Property | Description |
| --- | --- |
| name | The name of the object.
flags: readable, writable
String. Default: "videosplit0"
|
| parent | The parent of the object.
flags: readable, writable
Object of type "GstObject"
|
| engine | Engine backend used for the conversion operations.