Constants

Details

GstAudio.AUDIO_CHANNELS_RANGE = '(int) [ 1, max ]'

Maximum range of allowed channels, for use in template caps strings.

GstAudio.AUDIO_CONVERTER_OPT_DITHER_METHOD = 'GstAudioConverter.dither-method'

#GST_TYPE_AUDIO_DITHER_METHOD, The dither method to use when changing bit depth. Default is GstAudio.AudioDitherMethod.NONE.

GstAudio.AUDIO_CONVERTER_OPT_MIX_MATRIX = 'GstAudioConverter.mix-matrix'

#GST_TYPE_VALUE_LIST, The channel mapping 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.

Example matrix generation code

To generate the matrix using code:

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);
GstAudio.AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD = 'GstAudioConverter.noise-shaping-method'

#GST_TYPE_AUDIO_NOISE_SHAPING_METHOD, The noise shaping method to use to mask noise from quantization errors. Default is GstAudio.AudioNoiseShapingMethod.NONE.

GstAudio.AUDIO_CONVERTER_OPT_QUANTIZATION = 'GstAudioConverter.quantization'

GObject.TYPE_UINT, The quantization amount. Components will be quantized to multiples of this value. Default is 1

GstAudio.AUDIO_CONVERTER_OPT_RESAMPLER_METHOD = 'GstAudioConverter.resampler-method'

#GST_TYPE_AUDIO_RESAMPLER_METHOD, The resampler method to use when changing sample rates. Default is GstAudio.AudioResamplerMethod.BLACKMAN_NUTTALL.

GstAudio.AUDIO_DECODER_MAX_ERRORS = 10

Default maximum number of errors tolerated before signaling error.

GstAudio.AUDIO_DECODER_SINK_NAME = 'sink'

The name of the templates for the sink pad.

GstAudio.AUDIO_DECODER_SRC_NAME = 'src'

The name of the templates for the source pad.

GstAudio.AUDIO_DEF_CHANNELS = 2

Standard number of channels used in consumer audio.

GstAudio.AUDIO_DEF_FORMAT = 'S16LE'

Standard format used in consumer audio.

GstAudio.AUDIO_DEF_RATE = 44100

Standard sampling rate used in consumer audio.

GstAudio.AUDIO_ENCODER_SINK_NAME = 'sink'

the name of the templates for the sink pad

GstAudio.AUDIO_ENCODER_SRC_NAME = 'src'

the name of the templates for the source pad

GstAudio.AUDIO_FORMATS_ALL = ' { 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 }'

List of all audio formats, for use in template caps strings.

GstAudio.AUDIO_RATE_RANGE = '(int) [ 1, max ]'

Maximum range of allowed sample rates, for use in template caps strings.

GstAudio.AUDIO_RESAMPLER_OPT_CUBIC_B = 'GstAudioResampler.cubic-b'

GObject.TYPE_DOUBLE, B parameter of the cubic filter. Values between 0.0 and 2.0 are accepted. 1.0 is the default.

Below are some values of popular filters: B C Hermite 0.0 0.0 Spline 1.0 0.0 Catmull-Rom 0.0 1/2

GstAudio.AUDIO_RESAMPLER_OPT_CUBIC_C = 'GstAudioResampler.cubic-c'

GObject.TYPE_DOUBLE, C parameter of the cubic filter. Values between 0.0 and 2.0 are accepted. 0.0 is the default.

See GstAudio.AUDIO_RESAMPLER_OPT_CUBIC_B for some more common values

GstAudio.AUDIO_RESAMPLER_OPT_CUTOFF = 'GstAudioResampler.cutoff'

GObject.TYPE_DOUBLE, Cutoff parameter for the filter. 0.940 is the default.

GstAudio.AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION = 'GstAudioResampler.filter-interpolation'

GST_TYPE_AUDIO_RESAMPLER_INTERPOLATION: how the filter coeficients should be interpolated. GstAudio.AudioResamplerFilterInterpolation.CUBIC is default.

GstAudio.AUDIO_RESAMPLER_OPT_FILTER_MODE = 'GstAudioResampler.filter-mode'

GST_TYPE_AUDIO_RESAMPLER_FILTER_MODE: how the filter tables should be constructed. GstAudio.AudioResamplerFilterMode.AUTO is the default.

GstAudio.AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD = 'GstAudioResampler.filter-mode-threshold'

GObject.TYPE_UINT: the amount of memory to use for full filter tables before switching to interpolated filter tables. 1048576 is the default.

GstAudio.AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE = 'GstAudioResampler.filter-oversample'

GObject.TYPE_UINT, oversampling to use when interpolating filters 8 is the default.

GstAudio.AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR = 'GstAudioResampler.max-phase-error'

GObject.TYPE_DOUBLE: The maximum allowed phase error when switching sample rates. 0.1 is the default.

GstAudio.AUDIO_RESAMPLER_OPT_N_TAPS = 'GstAudioResampler.n-taps'

GObject.TYPE_INT: the number of taps to use for the filter. 0 is the default and selects the taps automatically.

GstAudio.AUDIO_RESAMPLER_OPT_STOP_ATTENUATION = 'GstAudioResampler.stop-attenutation'

GObject.TYPE_DOUBLE, stopband attenuation in decibels. The attenuation after the stopband for the kaiser window. 85 dB is the default.

GstAudio.AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH = 'GstAudioResampler.transition-bandwidth'

GObject.TYPE_DOUBLE, transition bandwidth. The width of the transition band for the kaiser window. 0.087 is the default.

GstAudio.AUDIO_RESAMPLER_QUALITY_DEFAULT = 4
GstAudio.AUDIO_RESAMPLER_QUALITY_MAX = 10
GstAudio.AUDIO_RESAMPLER_QUALITY_MIN = 0
GstAudio.META_TAG_AUDIO_CHANNELS_STR = 'channels'

This metadata stays relevant as long as channels are unchanged.

New in version 1.2.

GstAudio.META_TAG_AUDIO_RATE_STR = 'rate'

This metadata stays relevant as long as sample rate is unchanged.

New in version 1.8.

GstAudio.META_TAG_AUDIO_STR = 'audio'

This metadata is relevant for audio streams.

New in version 1.2.