VideoOverlayRectangle

An opaque video overlay rectangle object. A rectangle contains a single overlay rectangle which can be added to a composition.

Members

Functions

copy
gstvideo.video_overlay_rectangle.VideoOverlayRectangle copy()

Makes a copy of rectangle, so that it is possible to modify it (e.g. to change the render co-ordinates or render dimension). The actual overlay pixel data buffers contained in the rectangle are not copied.

getFlags
gstvideo.types.VideoOverlayFormatFlags getFlags()

Retrieves the flags associated with a #GstVideoOverlayRectangle. This is useful if the caller can handle both premultiplied alpha and non premultiplied alpha, for example. By knowing whether the rectangle uses premultiplied or not, it can request the pixel data in the format it is stored in, to avoid unnecessary conversion.

getGlobalAlpha
float getGlobalAlpha()

Retrieves the global-alpha value associated with a #GstVideoOverlayRectangle.

getPixelsArgb
gst.buffer.Buffer getPixelsArgb(gstvideo.types.VideoOverlayFormatFlags flags)
getPixelsAyuv
gst.buffer.Buffer getPixelsAyuv(gstvideo.types.VideoOverlayFormatFlags flags)
getPixelsRaw
gst.buffer.Buffer getPixelsRaw(gstvideo.types.VideoOverlayFormatFlags flags)
getPixelsUnscaledArgb
gst.buffer.Buffer getPixelsUnscaledArgb(gstvideo.types.VideoOverlayFormatFlags flags)

Retrieves the pixel data as it is. This is useful if the caller can do the scaling itself when handling the overlaying. The rectangle will need to be scaled to the render dimensions, which can be retrieved using gstvideo.video_overlay_rectangle.VideoOverlayRectangle.getRenderRectangle.

getPixelsUnscaledAyuv
gst.buffer.Buffer getPixelsUnscaledAyuv(gstvideo.types.VideoOverlayFormatFlags flags)

Retrieves the pixel data as it is. This is useful if the caller can do the scaling itself when handling the overlaying. The rectangle will need to be scaled to the render dimensions, which can be retrieved using gstvideo.video_overlay_rectangle.VideoOverlayRectangle.getRenderRectangle.

getPixelsUnscaledRaw
gst.buffer.Buffer getPixelsUnscaledRaw(gstvideo.types.VideoOverlayFormatFlags flags)

Retrieves the pixel data as it is. This is useful if the caller can do the scaling itself when handling the overlaying. The rectangle will need to be scaled to the render dimensions, which can be retrieved using gstvideo.video_overlay_rectangle.VideoOverlayRectangle.getRenderRectangle.

getRenderRectangle
bool getRenderRectangle(int renderX, int renderY, uint renderWidth, uint renderHeight)

Retrieves the render position and render dimension of the overlay rectangle on the video.

getSeqnum
uint getSeqnum()

Returns the sequence number of this rectangle. Sequence numbers are monotonically increasing and unique for overlay compositions and rectangles (meaning there will never be a rectangle with the same sequence number as a composition).

setGlobalAlpha
void setGlobalAlpha(float globalAlpha)

Sets the global alpha value associated with a #GstVideoOverlayRectangle. Per- pixel alpha values are multiplied with this value. Valid values: 0 <= global_alpha <= 1; 1 to deactivate.

setRenderRectangle
void setRenderRectangle(int renderX, int renderY, uint renderWidth, uint renderHeight)

Sets the render position and dimensions of the rectangle on the video. This function is mainly for elements that modify the size of the video in some way (e.g. through scaling or cropping) and need to adjust the details of any overlays to match the operation that changed the size.

Static functions

newRaw
gstvideo.video_overlay_rectangle.VideoOverlayRectangle newRaw(gst.buffer.Buffer pixels, int renderX, int renderY, uint renderWidth, uint renderHeight, gstvideo.types.VideoOverlayFormatFlags flags)

Creates a new video overlay rectangle with ARGB or AYUV pixel data. The layout in case of ARGB of the components in memory is B-G-R-A on little-endian platforms (corresponding to #GST_VIDEO_FORMAT_BGRA) and A-R-G-B on big-endian platforms (corresponding to #GST_VIDEO_FORMAT_ARGB). In other words, pixels are treated as 32-bit words and the lowest 8 bits then contain the blue component value and the highest 8 bits contain the alpha component value. Unless specified in the flags, the RGB values are non-premultiplied. This is the format that is used by most hardware, and also many rendering libraries such as Cairo, for example. The pixel data buffer must have #GstVideoMeta set.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.