# GstVideoOverlayRectangle

Functions to create and handle overlay compositions on video buffers.

An overlay composition describes one or more overlay rectangles to be blended on top of a video buffer.

This API serves two main purposes:

- it can be used to attach overlay information (subtitles or logos) to non-raw video buffers such as GL/VAAPI/VDPAU surfaces. The actual blending of the overlay can then be done by e.g. the video sink that processes these non-raw buffers.

- it can also be used to blend overlay rectangles on top of raw video buffers, thus consolidating blending functionality for raw video in one place.

Together, this allows existing overlay elements to easily handle raw and non-raw video as input in without major changes (once the overlays have been put into a GstVideoOverlayComposition object anyway) - for raw video the overlay can just use the blending function to blend the data on top of the video, and for surface buffers it can just attach them to the buffer and let the sink render the overlays.

## GstVideoOverlayComposition

An opaque video overlay composition object. A composition contains multiple overlay rectangles.

## GstVideo.VideoOverlayComposition

An opaque video overlay composition object. A composition contains multiple overlay rectangles.

## GstVideo.VideoOverlayComposition

An opaque video overlay composition object. A composition contains multiple overlay rectangles.

### Constructors

#### gst_video_overlay_composition_new

    GstVideoOverlayComposition *
    gst_video_overlay_composition_new (GstVideoOverlayRectangle * rectangle)

Creates a new video overlay composition object to hold one or more overlay rectangles.

Parameters:

`rectangle` ( [transfer: none]) –

a GstVideoOverlayRectangle to add to the composition

Returns ( [transfer: full]) –

a new GstVideoOverlayComposition. Unref with gst_video_overlay_composition_unref when no longer needed.

#### GstVideo.VideoOverlayComposition.prototype.new

    function GstVideo.VideoOverlayComposition.prototype.new(rectangle: GstVideo.VideoOverlayRectangle): {
        // javascript wrapper for 'gst_video_overlay_composition_new'
    }

Creates a new video overlay composition object to hold one or more overlay rectangles.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle to add to the composition

Returns (GstVideo.VideoOverlayComposition) –

a new GstVideo.VideoOverlayComposition. Unref with gst_video_overlay_composition_unref (not introspectable) when no longer needed.

#### GstVideo.VideoOverlayComposition.new

    def GstVideo.VideoOverlayComposition.new (rectangle):
        #python wrapper for 'gst_video_overlay_composition_new'

Creates a new video overlay composition object to hold one or more overlay rectangles.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle to add to the composition

Returns (GstVideo.VideoOverlayComposition) –

a new GstVideo.VideoOverlayComposition. Unref with gst_video_overlay_composition_unref (not introspectable) when no longer needed.

### Methods

#### gst_video_overlay_composition_add_rectangle

    gst_video_overlay_composition_add_rectangle (GstVideoOverlayComposition * comp,
                                                 GstVideoOverlayRectangle * rectangle)

Adds an overlay rectangle to an existing overlay composition object. This must be done right after creating the overlay composition.

Parameters:

`comp` –

a GstVideoOverlayComposition

`rectangle` ( [transfer: none]) –

a GstVideoOverlayRectangle to add to the composition

#### GstVideo.VideoOverlayComposition.prototype.add_rectangle

    function GstVideo.VideoOverlayComposition.prototype.add_rectangle(rectangle: GstVideo.VideoOverlayRectangle): {
        // javascript wrapper for 'gst_video_overlay_composition_add_rectangle'
    }

Adds an overlay rectangle to an existing overlay composition object. This must be done right after creating the overlay composition.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle to add to the composition

#### GstVideo.VideoOverlayComposition.add_rectangle

    def GstVideo.VideoOverlayComposition.add_rectangle (self, rectangle):
        #python wrapper for 'gst_video_overlay_composition_add_rectangle'

Adds an overlay rectangle to an existing overlay composition object. This must be done right after creating the overlay composition.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle to add to the composition

#### gst_video_overlay_composition_blend

    gboolean
    gst_video_overlay_composition_blend (GstVideoOverlayComposition * comp,
                                         GstVideoFrame * video_buf)

Blends the overlay rectangles in comp on top of the raw video data contained in video_buf. The data in video_buf must be writable and mapped appropriately.

Since video_buf data is read and will be modified, it ought be mapped with flag GST_MAP_READWRITE.

Parameters:

`comp` –

a GstVideoOverlayComposition

`video_buf` –

a GstVideoFrame containing raw video data in a supported format. It should be mapped using GST_MAP_READWRITE

Returns –
No description available

#### GstVideo.VideoOverlayComposition.prototype.blend

    function GstVideo.VideoOverlayComposition.prototype.blend(video_buf: GstVideo.VideoFrame): {
        // javascript wrapper for 'gst_video_overlay_composition_blend'
    }

Blends the overlay rectangles in comp on top of the raw video data contained in video_buf. The data in video_buf must be writable and mapped appropriately.

Since video_buf data is read and will be modified, it ought be mapped with flag GST_MAP_READWRITE.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

`video_buf` (GstVideo.VideoFrame) –

a GstVideo.VideoFrame containing raw video data in a supported format. It should be mapped using GST_MAP_READWRITE

Returns (Number) –
No description available

#### GstVideo.VideoOverlayComposition.blend

    def GstVideo.VideoOverlayComposition.blend (self, video_buf):
        #python wrapper for 'gst_video_overlay_composition_blend'

