audiomixer

audiomixer

Synopsis

struct              GstAudioMixer;

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstAggregator
                           +----GstAudioAggregator
                                 +----GstAudioMixer
                                       +----GstLiveAdder

Implemented Interfaces

GstAudioMixer implements GstChildProxy.

Properties

  "alignment-threshold"      guint64               : Read / Write
  "caps"                     GstCaps*              : Read / Write
  "discont-wait"             guint64               : Read / Write
  "blocksize"                guint                 : Read / Write
  "output-buffer-duration"   guint64               : Read / Write

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.

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){ S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string){ interleaved, non-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, non-interleaved }

Details

struct GstAudioMixer

struct GstAudioMixer;

The audiomixer object structure.

Property Details

The "alignment-threshold" property

  "alignment-threshold"      guint64               : Read / Write

Timestamp alignment threshold in nanoseconds.

Allowed values: <= 18446744073709551614

Default value: 40000000


The "caps" property

  "caps"                     GstCaps*              : Read / Write

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


The "discont-wait" property

  "discont-wait"             guint64               : Read / Write

Window of time in nanoseconds to wait before creating a discontinuity.

Allowed values: <= 18446744073709551614

Default value: 1000000000


The "blocksize" property

  "blocksize"                guint                 : Read / Write

Output block size in number of samples.

Default value: 1024


The "output-buffer-duration" property

  "output-buffer-duration"   guint64               : Read / Write

Output block size in nanoseconds.

Allowed values: >= 1

Default value: 10000000