VideoOverlayRectangle.newRaw

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.

Parameters

pixels gst.buffer.Buffer

a #GstBuffer pointing to the pixel memory

renderX int

the X co-ordinate on the video where the top-left corner of this overlay rectangle should be rendered to

renderY int

the Y co-ordinate on the video where the top-left corner of this overlay rectangle should be rendered to

renderWidth uint

the render width of this rectangle on the video

renderHeight uint

the render height of this rectangle on the video

flags gstvideo.types.VideoOverlayFormatFlags

flags

Return Value

Type: gstvideo.video_overlay_rectangle.VideoOverlayRectangle

a new #GstVideoOverlayRectangle. Unref with gst_video_overlay_rectangle_unref() when no longer needed.