Top |
guint64 | channel-mask | Read / Write |
guint | in-channels | Read / Write |
GstValueArray | matrix | Read / Write |
GValueArray * | matrix-value-array | Read / Write |
GstAudioMixMatrixModeType | mode | Read / Write |
guint | out-channels | Read / Write |
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBaseTransform ╰── GstAudioMixMatrix
This element transforms a given number of input channels into a given number of output channels according to a given transformation matrix. The matrix coefficients must be between -1 and 1: the number of rows is equal to the number of output channels and the number of columns is equal to the number of input channels. In the first-channels mode, input/output channels are automatically negotiated and the transformation matrix is a truncated identity matrix.
To generate the matrix using code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
GValue v = G_VALUE_INIT; GValue v2 = G_VALUE_INIT; GValue v3 = G_VALUE_INIT; g_value_init (&v2, GST_TYPE_ARRAY); g_value_init (&v3, G_TYPE_DOUBLE); g_value_set_double (&v3, 1); gst_value_array_append_value (&v2, &v3); g_value_unset (&v3); [ Repeat for as many double as your input channels - unset and reinit v3 ] g_value_init (&v, GST_TYPE_ARRAY); gst_value_array_append_value (&v, &v2); g_value_unset (&v2); [ Repeat for as many v2's as your output channels - unset and reinit v2] g_object_set_property (G_OBJECT (audiomixmatrix), "matrix", &v); g_value_unset (&v); |
1 |
gst-launch-1.0 audiotestsrc ! audio/x-raw,channels=4 ! audiomixmatrix in-channels=4 out-channels=2 channel-mask=-1 matrix="<<(double)1, (double)0, (double)0, (double)0>, <0.0, 1.0, 0.0, 0.0>>" ! audio/x-raw,channels=2 ! autoaudiosink |
plugin |
audiomixmatrix |
author |
Vivia Nikolaidou <vivia@toolsonair.com> |
class |
Filter/Audio |
name |
sink |
direction |
sink |
presence |
always |
details |
audio/x-raw, channels=(int)[ 1, 2147483647 ], layout=(string)interleaved, format=(string){ F32LE, F64LE, S16LE, S32LE } |
name |
src |
direction |
source |
presence |
always |
details |
audio/x-raw, channels=(int)[ 1, 2147483647 ], layout=(string)interleaved, format=(string){ F32LE, F64LE, S16LE, S32LE } |
“channel-mask”
property“channel-mask” guint64
Output channel mask (-1 means "default for these channels").
Flags: Read / Write
Default value: 0
“in-channels”
property“in-channels” guint
How many audio channels we have on the input side.
Flags: Read / Write
Allowed values: <= 64
Default value: 0
“matrix”
property“matrix” GstValueArray
Transformation matrix for input/output channels.
Flags: Read / Write
“matrix-value-array”
property“matrix-value-array” GValueArray *
Transformation matrix (GValueArray) for input/output channels.
Flags: Read / Write
“mode”
property “mode” GstAudioMixMatrixModeType
Whether to auto-negotiate input/output channels and matrix.
Flags: Read / Write
Default value: Manual mode: please specify input/output channels and transformation matrix
“out-channels”
property“out-channels” guint
How many audio channels we have on the output side.
Flags: Read / Write
Allowed values: <= 64
Default value: 0