Blends the overlay rectangles in comp on top of the raw video data contained in video_buf. The data in video_buf must be writable and mapped appropriately.

Since video_buf data is read and will be modified, it ought be mapped with flag GST_MAP_READWRITE.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

`video_buf` (GstVideo.VideoFrame) –

a GstVideo.VideoFrame containing raw video data in a supported format. It should be mapped using GST_MAP_READWRITE

Returns (bool) –
No description available

#### gst_video_overlay_composition_copy

    GstVideoOverlayComposition *
    gst_video_overlay_composition_copy (GstVideoOverlayComposition * comp)

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

Parameters:

`comp` ( [transfer: none]) –

a GstVideoOverlayComposition to copy

Returns ( [transfer: full]) –

a new GstVideoOverlayComposition equivalent to comp.

#### GstVideo.VideoOverlayComposition.prototype.copy

    function GstVideo.VideoOverlayComposition.prototype.copy(): {
        // javascript wrapper for 'gst_video_overlay_composition_copy'
    }

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

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition to copy

Returns (GstVideo.VideoOverlayComposition) –

a new GstVideo.VideoOverlayComposition equivalent to comp.

#### GstVideo.VideoOverlayComposition.copy

    def GstVideo.VideoOverlayComposition.copy (self):
        #python wrapper for 'gst_video_overlay_composition_copy'

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

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition to copy

Returns (GstVideo.VideoOverlayComposition) –

a new GstVideo.VideoOverlayComposition equivalent to comp.

#### gst_video_overlay_composition_get_rectangle

    GstVideoOverlayRectangle *
    gst_video_overlay_composition_get_rectangle (GstVideoOverlayComposition * comp,
                                                 guint n)

Returns the n-th GstVideoOverlayRectangle contained in comp.

Parameters:

`comp` –

a GstVideoOverlayComposition

`n` –

number of the rectangle to get

Returns ( [transfer: none]) –

the n-th rectangle, or NULL if n is out of bounds. Will not return a new reference, the caller will need to obtain her own reference using gst_video_overlay_rectangle_ref if needed.

#### GstVideo.VideoOverlayComposition.prototype.get_rectangle

    function GstVideo.VideoOverlayComposition.prototype.get_rectangle(n: Number): {
        // javascript wrapper for 'gst_video_overlay_composition_get_rectangle'
    }

Returns the n-th GstVideo.VideoOverlayRectangle contained in comp.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

`n` (Number) –

number of the rectangle to get

Returns (GstVideo.VideoOverlayRectangle) –

the n-th rectangle, or NULL if n is out of bounds. Will not return a new reference, the caller will need to obtain her own reference using gst_video_overlay_rectangle_ref (not introspectable) if needed.

#### GstVideo.VideoOverlayComposition.get_rectangle

    def GstVideo.VideoOverlayComposition.get_rectangle (self, n):
        #python wrapper for 'gst_video_overlay_composition_get_rectangle'

Returns the n-th GstVideo.VideoOverlayRectangle contained in comp.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

`n` (int) –

number of the rectangle to get

Returns (GstVideo.VideoOverlayRectangle) –

the n-th rectangle, or NULL if n is out of bounds. Will not return a new reference, the caller will need to obtain her own reference using gst_video_overlay_rectangle_ref (not introspectable) if needed.

#### gst_video_overlay_composition_get_seqnum

    guint
    gst_video_overlay_composition_get_seqnum (GstVideoOverlayComposition * comp)

Returns the sequence number of this composition. 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).

Parameters:

`comp` –

a GstVideoOverlayComposition

Returns –

the sequence number of comp

#### GstVideo.VideoOverlayComposition.prototype.get_seqnum

    function GstVideo.VideoOverlayComposition.prototype.get_seqnum(): {
        // javascript wrapper for 'gst_video_overlay_composition_get_seqnum'
    }

Returns the sequence number of this composition. 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).

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

Returns (Number) –

the sequence number of comp

#### GstVideo.VideoOverlayComposition.get_seqnum

    def GstVideo.VideoOverlayComposition.get_seqnum (self):
        #python wrapper for 'gst_video_overlay_composition_get_seqnum'

Returns the sequence number of this composition. 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).

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

Returns (int) –

the sequence number of comp

#### gst_video_overlay_composition_make_writable

    GstVideoOverlayComposition *
    gst_video_overlay_composition_make_writable (GstVideoOverlayComposition * comp)

Takes ownership of comp and returns a version of comp that is writable (i.e. can be modified). Will either return comp right away, or create a new writable copy of comp and unref comp itself. All the contained rectangles will also be copied, but the actual overlay pixel data buffers contained in the rectangles are not copied.

Parameters:

`comp` ( [transfer: full]) –

a GstVideoOverlayComposition to copy

Returns ( [transfer: full]) –

a writable GstVideoOverlayComposition equivalent to comp.

#### GstVideo.VideoOverlayComposition.prototype.make_writable

    function GstVideo.VideoOverlayComposition.prototype.make_writable(): {
        // javascript wrapper for 'gst_video_overlay_composition_make_writable'
    }

Takes ownership of comp and returns a version of comp that is writable (i.e. can be modified). Will either return comp right away, or create a new writable copy of comp and unref comp itself. All the contained rectangles will also be copied, but the actual overlay pixel data buffers contained in the rectangles are not copied.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition to copy

Returns (GstVideo.VideoOverlayComposition) –

