rsvgoverlay

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

 gst-launch-1.0 -v videotestsrc ! videoconvert ! rsvgoverlay location=foo.svg ! videoconvert ! autovideosink

specifies the SVG location through the filename property.

 gst-launch-1.0 -v videotestsrc ! videoconvert ! rsvgoverlay name=overlay ! videoconvert ! 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:

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

Hierarchy

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

Factory details

Authors: – Olivier Aubert

Classification:Filter/Editor/Video

Rank – none

Plugin – rsvg

Package – GStreamer Bad Plug-ins

Pad Templates

data_sink

image/svg+xml:
image/svg:
text/plain:

Presencealways

Directionsink

Object typeGstPad


sink

video/x-raw:
         format: BGRA
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsink

Object typeGstPad


src

video/x-raw:
         format: BGRA
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsrc

Object typeGstPad


Properties

data

“data” gchararray

SVG data.

Flags : Read / Write


fit-to-frame

“fit-to-frame” gboolean

Fit the SVG to fill the whole frame.

Flags : Read / Write

Default value : false


height

“height” gint

Specify a height in pixels.

Flags : Read / Write

Default value : 0


height-relative

“height-relative” gfloat

Specify a height relative to the display size.

Flags : Read / Write

Default value : 0


location

“location” gchararray

SVG file location.

Flags : Read / Write


width

“width” gint

Specify a width in pixels.

Flags : Read / Write

Default value : 0


width-relative

“width-relative” gfloat

Specify a width relative to the display size.

Flags : Read / Write

Default value : 0


x

“x” gint

Specify an x offset.

Flags : Read / Write

Default value : 0


x-relative

“x-relative” gfloat

Specify an x offset relative to the display size.

Flags : Read / Write

Default value : 0


y

“y” gint

Specify a y offset.

Flags : Read / Write

Default value : 0


y-relative

“y-relative” gfloat

Specify a y offset relative to the display size.

Flags : Read / Write

Default value : 0


The results of the search are