audiomixer

audiomixer

Types and Values

struct GstAudioMixer

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstAggregator
                    ╰── GstAudioAggregator
                        ╰── GstAudioMixer

Implemented Interfaces

GstAudioMixer implements GstChildProxy.

Description

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

Unlike the adder element audiomixer properly synchronises all input streams and also handles live inputs such as capture sources or RTP properly.

The audiomixer element can accept any sort of raw audio data, it will be converted to the target format if necessary, with the exception of the sample rate, which has to be identical to either what downstream expects, or the sample rate of the first configured pad. Use a capsfilter after the audiomixer element if you want to precisely control the format that comes out of the audiomixer, which supports changing the format of its output while playing.

If you want to control the manner in which incoming data gets converted, see the “converter-config” property, which will let you for example change the way in which channels may get remapped.

The input pads are from a GstPad subclass and have additional properties to mute each pad individually and set the volume:

  • "mute": Whether to mute the pad or not (gboolean)

  • "volume": The volume of the pad, between 0.0 and 10.0 (gdouble)

Example launch line

1
gst-launch-1.0 audiotestsrc freq=100 ! audiomixer name=mix ! audioconvert ! alsasink audiotestsrc freq=500 ! mix.

This pipeline produces two sine waves mixed together.

Synopsis

Element Information

plugin

audiomixer

author

Sebastian Dröge <sebastian@centricular.com>

class

Generic/Audio

Element Pads

name

sink_%u

direction

sink

presence

request

details

audio/x-raw, format=(string){ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }, 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 GstAudioMixer

struct GstAudioMixer;

The audiomixer object structure.