a writable GstVideo.VideoOverlayComposition equivalent to comp.

#### GstVideo.VideoOverlayComposition.make_writable

    def GstVideo.VideoOverlayComposition.make_writable (self):
        #python wrapper for 'gst_video_overlay_composition_make_writable'

Takes ownership of comp and returns a version of comp that is writable (i.e. can be modified). Will either return comp right away, or create a new writable copy of comp and unref comp itself. All the contained rectangles will also be copied, but the actual overlay pixel data buffers contained in the rectangles are not copied.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition to copy

Returns (GstVideo.VideoOverlayComposition) –

a writable GstVideo.VideoOverlayComposition equivalent to comp.

#### gst_video_overlay_composition_n_rectangles

    guint
    gst_video_overlay_composition_n_rectangles (GstVideoOverlayComposition * comp)

Returns the number of GstVideoOverlayRectangles contained in comp.

Parameters:

`comp` –

a GstVideoOverlayComposition

Returns –

the number of rectangles

#### GstVideo.VideoOverlayComposition.prototype.n_rectangles

    function GstVideo.VideoOverlayComposition.prototype.n_rectangles(): {
        // javascript wrapper for 'gst_video_overlay_composition_n_rectangles'
    }

Returns the number of GstVideo.VideoOverlayRectangles contained in comp.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

Returns (Number) –

the number of rectangles

#### GstVideo.VideoOverlayComposition.n_rectangles

    def GstVideo.VideoOverlayComposition.n_rectangles (self):
        #python wrapper for 'gst_video_overlay_composition_n_rectangles'

Returns the number of GstVideo.VideoOverlayRectangles contained in comp.

Parameters:

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

Returns (int) –

the number of rectangles

## GstVideoOverlayCompositionMeta

Extra buffer metadata describing image overlay data.

### Members

`meta` (GstMeta) –

parent GstMeta

`overlay` (GstVideoOverlayComposition *) –

the attached GstVideoOverlayComposition

## GstVideo.VideoOverlayCompositionMeta

Extra buffer metadata describing image overlay data.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`overlay` (GstVideo.VideoOverlayComposition) –

the attached GstVideo.VideoOverlayComposition

## GstVideo.VideoOverlayCompositionMeta

Extra buffer metadata describing image overlay data.

### Members

`meta` (Gst.Meta) –

parent Gst.Meta

`overlay` (GstVideo.VideoOverlayComposition) –

the attached GstVideo.VideoOverlayComposition

### Functions

#### gst_video_overlay_composition_meta_get_info

    const GstMetaInfo *
    gst_video_overlay_composition_meta_get_info ()

Returns –
No description available

#### GstVideo.prototype.video_overlay_composition_meta_get_info

    function GstVideo.prototype.video_overlay_composition_meta_get_info(): {
        // javascript wrapper for 'gst_video_overlay_composition_meta_get_info'
    }

Returns (Gst.MetaInfo) –
No description available

#### GstVideo.video_overlay_composition_meta_get_info

    def GstVideo.video_overlay_composition_meta_get_info ():
        #python wrapper for 'gst_video_overlay_composition_meta_get_info'

Returns (Gst.MetaInfo) –
No description available

## GstVideoOverlayRectangle

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

## GstVideo.VideoOverlayRectangle

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

## GstVideo.VideoOverlayRectangle

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

### Constructors

