{-# LANGUAGE PatternSynonyms, ScopedTypeVariables, ViewPatterns #-} {- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GstAudio.Constants ( pattern META_TAG_AUDIO_STR , pattern META_TAG_AUDIO_RATE_STR , pattern META_TAG_AUDIO_CHANNELS_STR , pattern AUDIO_RESAMPLER_QUALITY_MIN , pattern AUDIO_RESAMPLER_QUALITY_MAX , pattern AUDIO_RESAMPLER_QUALITY_DEFAULT , pattern AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH, pattern AUDIO_RESAMPLER_OPT_STOP_ATTENUATION, pattern AUDIO_RESAMPLER_OPT_N_TAPS , pattern AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR, pattern AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE, pattern AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD, pattern AUDIO_RESAMPLER_OPT_FILTER_MODE , pattern AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION, pattern AUDIO_RESAMPLER_OPT_CUTOFF , pattern AUDIO_RESAMPLER_OPT_CUBIC_C , pattern AUDIO_RESAMPLER_OPT_CUBIC_B , pattern AUDIO_RATE_RANGE , pattern AUDIO_FORMATS_ALL , pattern AUDIO_ENCODER_SRC_NAME , pattern AUDIO_ENCODER_SINK_NAME , pattern AUDIO_DEF_RATE , pattern AUDIO_DEF_FORMAT , pattern AUDIO_DEF_CHANNELS , pattern AUDIO_DECODER_SRC_NAME , pattern AUDIO_DECODER_SINK_NAME , pattern AUDIO_DECODER_MAX_ERRORS , pattern AUDIO_CONVERTER_OPT_RESAMPLER_METHOD, pattern AUDIO_CONVERTER_OPT_QUANTIZATION, pattern AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD, pattern AUDIO_CONVERTER_OPT_MIX_MATRIX , pattern AUDIO_CONVERTER_OPT_DITHER_METHOD, pattern AUDIO_CHANNELS_RANGE , ) where import Data.GI.Base.ShortPrelude import qualified Data.GI.Base.ShortPrelude as SP import qualified Data.GI.Base.Overloading as O import qualified Prelude as P import qualified Data.GI.Base.Attributes as GI.Attributes import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GClosure as B.GClosure import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import qualified Foreign.Ptr as FP import qualified GHC.OverloadedLabels as OL {- | This metadata is relevant for audio streams. /Since: 1.2/ -} pattern META_TAG_AUDIO_STR = "audio" :: T.Text {- | This metadata stays relevant as long as sample rate is unchanged. /Since: 1.8/ -} pattern META_TAG_AUDIO_RATE_STR = "rate" :: T.Text {- | This metadata stays relevant as long as channels are unchanged. /Since: 1.2/ -} pattern META_TAG_AUDIO_CHANNELS_STR = "channels" :: T.Text {- | /No description available in the introspection data./ -} pattern AUDIO_RESAMPLER_QUALITY_MIN = 0 :: Int32 {- | /No description available in the introspection data./ -} pattern AUDIO_RESAMPLER_QUALITY_MAX = 10 :: Int32 {- | /No description available in the introspection data./ -} pattern AUDIO_RESAMPLER_QUALITY_DEFAULT = 4 :: Int32 {- | G_TYPE_DOUBLE, transition bandwidth. The width of the transition band for the kaiser window. 0.087 is the default. -} pattern AUDIO_RESAMPLER_OPT_TRANSITION_BANDWIDTH = "GstAudioResampler.transition-bandwidth" :: T.Text {- | G_TYPE_DOUBLE, stopband attenuation in decibels. The attenuation after the stopband for the kaiser window. 85 dB is the default. -} pattern AUDIO_RESAMPLER_OPT_STOP_ATTENUATION = "GstAudioResampler.stop-attenutation" :: T.Text {- | G_TYPE_INT: the number of taps to use for the filter. 0 is the default and selects the taps automatically. -} pattern AUDIO_RESAMPLER_OPT_N_TAPS = "GstAudioResampler.n-taps" :: T.Text {- | G_TYPE_DOUBLE: The maximum allowed phase error when switching sample rates. 0.1 is the default. -} pattern AUDIO_RESAMPLER_OPT_MAX_PHASE_ERROR = "GstAudioResampler.max-phase-error" :: T.Text {- | G_TYPE_UINT, oversampling to use when interpolating filters 8 is the default. -} pattern AUDIO_RESAMPLER_OPT_FILTER_OVERSAMPLE = "GstAudioResampler.filter-oversample" :: T.Text {- | G_TYPE_UINT: the amount of memory to use for full filter tables before switching to interpolated filter tables. 1048576 is the default. -} pattern AUDIO_RESAMPLER_OPT_FILTER_MODE_THRESHOLD = "GstAudioResampler.filter-mode-threshold" :: T.Text {- | GST_TYPE_AUDIO_RESAMPLER_FILTER_MODE: how the filter tables should be constructed. GST_AUDIO_RESAMPLER_FILTER_MODE_AUTO is the default. -} pattern AUDIO_RESAMPLER_OPT_FILTER_MODE = "GstAudioResampler.filter-mode" :: T.Text {- | GST_TYPE_AUDIO_RESAMPLER_INTERPOLATION: how the filter coeficients should be interpolated. GST_AUDIO_RESAMPLER_FILTER_INTERPOLATION_CUBIC is default. -} pattern AUDIO_RESAMPLER_OPT_FILTER_INTERPOLATION = "GstAudioResampler.filter-interpolation" :: T.Text {- | G_TYPE_DOUBLE, Cutoff parameter for the filter. 0.940 is the default. -} pattern AUDIO_RESAMPLER_OPT_CUTOFF = "GstAudioResampler.cutoff" :: T.Text {- | G_TYPE_DOUBLE, C parameter of the cubic filter. Values between 0.0 and 2.0 are accepted. 0.0 is the default. See 'GI.GstAudio.Constants.AUDIO_RESAMPLER_OPT_CUBIC_B' for some more common values -} pattern AUDIO_RESAMPLER_OPT_CUBIC_C = "GstAudioResampler.cubic-c" :: T.Text {- | G_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 -} pattern AUDIO_RESAMPLER_OPT_CUBIC_B = "GstAudioResampler.cubic-b" :: T.Text {- | Maximum range of allowed sample rates, for use in template caps strings. -} pattern AUDIO_RATE_RANGE = "(int) [ 1, max ]" :: T.Text {- | List of all audio formats, for use in template caps strings. -} pattern 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 }" :: T.Text {- | the name of the templates for the source pad -} pattern AUDIO_ENCODER_SRC_NAME = "src" :: T.Text {- | the name of the templates for the sink pad -} pattern AUDIO_ENCODER_SINK_NAME = "sink" :: T.Text {- | Standard sampling rate used in consumer audio. -} pattern AUDIO_DEF_RATE = 44100 :: Int32 {- | Standard format used in consumer audio. -} pattern AUDIO_DEF_FORMAT = "S16LE" :: T.Text {- | Standard number of channels used in consumer audio. -} pattern AUDIO_DEF_CHANNELS = 2 :: Int32 {- | The name of the templates for the source pad. -} pattern AUDIO_DECODER_SRC_NAME = "src" :: T.Text {- | The name of the templates for the sink pad. -} pattern AUDIO_DECODER_SINK_NAME = "sink" :: T.Text {- | Default maximum number of errors tolerated before signaling error. -} pattern AUDIO_DECODER_MAX_ERRORS = 10 :: Int32 {- | @/GST_TYPE_AUDIO_RESAMPLER_METHOD/@, The resampler method to use when changing sample rates. Default is @/GST_AUDIO_RESAMPLER_METHOD_BLACKMAN_NUTTALL/@. -} pattern AUDIO_CONVERTER_OPT_RESAMPLER_METHOD = "GstAudioConverter.resampler-method" :: T.Text {- | @/G_TYPE_UINT/@, The quantization amount. Components will be quantized to multiples of this value. Default is 1 -} pattern AUDIO_CONVERTER_OPT_QUANTIZATION = "GstAudioConverter.quantization" :: T.Text {- | @/GST_TYPE_AUDIO_NOISE_SHAPING_METHOD/@, The noise shaping method to use to mask noise from quantization errors. Default is @/GST_AUDIO_NOISE_SHAPING_NONE/@. -} pattern AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD = "GstAudioConverter.noise-shaping-method" :: T.Text {- | @/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); -} pattern AUDIO_CONVERTER_OPT_MIX_MATRIX = "GstAudioConverter.mix-matrix" :: T.Text {- | @/GST_TYPE_AUDIO_DITHER_METHOD/@, The dither method to use when changing bit depth. Default is @/GST_AUDIO_DITHER_NONE/@. -} pattern AUDIO_CONVERTER_OPT_DITHER_METHOD = "GstAudioConverter.dither-method" :: T.Text {- | Maximum range of allowed channels, for use in template caps strings. -} pattern AUDIO_CHANNELS_RANGE = "(int) [ 1, max ]" :: T.Text