## rsvgoverlay rsvgoverlay — Overlays SVG graphics over a video stream |

## Synopsis

    struct              GstRsvgOverlay;

## Object Hierarchy

      GObject
       +----GstObject
             +----GstElement
                   +----GstBaseTransform
                         +----GstVideoFilter
                               +----GstRsvgOverlay

## Properties

      "data"                     gchar*                : Write
      "fit-to-frame"             gboolean              : Read / Write
      "location"                 gchar*                : Write
      "x"                        gint                  : Read / Write
      "y"                        gint                  : Read / Write
      "height"                   gint                  : Read / Write
      "height-relative"          gfloat                : Read / Write
      "width"                    gint                  : Read / Write
      "width-relative"           gfloat                : Read / Write
      "x-relative"               gfloat                : Read / Write
      "y-relative"               gfloat                : Read / Write

## Description

This elements overlays SVG graphics over the video. SVG data can either be specified through properties, or fed through the data-sink pad.

Position and dimension of the SVG graphics can be achieved by specifying appropriate dimensions in the SVG file itself, but shortcuts are provided by the element to specify x/y position and width/height dimension, both in absolute form (pixels) and in relative form (percentage of video dimension).

For any measure (x/y/width/height), the absolute value (in pixels) takes precedence over the relative one if both are specified. Absolute values must be set to 0 to disable them.

If all parameters are 0, the image is displayed without rescaling at (0, 0) position.

The fit-to-frame property is a shortcut for displaying the SVG overlay at (0, 0) position filling the whole screen. It modifies the values of the x/y/width/height attributes, by setting height-/width-relative to 1.0. and all other attributes to 0.

### Example launch lines

    1
    gst-launch -v videotestsrc ! ffmpegcolorspace ! rsvgoverlay location=foo.svg ! ffmpegcolorspace ! autovideosink

specifies the SVG location through the filename property.

    1
    gst-launch -v videotestsrc ! ffmpegcolorspace ! rsvgoverlay name=overlay ! ffmpegcolorspace ! autovideosink filesrc location=foo.svg ! image/svg ! overlay.data_sink

does the same by feeding data through the data_sink pad. You can also specify the SVG data itself as parameter:

    1
    gst-launch -v videotestsrc ! ffmpegcolorspace ! rsvgoverlay data='<svg viewBox="0 0 800 600"><image x="80%" y="80%" width="10%" height="10%" xlink:href="foo.jpg" /></svg>' ! ffmpegcolorspace ! autovideosink

## Synopsis

### Element Information

plugin | rsvg
author | Olivier Aubert <olivier.aubert@liris.cnrs.fr>
class | Filter/Editor/Video

### Element Pads

name | data_sink
direction | sink
presence | always
details | image/svg+xml
| image/svg
| text/plain

name | sink
direction | sink
presence | always
details | video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

name | src
direction | source
presence | always
details | video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

## Details

### struct GstRsvgOverlay

    struct GstRsvgOverlay;

Opaque object data structure.

## Property Details

### The `"data"` property

      "data"                     gchar*                : Write

SVG data.

Default value: ""

### The `"fit-to-frame"` property

      "fit-to-frame"             gboolean              : Read / Write

Fit the SVG to fill the whole frame.

Default value: TRUE

### The `"location"` property

      "location"                 gchar*                : Write

SVG file location.

Default value: ""

### The `"x"` property

      "x"                        gint                  : Read / Write

Specify an x offset.

Allowed values: >= -2147483647

Default value: 0

### The `"y"` property

      "y"                        gint                  : Read / Write

Specify a y offset.

Allowed values: >= -2147483647

Default value: 0

### The `"height"` property

      "height"                   gint                  : Read / Write

Specify a height in pixels.

Allowed values: >= -2147483647

Default value: 0

### The `"height-relative"` property

      "height-relative"          gfloat                : Read / Write

Specify a height relative to the display size.

Default value: 0

### The `"width"` property

      "width"                    gint                  : Read / Write

Specify a width in pixels.

Allowed values: >= -2147483647

Default value: 0

### The `"width-relative"` property

      "width-relative"           gfloat                : Read / Write

Specify a width relative to the display size.

Default value: 0

### The `"x-relative"` property

      "x-relative"               gfloat                : Read / Write

Specify an x offset relative to the display size.

Default value: 0

### The `"y-relative"` property

      "y-relative"               gfloat                : Read / Write

Specify a y offset relative to the display size.

Default value: 0