#### gst_video_overlay_rectangle_new_raw

    GstVideoOverlayRectangle *
    gst_video_overlay_rectangle_new_raw (GstBuffer * pixels,
                                         gint render_x,
                                         gint render_y,
                                         guint render_width,
                                         guint render_height,
                                         GstVideoOverlayFormatFlags 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.

Parameters:

`pixels` ( [transfer: none]) –

a GstBuffer pointing to the pixel memory

`render_x` –

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

`render_y` –

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

`render_width` –

the render width of this rectangle on the video

`render_height` –

the render height of this rectangle on the video

`flags` –

flags

Returns ( [transfer: full]) –

a new GstVideoOverlayRectangle. Unref with gst_video_overlay_rectangle_unref when no longer needed.

#### GstVideo.VideoOverlayRectangle.prototype.new_raw

    function GstVideo.VideoOverlayRectangle.prototype.new_raw(pixels: Gst.Buffer, render_x: Number, render_y: Number, render_width: Number, render_height: Number, flags: GstVideo.VideoOverlayFormatFlags): {
        // javascript wrapper for 'gst_video_overlay_rectangle_new_raw'
    }

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 GstVideo.VideoFormat.BGRA) and A-R-G-B on big-endian platforms (corresponding to GstVideo.VideoFormat.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 GstVideo.VideoMeta set.

Parameters:

`pixels` (Gst.Buffer) –

a Gst.Buffer pointing to the pixel memory

`render_x` (Number) –

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

`render_y` (Number) –

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

`render_width` (Number) –

the render width of this rectangle on the video

`render_height` (Number) –

the render height of this rectangle on the video

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags

Returns (GstVideo.VideoOverlayRectangle) –

a new GstVideo.VideoOverlayRectangle. Unref with gst_video_overlay_rectangle_unref (not introspectable) when no longer needed.

#### GstVideo.VideoOverlayRectangle.new_raw

    def GstVideo.VideoOverlayRectangle.new_raw (pixels, render_x, render_y, render_width, render_height, flags):
        #python wrapper for 'gst_video_overlay_rectangle_new_raw'

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 GstVideo.VideoFormat.BGRA) and A-R-G-B on big-endian platforms (corresponding to GstVideo.VideoFormat.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 GstVideo.VideoMeta set.

Parameters:

`pixels` (Gst.Buffer) –

a Gst.Buffer pointing to the pixel memory

`render_x` (int) –

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

`render_y` (int) –

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

`render_width` (int) –

the render width of this rectangle on the video

`render_height` (int) –

the render height of this rectangle on the video

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags

Returns (GstVideo.VideoOverlayRectangle) –

a new GstVideo.VideoOverlayRectangle. Unref with gst_video_overlay_rectangle_unref (not introspectable) when no longer needed.

### Methods

#### gst_video_overlay_rectangle_copy

    GstVideoOverlayRectangle *
    gst_video_overlay_rectangle_copy (GstVideoOverlayRectangle * rectangle)

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.

Parameters:

`rectangle` ( [transfer: none]) –

a GstVideoOverlayRectangle to copy

Returns ( [transfer: full]) –

a new GstVideoOverlayRectangle equivalent to rectangle.

#### GstVideo.VideoOverlayRectangle.prototype.copy

    function GstVideo.VideoOverlayRectangle.prototype.copy(): {
        // javascript wrapper for 'gst_video_overlay_rectangle_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.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle to copy

Returns (GstVideo.VideoOverlayRectangle) –

a new GstVideo.VideoOverlayRectangle equivalent to rectangle.

#### GstVideo.VideoOverlayRectangle.copy

    def GstVideo.VideoOverlayRectangle.copy (self):
        #python wrapper for 'gst_video_overlay_rectangle_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.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle to copy

Returns (GstVideo.VideoOverlayRectangle) –

a new GstVideo.VideoOverlayRectangle equivalent to rectangle.

#### gst_video_overlay_rectangle_get_flags

    GstVideoOverlayFormatFlags
    gst_video_overlay_rectangle_get_flags (GstVideoOverlayRectangle * rectangle)

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.

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

Returns –

the GstVideoOverlayFormatFlags associated with the rectangle.

#### GstVideo.VideoOverlayRectangle.prototype.get_flags

    function GstVideo.VideoOverlayRectangle.prototype.get_flags(): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_flags'
    }

Retrieves the flags associated with a GstVideo.VideoOverlayRectangle. 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.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

Returns (GstVideo.VideoOverlayFormatFlags) –

the GstVideo.VideoOverlayFormatFlags associated with the rectangle.

#### GstVideo.VideoOverlayRectangle.get_flags

    def GstVideo.VideoOverlayRectangle.get_flags (self):
        #python wrapper for 'gst_video_overlay_rectangle_get_flags'

Retrieves the flags associated with a GstVideo.VideoOverlayRectangle. 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.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

Returns (GstVideo.VideoOverlayFormatFlags) –

the GstVideo.VideoOverlayFormatFlags associated with the rectangle.

#### gst_video_overlay_rectangle_get_global_alpha

    gfloat
    gst_video_overlay_rectangle_get_global_alpha (GstVideoOverlayRectangle * rectangle)

Retrieves the global-alpha value associated with a GstVideoOverlayRectangle.

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

Returns –

the global-alpha value associated with the rectangle.

#### GstVideo.VideoOverlayRectangle.prototype.get_global_alpha

    function GstVideo.VideoOverlayRectangle.prototype.get_global_alpha(): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_global_alpha'
    }

Retrieves the global-alpha value associated with a GstVideo.VideoOverlayRectangle.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

Returns (Number) –

the global-alpha value associated with the rectangle.

#### GstVideo.VideoOverlayRectangle.get_global_alpha

    def GstVideo.VideoOverlayRectangle.get_global_alpha (self):
        #python wrapper for 'gst_video_overlay_rectangle_get_global_alpha'

Retrieves the global-alpha value associated with a GstVideo.VideoOverlayRectangle.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

Returns (float) –

the global-alpha value associated with the rectangle.

#### gst_video_overlay_rectangle_get_pixels_argb

    GstBuffer *
    gst_video_overlay_rectangle_get_pixels_argb (GstVideoOverlayRectangle * rectangle,
                                                 GstVideoOverlayFormatFlags flags)

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`flags` –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns ( [transfer: none]) –

a GstBuffer holding the ARGB pixel data with width and height of the render dimensions as per gst_video_overlay_rectangle_get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref if needed.

#### GstVideo.VideoOverlayRectangle.prototype.get_pixels_argb

    function GstVideo.VideoOverlayRectangle.prototype.get_pixels_argb(flags: GstVideo.VideoOverlayFormatFlags): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_pixels_argb'
    }

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the ARGB pixel data with width and height of the render dimensions as per GstVideo.VideoOverlayRectangle.prototype.get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### GstVideo.VideoOverlayRectangle.get_pixels_argb

    def GstVideo.VideoOverlayRectangle.get_pixels_argb (self, flags):
        #python wrapper for 'gst_video_overlay_rectangle_get_pixels_argb'

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the ARGB pixel data with width and height of the render dimensions as per GstVideo.VideoOverlayRectangle.get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### gst_video_overlay_rectangle_get_pixels_ayuv

    GstBuffer *
    gst_video_overlay_rectangle_get_pixels_ayuv (GstVideoOverlayRectangle * rectangle,
                                                 GstVideoOverlayFormatFlags flags)

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`flags` –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns ( [transfer: none]) –

