adder

The adder allows to mix several streams into one by adding the data. Mixed data is clamped to the min/max values of the data format.

The adder currently mixes all data received on the sinkpads as soon as possible without trying to synchronize the streams.

Check out the audiomixer element in gst-plugins-bad for a better-behaving audio mixing element: It will sync input streams correctly and also handle live inputs properly.

Caps negotiation is inherently racy with the adder element. You can set the "caps" property to force adder to operate in a specific audio format, sample rate and channel count. In this case you may also need audioconvert and/or audioresample elements for each input stream before the adder element to make sure the input branch can produce the forced format.

Example launch line

 gst-launch-1.0 audiotestsrc freq=100 ! adder name=mix ! audioconvert ! autoaudiosink audiotestsrc freq=500 ! mix.

This pipeline produces two sine waves mixed together.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──adder

Factory details

Authors: – Thomas Vander Stichele

Classification:Generic/Audio

Rank – none

Plugin – gstadder

Package – GStreamer Base Plug-ins git

Pad Templates

sink_%u

audio/x-raw:
         format: { S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }
           rate: [ 1, 2147483647 ]
       channels: [ 1, 2147483647 ]
         layout: { (string)interleaved }

Presencerequest

Directionsink


src

audio/x-raw:
         format: { S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }
           rate: [ 1, 2147483647 ]
       channels: [ 1, 2147483647 ]
         layout: { (string)interleaved }

Presencealways

Directionsrc


Properties

caps

“caps” GstCaps *

Set target format for mixing (NULL means ANY). Setting this property takes a reference to the supplied GstCaps object.

Flags : Read / Write


name

“name” gchararray

The name of the object

Flags : Read / Write / Construct

Default value : NULL


parent

“parent” GstObject *

The parent of the object

Flags : Read / Write


The results of the search are