minus1mixer

Minus-1 mixer element. Creates for each input an output mix that contains all the other inputs.

Input pads are request pads, and for every new input pad "sink_%u" the minus1mixer will automatically create a matching "minus_%u" source pad that will contain the mix of all the other inputs, i.e. all inputs except "sink_%u" itself. If there is only one sink pad this will output silence instead.

Input pads can be added and removed at runtime at any time.

The sample rate is not negotiated, as this is not possible to do in a race-free manner. It must instead be configured at element creation time via the "sample-rate" construct-only property. The default sample rate is 48kHz.

Only mono input is supported for the time being.

Both F32 and S16 are supported as input and output audio formats. Different inputs may have different input formats (as long as it's one of the two supported ones), and different outputs can have different output formats (as long as it's one of the two supported ones). The internal mixing is currently always done in F32 format regardless of the negotiated input and output formats.

Example pipelines

 gst-launch-1.0 minus1mixer name=m1m  \
   audiotestsrc freq=440 ! m1m.sink_0 \
   audiotestsrc wave=ticks ! m1m.sink_1 \
   audiotestsrc freq=220 ! m1m.sink_2  \
   m1m.minus_0 ! audioconvert ! pulsesink

This should play back the mix of inputs 1 and 2 (ticks and 220Hz sine wave).

 gst-launch-1.0 minus1mixer name=m1m  \
   audiotestsrc freq=440 ! m1m.sink_0 \
   audiotestsrc wave=ticks ! m1m.sink_1 \
   audiotestsrc freq=220 ! m1m.sink_2  \
   m1m.minus_1 ! audioconvert ! pulsesink

This should play back the mix of inputs 0 and 2 (440Hz and 220Hz sine waves).

 gst-launch-1.0 minus1mixer name=m1m  \
   audiotestsrc freq=440 ! m1m.sink_0 \
   audiotestsrc wave=ticks ! m1m.sink_1 \
   audiotestsrc freq=220 ! m1m.sink_2  \
   m1m.minus_2 ! audioconvert ! pulsesink

This should play back the mix of inputs 0 and 1 (440Hz sine wave and ticks).

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBin
                    ╰──minus1mixer

Implemented interfaces

Factory details

Authors: – Tim-Philipp Müller

Classification:Audio/Mixer

Rank – none

Plugin – audiomultimixer

Package – gst-plugin-audiomultimixer

Pad Templates

minus_%u

audio/x-raw:
           rate: [ 1, 2147483647 ]
       channels: 1
         layout: interleaved
         format: { S16LE, F32LE }

Presencesometimes

Directionsrc

Object typeGstPad


sink_%u

audio/x-raw:
           rate: [ 1, 2147483647 ]
       channels: 1
         layout: interleaved
         format: { S16LE, F32LE }

Presencerequest

Directionsink

Object typeGstPad


Properties

alignment-threshold

“alignment-threshold” guint64

Timestamp alignment threshold in nanoseconds

Flags : Read / Write

Default value : 40000000


discont-wait

“discont-wait” guint64

Window of time in nanoseconds to wait before creating a discontinuity

Flags : Read / Write

Default value : 1000000000


force-live

“force-live” gboolean

Always operate in live mode and aggregate on timeout regardless of whether any live sources are linked upstream

Flags : Read / Write / Construct Only

Default value : false


ignore-inactive-pads

“ignore-inactive-pads” gboolean

Avoid timing out waiting for inactive pads

Flags : Read / Write

Default value : true


latency

“latency” guint64

Additional latency in live mode to allow upstream to take longer to produce buffers for the current position (in nanoseconds)

Flags : Read / Write

Default value : 0


min-upstream-latency

“min-upstream-latency” guint64

When sources with a higher latency are expected to be plugged in dynamically after the aggregator has started playing, this allows overriding the minimum latency reported by the initial source(s). This is only taken into account when larger than the actually reported minimum latency. (nanoseconds)

Flags : Read / Write

Default value : 0


output-buffer-duration

“output-buffer-duration” guint64

Output block size in nanoseconds

Flags : Read / Write

Default value : 10000000


output-buffer-duration-fraction

“output-buffer-duration-fraction” GstFraction *

Output block size in nanoseconds, expressed as a fraction

Flags : Read / Write

Default value : 1/100


sample-rate

“sample-rate” gint

Sample rate to use

Flags : Read / Write / Construct Only

Default value : 48000


start-time

“start-time” guint64

Start time to use if start-time-selection=set

Flags : Read / Write

Default value : 18446744073709551615


start-time-selection

“start-time-selection” GstAggregatorStartTimeSelection *

Decides which start time is output

Flags : Read / Write

Default value : zero (0)


The results of the search are