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'¶
GstAudio.AudioDitherMethod
, The dither method to use when changing bit depth. Default isGstAudio.AudioDitherMethod.NONE
.
- GstAudio.AUDIO_CONVERTER_OPT_DITHER_THRESHOLD = 'GstAudioConverter.dither-threshold'¶
Threshold for the output bit depth at/below which to apply dithering.
Default is 20 bit.
New in version 1.22.
- GstAudio.AUDIO_CONVERTER_OPT_MIX_MATRIX = 'GstAudioConverter.mix-matrix'¶
#GST_TYPE_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'¶
GstAudio.AudioNoiseShapingMethod
, The noise shaping method to use to mask noise from quantization errors. Default isGstAudio.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'¶
GstAudio.AudioResamplerMethod
, The resampler method to use when changing sample rates. Default isGstAudio.AudioResamplerMethod.BLACKMAN_NUTTALL
.
- GstAudio.AUDIO_DECODER_MAX_ERRORS = -1¶
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 = '{ F64BE, F64LE, F32BE, F32LE, S32BE, S32LE, U32BE, U32LE, S24_32BE, S24_32LE, U24_32BE, U24_32LE, S24BE, S24LE, U24BE, U24LE, S20BE, S20LE, U20BE, U20LE, S18BE, S18LE, U18BE, U18LE, S16BE, S16LE, U16BE, U16LE, S8, U8 }'¶
List of all audio formats, for use in template caps strings.
Formats are sorted by decreasing “quality”, using these criteria by priority:
depth
width
Float > Signed > Unsigned
native endianness preferred
- 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 coefficients 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.DSD_FORMATS_ALL = '{ DSDU32BE, DSDU16BE, DSDU8, DSDU32LE, DSDU16LE }'¶
List of all DSD formats, for use in template caps strings.
Big endian formats are preferred, since little-endian ones flip around the DSD bytes, and most DSD hardware uses big endian formats.
New in version 1.24.
- GstAudio.DSD_MEDIA_TYPE = 'audio/x-dsd'¶
The GStreamer media type for DSD.
New in version 1.24.
- GstAudio.DSD_SILENCE_PATTERN_BYTE = 105¶
Silence pattern for DSD data.
In DSD, a nullbyte does not correspond to silence. To fill memory regions with “DSD silence”, these regions must be filled with byte 0x69 instead (this is the DSD silence pattern). This constant provides that pattern in a more readable fashion.
New in version 1.24.
- 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.
- GstAudio.META_TAG_DSD_PLANE_OFFSETS_STR = 'dsdplaneoffsets'¶
This metadata stays relevant as long as the DSD plane offsets are unchanged.
New in version 1.24.