Top | ![]() |
![]() |
![]() |
![]() |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstAggregator ╰── GstVideoAggregator ╰── GstCompositor
Description
Compositor can accept AYUV, ARGB and BGRA video streams. For each of the requested sink pads it will compare the incoming geometry and framerate to define the output parameters. Indeed output video frames will have the geometry of the biggest incoming video stream and the framerate of the fastest incoming one.
Compositor will do colorspace conversion.
Individual parameters for each input stream can be configured on the GstCompositorPad:
- "xpos": The x-coordinate position of the top-left corner of the picture (gint)
- "ypos": The y-coordinate position of the top-left corner of the picture (gint)
- "width": The width of the picture; the input will be scaled if necessary (gint)
- "height": The height of the picture; the input will be scaled if necessary (gint)
- "alpha": The transparency of the picture; between 0.0 and 1.0. The blending is a simple copy when fully-transparent (0.0) and fully-opaque (1.0). (gdouble)
- "zorder": The z-order position of the picture in the composition (guint)
Sample pipelines
1 2 3 4 5 6 7 8 |
gst-launch-1.0 \ videotestsrc pattern=1 ! \ video/x-raw,format=AYUV,framerate=\(fraction\)10/1,width=100,height=100 ! \ videobox border-alpha=0 top=-70 bottom=-70 right=-220 ! \ compositor name=comp sink_0::alpha=0.7 sink_1::alpha=0.5 ! \ videoconvert ! xvimagesink \ videotestsrc ! \ video/x-raw,format=AYUV,framerate=\(fraction\)5/1,width=320,height=240 ! comp. |
1 2 3 4 5 |
gst-launch-1.0 videotestsrc pattern=1 ! \ video/x-raw, framerate=\(fraction\)10/1, width=100, height=100 ! \ compositor name=comp ! videoconvert ! ximagesink \ videotestsrc ! \ video/x-raw, framerate=\(fraction\)5/1, width=320, height=240 ! comp. |
1 2 3 4 5 |
gst-launch-1.0 videotestsrc pattern=1 ! \ video/x-raw,format =I420, framerate=\(fraction\)10/1, width=100, height=100 ! \ compositor name=comp ! videoconvert ! ximagesink \ videotestsrc ! \ video/x-raw,format=I420, framerate=\(fraction\)5/1, width=320, height=240 ! comp. |
1 2 3 4 5 6 7 8 |
gst-launch-1.0 compositor name=comp sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! \ videoconvert ! ximagesink \ videotestsrc pattern=snow timestamp-offset=3000000000 ! \ "video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1" ! \ timeoverlay ! queue2 ! comp. \ videotestsrc pattern=smpte ! \ "video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1" ! \ timeoverlay ! queue2 ! comp. |
Synopsis
Element Information
plugin |
compositor |
author |
Wim Taymans <wim@fluendo.com>, Sebastian Dröge <sebastian.droege@collabora.co.uk> |
class |
Filter/Editor/Video/Compositor |
Element Pads
name |
sink_%u |
direction |
sink |
presence |
request |
details |
video/x-raw, format=(string){ AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx }, 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){ AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ] |
Property Details
The “background”
property
“background” GstCompositorBackground
Background type.
Flags: Read / Write
Default value: Checker pattern