a GstBuffer holding the AYUV pixel data with width and height of the render dimensions as per gst_video_overlay_rectangle_get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref if needed.

#### GstVideo.VideoOverlayRectangle.prototype.get_pixels_ayuv

    function GstVideo.VideoOverlayRectangle.prototype.get_pixels_ayuv(flags: GstVideo.VideoOverlayFormatFlags): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_pixels_ayuv'
    }

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the AYUV pixel data with width and height of the render dimensions as per GstVideo.VideoOverlayRectangle.prototype.get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### GstVideo.VideoOverlayRectangle.get_pixels_ayuv

    def GstVideo.VideoOverlayRectangle.get_pixels_ayuv (self, flags):
        #python wrapper for 'gst_video_overlay_rectangle_get_pixels_ayuv'

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the AYUV pixel data with width and height of the render dimensions as per GstVideo.VideoOverlayRectangle.get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### gst_video_overlay_rectangle_get_pixels_raw

    GstBuffer *
    gst_video_overlay_rectangle_get_pixels_raw (GstVideoOverlayRectangle * rectangle,
                                                GstVideoOverlayFormatFlags flags)

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`flags` –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns ( [transfer: none]) –

a GstBuffer holding the pixel data with format as originally provided and specified in video meta with width and height of the render dimensions as per gst_video_overlay_rectangle_get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref if needed.

#### GstVideo.VideoOverlayRectangle.prototype.get_pixels_raw

    function GstVideo.VideoOverlayRectangle.prototype.get_pixels_raw(flags: GstVideo.VideoOverlayFormatFlags): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_pixels_raw'
    }

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the pixel data with format as originally provided and specified in video meta with width and height of the render dimensions as per GstVideo.VideoOverlayRectangle.prototype.get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### GstVideo.VideoOverlayRectangle.get_pixels_raw

    def GstVideo.VideoOverlayRectangle.get_pixels_raw (self, flags):
        #python wrapper for 'gst_video_overlay_rectangle_get_pixels_raw'

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the pixel data with format as originally provided and specified in video meta with width and height of the render dimensions as per GstVideo.VideoOverlayRectangle.get_render_rectangle. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### gst_video_overlay_rectangle_get_pixels_unscaled_argb

    GstBuffer *
    gst_video_overlay_rectangle_get_pixels_unscaled_argb (GstVideoOverlayRectangle * rectangle,
                                                          GstVideoOverlayFormatFlags 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 gst_video_overlay_rectangle_get_render_rectangle.

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`flags` –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns ( [transfer: none]) –

a GstBuffer holding the ARGB pixel data with GstVideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref if needed.

#### GstVideo.VideoOverlayRectangle.prototype.get_pixels_unscaled_argb

    function GstVideo.VideoOverlayRectangle.prototype.get_pixels_unscaled_argb(flags: GstVideo.VideoOverlayFormatFlags): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_pixels_unscaled_argb'
    }

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.VideoOverlayRectangle.prototype.get_render_rectangle.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the ARGB pixel data with GstVideo.VideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### GstVideo.VideoOverlayRectangle.get_pixels_unscaled_argb

    def GstVideo.VideoOverlayRectangle.get_pixels_unscaled_argb (self, flags):
        #python wrapper for 'gst_video_overlay_rectangle_get_pixels_unscaled_argb'

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.VideoOverlayRectangle.get_render_rectangle.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the ARGB pixel data with GstVideo.VideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### gst_video_overlay_rectangle_get_pixels_unscaled_ayuv

    GstBuffer *
    gst_video_overlay_rectangle_get_pixels_unscaled_ayuv (GstVideoOverlayRectangle * rectangle,
                                                          GstVideoOverlayFormatFlags 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 gst_video_overlay_rectangle_get_render_rectangle.

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`flags` –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns ( [transfer: none]) –

a GstBuffer holding the AYUV pixel data with GstVideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref if needed.

#### GstVideo.VideoOverlayRectangle.prototype.get_pixels_unscaled_ayuv

    function GstVideo.VideoOverlayRectangle.prototype.get_pixels_unscaled_ayuv(flags: GstVideo.VideoOverlayFormatFlags): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_pixels_unscaled_ayuv'
    }

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.VideoOverlayRectangle.prototype.get_render_rectangle.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the AYUV pixel data with GstVideo.VideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### GstVideo.VideoOverlayRectangle.get_pixels_unscaled_ayuv

    def GstVideo.VideoOverlayRectangle.get_pixels_unscaled_ayuv (self, flags):
        #python wrapper for 'gst_video_overlay_rectangle_get_pixels_unscaled_ayuv'

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.VideoOverlayRectangle.get_render_rectangle.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the AYUV pixel data with GstVideo.VideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### gst_video_overlay_rectangle_get_pixels_unscaled_raw

    GstBuffer *
    gst_video_overlay_rectangle_get_pixels_unscaled_raw (GstVideoOverlayRectangle * rectangle,
                                                         GstVideoOverlayFormatFlags 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 gst_video_overlay_rectangle_get_render_rectangle.

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`flags` –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns ( [transfer: none]) –

a GstBuffer holding the pixel data with GstVideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref if needed.

#### GstVideo.VideoOverlayRectangle.prototype.get_pixels_unscaled_raw

    function GstVideo.VideoOverlayRectangle.prototype.get_pixels_unscaled_raw(flags: GstVideo.VideoOverlayFormatFlags): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_pixels_unscaled_raw'
    }

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.VideoOverlayRectangle.prototype.get_render_rectangle.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the pixel data with GstVideo.VideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### GstVideo.VideoOverlayRectangle.get_pixels_unscaled_raw

    def GstVideo.VideoOverlayRectangle.get_pixels_unscaled_raw (self, flags):
        #python wrapper for 'gst_video_overlay_rectangle_get_pixels_unscaled_raw'

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.VideoOverlayRectangle.get_render_rectangle.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`flags` (GstVideo.VideoOverlayFormatFlags) –

