## adder

adder

## Properties

GstCaps * | caps | Read / Write

## Types and Values

struct | GstAdder

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstAdder

## Implemented Interfaces

GstAdder implements GstChildProxy.

## Description

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

    1

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

This pipeline produces two sine waves mixed together.

## Synopsis

### Element Information

plugin | adder
author | Thomas Vander Stichele <thomas at apestaart dot org>
class | Generic/Audio

### Element Pads

name | sink_%u
direction | sink
presence | request
details | audio/x-raw, format=(string){ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string){ interleaved }

name | src
direction | source
presence | always
details | audio/x-raw, format=(string){ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string){ interleaved }

## Functions

## Types and Values

### struct GstAdder

    struct GstAdder;

The adder object structure.

## Property Details

### The `“caps”` property

      “caps”                     GstCaps *

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

Owner: GstAdder

Flags: Read / Write