## gdkpixbufoverlay gdkpixbufoverlay |

## Properties

gchar * | location | Read / Write
gint | offset-x | Read / Write
gint | offset-y | Read / Write
gint | overlay-height | Read / Write
gint | overlay-width | Read / Write
gdouble | relative-x | Read / Write
gdouble | relative-y | Read / Write
gdouble | alpha | Read / Write
GdkPixbuf * | pixbuf | Read / Write
GstGdkPixbufPositioningMode | positioning-mode | Read / Write
gdouble | coef-x | Read / Write
gdouble | coef-y | Read / Write

## Types and Values

struct | GstGdkPixbufOverlay

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseTransform
                        ╰── GstVideoFilter
                            ╰── GstGdkPixbufOverlay

## Description

The gdkpixbufoverlay element overlays an image loaded from file onto a video stream.

Changing the positioning or overlay width and height properties at runtime is supported, but it might be prudent to to protect the property setting code with GST_BASE_TRANSFORM_LOCK and GST_BASE_TRANSFORM_UNLOCK, as `g_object_set()` is not atomic for multiple properties passed in one go.

Changing the image at runtime is currently not supported.

Negative offsets are also not yet supported.

### Example launch line

    1
    gst-launch-1.0 -v videotestsrc ! gdkpixbufoverlay location=image.png ! autovideosink

Overlays the image in image.png onto the test video picture produced by videotestsrc.

## Synopsis

### Element Information

plugin | gdkpixbuf
author | Tim-Philipp Müller <tim centricular net>
class | Filter/Effect/Video

### Element Pads

name | sink
direction | sink
presence | always
details | video/x-raw, format=(string){ RGBx, RGB, BGR, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, I420, YV12, AYUV, YUY2, UYVY, v308, v210, v216, Y41B, Y42B, Y444, YVYU, NV12, NV21, UYVP, RGB16, BGR16, RGB15, BGR15, UYVP, A420, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, GRAY8, GRAY16_BE, GRAY16_LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

name | src
direction | source
presence | always
details | video/x-raw, format=(string){ RGBx, RGB, BGR, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, I420, YV12, AYUV, YUY2, UYVY, v308, v210, v216, Y41B, Y42B, Y444, YVYU, NV12, NV21, UYVP, RGB16, BGR16, RGB15, BGR15, UYVP, A420, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, GRAY8, GRAY16_BE, GRAY16_LE }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

## Functions

## Types and Values

### struct GstGdkPixbufOverlay

    struct GstGdkPixbufOverlay;

The opaque element instance structure.

## Property Details

### The `“location”` property

      “location”                 gchar *

Location of image file to overlay.

Flags: Read / Write

Default value: NULL

### The `“offset-x”` property

      “offset-x”                 gint

For positive value, horizontal offset of overlay image in pixels from left of video image. For negative value, horizontal offset of overlay image in pixels from right of video image.

Flags: Read / Write

Default value: 0

### The `“offset-y”` property

      “offset-y”                 gint

For positive value, vertical offset of overlay image in pixels from top of video image. For negative value, vertical offset of overlay image in pixels from bottom of video image.

Flags: Read / Write

Default value: 0

### The `“overlay-height”` property

      “overlay-height”           gint

Height of overlay image in pixels (0 = same as overlay image).

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“overlay-width”` property

      “overlay-width”            gint

Width of overlay image in pixels (0 = same as overlay image).

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“relative-x”` property

      “relative-x”               gdouble

Horizontal offset of overlay image in fractions of video image width, from top-left corner of video image (in relative positioning).

Flags: Read / Write

Allowed values: [-1,1]

Default value: 0

### The `“relative-y”` property

      “relative-y”               gdouble

Vertical offset of overlay image in fractions of video image height, from top-left corner of video image (in relative positioning).

Flags: Read / Write

Allowed values: [-1,1]

Default value: 0

### The `“alpha”` property

      “alpha”                    gdouble

Global alpha of overlay image.

Flags: Read / Write

Allowed values: [0,1]

Default value: 1

### The `“pixbuf”` property

      “pixbuf”                   GdkPixbuf *

GdkPixbuf object to render.

Flags: Read / Write

Since: 1.6

### The `“positioning-mode”` property

      “positioning-mode”         GstGdkPixbufPositioningMode

Positioning mode of offset-x and offset-y properties. Determines how negative x/y offsets will be interpreted. By default negative values are for positioning relative to the right/bottom edge of the video image, but you can use this property to select absolute positioning relative to a (0, 0) origin in the top-left corner. That way negative offsets will be to the left/above the video image, which allows you to smoothly slide logos into and out of the frame if desired.

Flags: Read / Write

Default value: pixels-relative-to-edges

Since: 1.6

### The `“coef-x”` property

      “coef-x”                   gdouble

In absolute positioning mode, the x coordinate of overlay image's top-left corner is now given by offset-x + (relative-x * overlay_width) + (coef-x * video_width). This allows to align the image absolutely and relatively to any edge or center position.

Flags: Read / Write

Allowed values: [-1,1]

Default value: 0

Since: 1.12

### The `“coef-y”` property

      “coef-y”                   gdouble

In absolute positioning mode, the y coordinate of overlay image's top-left corner is now given by offset-y + (relative-y * overlay_height) + (coef-y * video_height). This allows to align the image absolutely and relatively to any edge or center position.

Flags: Read / Write

Allowed values: [-1,1]

Default value: 0

Since: 1.12