flags. If a global_alpha value != 1 is set for the rectangle, the caller should set the GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA flag if he wants to apply global-alpha himself. If the flag is not set global_alpha is applied internally before returning the pixel-data.

Returns (Gst.Buffer) –

a Gst.Buffer holding the pixel data with GstVideo.VideoMeta set. This function does not return a reference, the caller should obtain a reference of her own with gst_buffer_ref (not introspectable) if needed.

#### gst_video_overlay_rectangle_get_render_rectangle

    gboolean
    gst_video_overlay_rectangle_get_render_rectangle (GstVideoOverlayRectangle * rectangle,
                                                      gint * render_x,
                                                      gint * render_y,
                                                      guint * render_width,
                                                      guint * render_height)

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

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`render_x` ( [out][allow-none]) –

address where to store the X render offset

`render_y` ( [out][allow-none]) –

address where to store the Y render offset

`render_width` ( [out][allow-none]) –

address where to store the render width

`render_height` ( [out][allow-none]) –

address where to store the render height

Returns –

TRUE if valid render dimensions were retrieved.

#### GstVideo.VideoOverlayRectangle.prototype.get_render_rectangle

    function GstVideo.VideoOverlayRectangle.prototype.get_render_rectangle(): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_render_rectangle'
    }

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

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

Returns a tuple made of:

(Number ) –

TRUE if valid render dimensions were retrieved.

`render_x` (Number ) –

TRUE if valid render dimensions were retrieved.

`render_y` (Number ) –

TRUE if valid render dimensions were retrieved.

`render_width` (Number ) –

TRUE if valid render dimensions were retrieved.

`render_height` (Number ) –

TRUE if valid render dimensions were retrieved.

#### GstVideo.VideoOverlayRectangle.get_render_rectangle

    def GstVideo.VideoOverlayRectangle.get_render_rectangle (self):
        #python wrapper for 'gst_video_overlay_rectangle_get_render_rectangle'

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

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

Returns a tuple made of:

(bool ) –

TRUE if valid render dimensions were retrieved.

`render_x` (int ) –

TRUE if valid render dimensions were retrieved.

`render_y` (int ) –

TRUE if valid render dimensions were retrieved.

`render_width` (int ) –

TRUE if valid render dimensions were retrieved.

`render_height` (int ) –

TRUE if valid render dimensions were retrieved.

#### gst_video_overlay_rectangle_get_seqnum

    guint
    gst_video_overlay_rectangle_get_seqnum (GstVideoOverlayRectangle * rectangle)

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).

Using the sequence number of a rectangle as an indicator for changed pixel-data of a rectangle is dangereous. Some API calls, like e.g. gst_video_overlay_rectangle_set_global_alpha, automatically update the per rectangle sequence number, which is misleading for renderers/ consumers, that handle global-alpha themselves. For them the pixel-data returned by gst_video_overlay_rectangle_get_pixels_*() won't be different for different global-alpha values. In this case a renderer could also use the GstBuffer pointers as a hint for changed pixel-data.

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

Returns –

the sequence number of rectangle

#### GstVideo.VideoOverlayRectangle.prototype.get_seqnum

    function GstVideo.VideoOverlayRectangle.prototype.get_seqnum(): {
        // javascript wrapper for 'gst_video_overlay_rectangle_get_seqnum'
    }

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).

Using the sequence number of a rectangle as an indicator for changed pixel-data of a rectangle is dangereous. Some API calls, like e.g. GstVideo.VideoOverlayRectangle.prototype.set_global_alpha, automatically update the per rectangle sequence number, which is misleading for renderers/ consumers, that handle global-alpha themselves. For them the pixel-data returned by gst_video_overlay_rectangle_get_pixels_*() won't be different for different global-alpha values. In this case a renderer could also use the GstBuffer pointers as a hint for changed pixel-data.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

Returns (Number) –

the sequence number of rectangle

#### GstVideo.VideoOverlayRectangle.get_seqnum

    def GstVideo.VideoOverlayRectangle.get_seqnum (self):
        #python wrapper for 'gst_video_overlay_rectangle_get_seqnum'

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).

Using the sequence number of a rectangle as an indicator for changed pixel-data of a rectangle is dangereous. Some API calls, like e.g. GstVideo.VideoOverlayRectangle.set_global_alpha, automatically update the per rectangle sequence number, which is misleading for renderers/ consumers, that handle global-alpha themselves. For them the pixel-data returned by gst_video_overlay_rectangle_get_pixels_*() won't be different for different global-alpha values. In this case a renderer could also use the GstBuffer pointers as a hint for changed pixel-data.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

Returns (int) –

the sequence number of rectangle

#### gst_video_overlay_rectangle_set_global_alpha

    gst_video_overlay_rectangle_set_global_alpha (GstVideoOverlayRectangle * rectangle,
                                                  gfloat global_alpha)

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.

