qtivtransform

This GStreamer plugin has the capability to resize, flip, rotate, and color covert incoming YUV or RGB video frames.

The main class of the plugin is called GstVideoTransform and it is responsible for capability negotiations between this plugin and any other plugin connected to it, as well as allocating output buffers which will contain the transformed video frame. For video frame transformation the C2D library, exposed by the Adreno, is used. This library is wrapped inside the GstC2dVideoConverter class and few API’s are defined for creating, configuring and processing incoming and outgoing buffers.

The output buffers are allocated by a buffer pool class called GstImageBufferPool. This pool can allocate either GBM or ION buffers depending on the negotiated capabilities between the plugins. GBM allocation is done via the libgbm while for ION allocation IOCTL commands to the kernel are utilized.

When a frame is received into the main class it will try to get a free output buffer from the pool and if such is not available it will be allocated. Then both the input and output buffers are given to the GstC2dVideoConverter for processing. When processing is done the input buffer is dereferenced while the output buffer is sent to the next plugin in the pipeline.

Pad templates

sink (input)

video/x-raw
format: { (string)BGRA, (string)RGBA, (string)BGR, (string)RGB, (string)NV12, (string)NV21 }
width: [ 1, 32767 ]
height: [ 1, 32767 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw(ANY)
format: { (string)BGRA, (string)RGBA, (string)BGR, (string)RGB, (string)NV12, (string)NV21 }
width: [ 1, 32767 ]
height: [ 1, 32767 ]
framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsink

source (output)

video/x-raw
format: { (string)BGRA, (string)RGBA, (string)BGR, (string)RGB, (string)NV12, (string)NV21 }
width: [ 1, 32767 ]
height: [ 1, 32767 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw(ANY)
format: { (string)BGRA, (string)RGBA, (string)BGR, (string)RGB, (string)NV12, (string)NV21 }
width: [ 1, 32767 ]
height: [ 1, 32767 ]
framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsrc

Properties

name

The name of the object.

type: String
access: read/write
default: "qtivtransform0"

qos

Handle Quality-of-Service events.

type: Boolean
access: read/write
default: false

flip-horizontal

Flip video image horizontally.

type: Boolean
access: read/write
default: false

flip-vertical

Flip video image vertically.

type: Boolean
access: read/write
default: false

rotate

Rotate video image.

type: Enum "GstVideoTransformRotate"
access: read/write
(0): none - No rotation
(1): 90CW - Rotate 90 degrees clockwise
(2): 90CCW - Rotate 90 degrees counter-clockwise
(3): 180 - Rotate 180 degrees
default: 0, "none"

crop-x

Pixels to crop starting from X axis coordinate.

type: Unsigned Integer
access: read/write
default: 0

crop-y

Pixels to crop starting from Y axis coordinate.

type: Unsigned Integer
access: read/write
default: 0

crop-width

Width of the crop rectangle.

type: Unsigned Integer
access: read/write
default: 0

crop-height

Height of the crop rectangle.

type: Unsigned Integer
access: read/write
default: 0