rectangle must be writable, meaning its refcount must be 1. You can make the rectangles inside a GstVideoOverlayComposition writable using gst_video_overlay_composition_make_writable or gst_video_overlay_composition_copy.

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`global_alpha` –

Global alpha value (0 to 1.0)

#### GstVideo.VideoOverlayRectangle.prototype.set_global_alpha

    function GstVideo.VideoOverlayRectangle.prototype.set_global_alpha(global_alpha: Number): {
        // javascript wrapper for 'gst_video_overlay_rectangle_set_global_alpha'
    }

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

rectangle must be writable, meaning its refcount must be 1. You can make the rectangles inside a GstVideo.VideoOverlayComposition writable using GstVideo.VideoOverlayComposition.prototype.make_writable or GstVideo.VideoOverlayComposition.prototype.copy.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`global_alpha` (Number) –

Global alpha value (0 to 1.0)

#### GstVideo.VideoOverlayRectangle.set_global_alpha

    def GstVideo.VideoOverlayRectangle.set_global_alpha (self, global_alpha):
        #python wrapper for 'gst_video_overlay_rectangle_set_global_alpha'

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

rectangle must be writable, meaning its refcount must be 1. You can make the rectangles inside a GstVideo.VideoOverlayComposition writable using GstVideo.VideoOverlayComposition.make_writable or GstVideo.VideoOverlayComposition.copy.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`global_alpha` (float) –

Global alpha value (0 to 1.0)

#### gst_video_overlay_rectangle_set_render_rectangle

    gst_video_overlay_rectangle_set_render_rectangle (GstVideoOverlayRectangle * rectangle,
                                                      gint render_x,
                                                      gint render_y,
                                                      guint render_width,
                                                      guint render_height)

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.

rectangle must be writable, meaning its refcount must be 1. You can make the rectangles inside a GstVideoOverlayComposition writable using gst_video_overlay_composition_make_writable or gst_video_overlay_composition_copy.

Parameters:

`rectangle` –

a GstVideoOverlayRectangle

`render_x` –

render X position of rectangle on video

`render_y` –

render Y position of rectangle on video

`render_width` –

render width of rectangle

`render_height` –

render height of rectangle

#### GstVideo.VideoOverlayRectangle.prototype.set_render_rectangle

    function GstVideo.VideoOverlayRectangle.prototype.set_render_rectangle(render_x: Number, render_y: Number, render_width: Number, render_height: Number): {
        // javascript wrapper for 'gst_video_overlay_rectangle_set_render_rectangle'
    }

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.

rectangle must be writable, meaning its refcount must be 1. You can make the rectangles inside a GstVideo.VideoOverlayComposition writable using GstVideo.VideoOverlayComposition.prototype.make_writable or GstVideo.VideoOverlayComposition.prototype.copy.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`render_x` (Number) –

render X position of rectangle on video

`render_y` (Number) –

render Y position of rectangle on video

`render_width` (Number) –

render width of rectangle

`render_height` (Number) –

render height of rectangle

#### GstVideo.VideoOverlayRectangle.set_render_rectangle

    def GstVideo.VideoOverlayRectangle.set_render_rectangle (self, render_x, render_y, render_width, render_height):
        #python wrapper for 'gst_video_overlay_rectangle_set_render_rectangle'

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.

rectangle must be writable, meaning its refcount must be 1. You can make the rectangles inside a GstVideo.VideoOverlayComposition writable using GstVideo.VideoOverlayComposition.make_writable or GstVideo.VideoOverlayComposition.copy.

Parameters:

`rectangle` (GstVideo.VideoOverlayRectangle) –

a GstVideo.VideoOverlayRectangle

`render_x` (int) –

render X position of rectangle on video

`render_y` (int) –

render Y position of rectangle on video

`render_width` (int) –

render width of rectangle

`render_height` (int) –

render height of rectangle

## Functions

### gst_buffer_add_video_overlay_composition_meta

    GstVideoOverlayCompositionMeta *
    gst_buffer_add_video_overlay_composition_meta (GstBuffer * buf,
                                                   GstVideoOverlayComposition * comp)

Sets an overlay composition on a buffer. The buffer will obtain its own reference to the composition, meaning this function does not take ownership of comp.

Parameters:

`buf` –

a GstBuffer

`comp` ( [allow-none]) –

a GstVideoOverlayComposition

Returns ( [transfer: none]) –

a GstVideoOverlayCompositionMeta

### GstVideo.prototype.buffer_add_video_overlay_composition_meta

    function GstVideo.prototype.buffer_add_video_overlay_composition_meta(buf: Gst.Buffer, comp: GstVideo.VideoOverlayComposition): {
        // javascript wrapper for 'gst_buffer_add_video_overlay_composition_meta'
    }

Sets an overlay composition on a buffer. The buffer will obtain its own reference to the composition, meaning this function does not take ownership of comp.

Parameters:

`buf` (Gst.Buffer) –

a Gst.Buffer

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

Returns (GstVideo.VideoOverlayCompositionMeta) –

a GstVideo.VideoOverlayCompositionMeta

### GstVideo.buffer_add_video_overlay_composition_meta

    def GstVideo.buffer_add_video_overlay_composition_meta (buf, comp):
        #python wrapper for 'gst_buffer_add_video_overlay_composition_meta'

Sets an overlay composition on a buffer. The buffer will obtain its own reference to the composition, meaning this function does not take ownership of comp.

Parameters:

`buf` (Gst.Buffer) –

a Gst.Buffer

`comp` (GstVideo.VideoOverlayComposition) –

a GstVideo.VideoOverlayComposition

Returns (GstVideo.VideoOverlayCompositionMeta) –

a GstVideo.VideoOverlayCompositionMeta

### gst_video_overlay_composition_meta_api_get_type

    GType
    gst_video_overlay_composition_meta_api_get_type ()

Returns –
No description available

### GstVideo.prototype.video_overlay_composition_meta_api_get_type

    function GstVideo.prototype.video_overlay_composition_meta_api_get_type(): {
        // javascript wrapper for 'gst_video_overlay_composition_meta_api_get_type'
    }

Returns (GObject.Type) –
No description available

### GstVideo.video_overlay_composition_meta_api_get_type

    def GstVideo.video_overlay_composition_meta_api_get_type ():
        #python wrapper for 'gst_video_overlay_composition_meta_api_get_type'

Returns (GObject.Type) –
No description available

## Function Macros

### GST_IS_VIDEO_OVERLAY_COMPOSITION

    #define GST_IS_VIDEO_OVERLAY_COMPOSITION(obj)			\
      (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_VIDEO_OVERLAY_COMPOSITION))

### GST_IS_VIDEO_OVERLAY_RECTANGLE

    #define GST_IS_VIDEO_OVERLAY_RECTANGLE(obj)			\
      (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_VIDEO_OVERLAY_RECTANGLE))

### GST_VIDEO_OVERLAY_COMPOSITION

    #define GST_VIDEO_OVERLAY_COMPOSITION(obj)			\
      (GST_VIDEO_OVERLAY_COMPOSITION_CAST(obj))

### GST_VIDEO_OVERLAY_COMPOSITION_CAST

    #define GST_VIDEO_OVERLAY_COMPOSITION_CAST(obj)			\
      ((GstVideoOverlayComposition *)(obj))

### GST_VIDEO_OVERLAY_RECTANGLE

    #define GST_VIDEO_OVERLAY_RECTANGLE(obj)			\
      (GST_VIDEO_OVERLAY_RECTANGLE_CAST(obj))

### GST_VIDEO_OVERLAY_RECTANGLE_CAST

    #define GST_VIDEO_OVERLAY_RECTANGLE_CAST(obj)			\
      ((GstVideoOverlayRectangle *)(obj))

### gst_buffer_get_video_overlay_composition_meta

    #define gst_buffer_get_video_overlay_composition_meta(b) \
      ((GstVideoOverlayCompositionMeta*)gst_buffer_get_meta((b),GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE))

### gst_buffer_remove_video_overlay_composition_meta

    #define gst_buffer_remove_video_overlay_composition_meta(b,m) \
      gst_buffer_remove_meta((b),((GstMeta *) m))

## Enumerations

### GstVideoOverlayFormatFlags

Overlay format flags.

##### Members

`GST_VIDEO_OVERLAY_FORMAT_FLAG_NONE` (0) –

no flags

`GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA` (1) –

RGB are premultiplied by A/255.

`GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA` (2) –

a global-alpha value != 1 is set.

### GstVideo.VideoOverlayFormatFlags

Overlay format flags.

##### Members

`GstVideo.VideoOverlayFormatFlags.NONE` (0) –

no flags

`GstVideo.VideoOverlayFormatFlags.PREMULTIPLIED_ALPHA` (1) –

RGB are premultiplied by A/255.

`GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA` (2) –

a global-alpha value != 1 is set.

### GstVideo.VideoOverlayFormatFlags

Overlay format flags.

##### Members

`GstVideo.VideoOverlayFormatFlags.NONE` (0) –

no flags

`GstVideo.VideoOverlayFormatFlags.PREMULTIPLIED_ALPHA` (1) –

RGB are premultiplied by A/255.

`GstVideo.VideoOverlayFormatFlags.GLOBAL_ALPHA` (2) –

a global-alpha value != 1 is set.

## Constants

### GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION

    #define GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION "meta:GstVideoOverlayComposition"

### GstVideo.CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION

### GST_TYPE_VIDEO_OVERLAY_COMPOSITION

    #define GST_TYPE_VIDEO_OVERLAY_COMPOSITION			\
      (gst_video_overlay_composition_get_type ())

### GST_TYPE_VIDEO_OVERLAY_RECTANGLE

    #define GST_TYPE_VIDEO_OVERLAY_RECTANGLE			\
      (gst_video_overlay_rectangle_get_type ())

### GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS

    #define GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS GST_VIDEO_FORMATS_ALL

Video formats supported by gst_video_overlay_composition_blend, for use in overlay elements' pad template caps.

### GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_RGB

    #define GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_RGB      GST_VIDEO_FORMAT_BGRA

Supported RGB overlay video format.

### GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_YUV

    #define GST_VIDEO_OVERLAY_COMPOSITION_FORMAT_YUV      GST_VIDEO_FORMAT_AYUV

Supported YUV overlay video format.

### GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE

    #define GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE \
        (gst_video_overlay_composition_meta_api_get_type())

### GST_VIDEO_OVERLAY_COMPOSITION_META_INFO

    #define GST_VIDEO_OVERLAY_COMPOSITION_META_INFO \
        (gst_video_overlay_composition_meta_get_info())

The results of the search are