gi-gstaudio-1.0.17: GI/GstAudio/Flags.hs
{- |
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.Flags
(
-- * Flags
-- ** AudioChannelMixerFlags #flag:AudioChannelMixerFlags#
AudioChannelMixerFlags(..) ,
-- ** AudioConverterFlags #flag:AudioConverterFlags#
AudioConverterFlags(..) ,
-- ** AudioFlags #flag:AudioFlags#
AudioFlags(..) ,
-- ** AudioFormatFlags #flag:AudioFormatFlags#
AudioFormatFlags(..) ,
-- ** AudioPackFlags #flag:AudioPackFlags#
AudioPackFlags(..) ,
-- ** AudioQuantizeFlags #flag:AudioQuantizeFlags#
AudioQuantizeFlags(..) ,
-- ** AudioResamplerFlags #flag:AudioResamplerFlags#
AudioResamplerFlags(..) ,
) 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
-- Flags AudioResamplerFlags
{- |
Different resampler flags.
-}
data AudioResamplerFlags =
AudioResamplerFlagsNone
{- ^
no flags
-}
| AudioResamplerFlagsNonInterleavedIn
{- ^
input samples are non-interleaved.
an array of blocks of samples, one for each channel, should be passed to the
resample function.
-}
| AudioResamplerFlagsNonInterleavedOut
{- ^
output samples are non-interleaved.
an array of blocks of samples, one for each channel, should be passed to the
resample function.
-}
| AudioResamplerFlagsVariableRate
{- ^
optimize for dynamic updates of the sample
rates with 'GI.GstAudio.Structs.AudioResampler.audioResamplerUpdate'. This will select an interpolating filter
when @/GST_AUDIO_RESAMPLER_FILTER_MODE_AUTO/@ is configured.
-}
| AnotherAudioResamplerFlags Int
-- ^ Catch-all for unknown values
deriving (Show, Eq)
instance P.Enum AudioResamplerFlags where
fromEnum AudioResamplerFlagsNone = 0
fromEnum AudioResamplerFlagsNonInterleavedIn = 1
fromEnum AudioResamplerFlagsNonInterleavedOut = 2
fromEnum AudioResamplerFlagsVariableRate = 4
fromEnum (AnotherAudioResamplerFlags k) = k
toEnum 0 = AudioResamplerFlagsNone
toEnum 1 = AudioResamplerFlagsNonInterleavedIn
toEnum 2 = AudioResamplerFlagsNonInterleavedOut
toEnum 4 = AudioResamplerFlagsVariableRate
toEnum k = AnotherAudioResamplerFlags k
instance P.Ord AudioResamplerFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "gst_audio_resampler_flags_get_type" c_gst_audio_resampler_flags_get_type ::
IO GType
instance BoxedFlags AudioResamplerFlags where
boxedFlagsType _ = c_gst_audio_resampler_flags_get_type
instance IsGFlag AudioResamplerFlags
-- Flags AudioQuantizeFlags
{- |
Extra flags that can be passed to @/gst_audio_quantize_new()/@
-}
data AudioQuantizeFlags =
AudioQuantizeFlagsNone
{- ^
no flags
-}
| AudioQuantizeFlagsNonInterleaved
{- ^
samples are non-interleaved
-}
| AnotherAudioQuantizeFlags Int
-- ^ Catch-all for unknown values
deriving (Show, Eq)
instance P.Enum AudioQuantizeFlags where
fromEnum AudioQuantizeFlagsNone = 0
fromEnum AudioQuantizeFlagsNonInterleaved = 1
fromEnum (AnotherAudioQuantizeFlags k) = k
toEnum 0 = AudioQuantizeFlagsNone
toEnum 1 = AudioQuantizeFlagsNonInterleaved
toEnum k = AnotherAudioQuantizeFlags k
instance P.Ord AudioQuantizeFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "gst_audio_quantize_flags_get_type" c_gst_audio_quantize_flags_get_type ::
IO GType
instance BoxedFlags AudioQuantizeFlags where
boxedFlagsType _ = c_gst_audio_quantize_flags_get_type
instance IsGFlag AudioQuantizeFlags
-- Flags AudioPackFlags
{- |
The different flags that can be used when packing and unpacking.
-}
data AudioPackFlags =
AudioPackFlagsNone
{- ^
No flag
-}
| AudioPackFlagsTruncateRange
{- ^
When the source has a smaller depth
than the target format, set the least significant bits of the target
to 0. This is likely sightly faster but less accurate. When this flag
is not specified, the most significant bits of the source are duplicated
in the least significant bits of the destination.
-}
| AnotherAudioPackFlags Int
-- ^ Catch-all for unknown values
deriving (Show, Eq)
instance P.Enum AudioPackFlags where
fromEnum AudioPackFlagsNone = 0
fromEnum AudioPackFlagsTruncateRange = 1
fromEnum (AnotherAudioPackFlags k) = k
toEnum 0 = AudioPackFlagsNone
toEnum 1 = AudioPackFlagsTruncateRange
toEnum k = AnotherAudioPackFlags k
instance P.Ord AudioPackFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "gst_audio_pack_flags_get_type" c_gst_audio_pack_flags_get_type ::
IO GType
instance BoxedFlags AudioPackFlags where
boxedFlagsType _ = c_gst_audio_pack_flags_get_type
instance IsGFlag AudioPackFlags
-- Flags AudioFormatFlags
{- |
The different audio flags that a format info can have.
-}
data AudioFormatFlags =
AudioFormatFlagsInteger
{- ^
integer samples
-}
| AudioFormatFlagsFloat
{- ^
float samples
-}
| AudioFormatFlagsSigned
{- ^
signed samples
-}
| AudioFormatFlagsComplex
{- ^
complex layout
-}
| AudioFormatFlagsUnpack
{- ^
the format can be used in
'GI.GstAudio.Callbacks.AudioFormatUnpack' and 'GI.GstAudio.Callbacks.AudioFormatPack' functions
-}
| AnotherAudioFormatFlags Int
-- ^ Catch-all for unknown values
deriving (Show, Eq)
instance P.Enum AudioFormatFlags where
fromEnum AudioFormatFlagsInteger = 1
fromEnum AudioFormatFlagsFloat = 2
fromEnum AudioFormatFlagsSigned = 4
fromEnum AudioFormatFlagsComplex = 16
fromEnum AudioFormatFlagsUnpack = 32
fromEnum (AnotherAudioFormatFlags k) = k
toEnum 1 = AudioFormatFlagsInteger
toEnum 2 = AudioFormatFlagsFloat
toEnum 4 = AudioFormatFlagsSigned
toEnum 16 = AudioFormatFlagsComplex
toEnum 32 = AudioFormatFlagsUnpack
toEnum k = AnotherAudioFormatFlags k
instance P.Ord AudioFormatFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "gst_audio_format_flags_get_type" c_gst_audio_format_flags_get_type ::
IO GType
instance BoxedFlags AudioFormatFlags where
boxedFlagsType _ = c_gst_audio_format_flags_get_type
instance IsGFlag AudioFormatFlags
-- Flags AudioFlags
{- |
Extra audio flags
-}
data AudioFlags =
AudioFlagsNone
{- ^
no valid flag
-}
| AudioFlagsUnpositioned
{- ^
the position array explicitly
contains unpositioned channels.
-}
| AnotherAudioFlags Int
-- ^ Catch-all for unknown values
deriving (Show, Eq)
instance P.Enum AudioFlags where
fromEnum AudioFlagsNone = 0
fromEnum AudioFlagsUnpositioned = 1
fromEnum (AnotherAudioFlags k) = k
toEnum 0 = AudioFlagsNone
toEnum 1 = AudioFlagsUnpositioned
toEnum k = AnotherAudioFlags k
instance P.Ord AudioFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "gst_audio_flags_get_type" c_gst_audio_flags_get_type ::
IO GType
instance BoxedFlags AudioFlags where
boxedFlagsType _ = c_gst_audio_flags_get_type
instance IsGFlag AudioFlags
-- Flags AudioConverterFlags
{- |
Extra flags passed to 'GI.GstAudio.Structs.AudioConverter.audioConverterNew' and 'GI.GstAudio.Structs.AudioConverter.audioConverterSamples'.
-}
data AudioConverterFlags =
AudioConverterFlagsNone
{- ^
no flag
-}
| AudioConverterFlagsInWritable
{- ^
the input sample arrays are writable and can be
used as temporary storage during conversion.
-}
| AudioConverterFlagsVariableRate
{- ^
allow arbitrary rate updates with
'GI.GstAudio.Structs.AudioConverter.audioConverterUpdateConfig'.
-}
| AnotherAudioConverterFlags Int
-- ^ Catch-all for unknown values
deriving (Show, Eq)
instance P.Enum AudioConverterFlags where
fromEnum AudioConverterFlagsNone = 0
fromEnum AudioConverterFlagsInWritable = 1
fromEnum AudioConverterFlagsVariableRate = 2
fromEnum (AnotherAudioConverterFlags k) = k
toEnum 0 = AudioConverterFlagsNone
toEnum 1 = AudioConverterFlagsInWritable
toEnum 2 = AudioConverterFlagsVariableRate
toEnum k = AnotherAudioConverterFlags k
instance P.Ord AudioConverterFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "gst_audio_converter_flags_get_type" c_gst_audio_converter_flags_get_type ::
IO GType
instance BoxedFlags AudioConverterFlags where
boxedFlagsType _ = c_gst_audio_converter_flags_get_type
instance IsGFlag AudioConverterFlags
-- Flags AudioChannelMixerFlags
{- |
Flags passed to @/gst_audio_channel_mixer_new()/@
-}
data AudioChannelMixerFlags =
AudioChannelMixerFlagsNone
{- ^
no flag
-}
| AudioChannelMixerFlagsNonInterleavedIn
{- ^
input channels are not interleaved
-}
| AudioChannelMixerFlagsNonInterleavedOut
{- ^
output channels are not interleaved
-}
| AudioChannelMixerFlagsUnpositionedIn
{- ^
input channels are explicitly unpositioned
-}
| AudioChannelMixerFlagsUnpositionedOut
{- ^
output channels are explicitly unpositioned
-}
| AnotherAudioChannelMixerFlags Int
-- ^ Catch-all for unknown values
deriving (Show, Eq)
instance P.Enum AudioChannelMixerFlags where
fromEnum AudioChannelMixerFlagsNone = 0
fromEnum AudioChannelMixerFlagsNonInterleavedIn = 1
fromEnum AudioChannelMixerFlagsNonInterleavedOut = 2
fromEnum AudioChannelMixerFlagsUnpositionedIn = 4
fromEnum AudioChannelMixerFlagsUnpositionedOut = 8
fromEnum (AnotherAudioChannelMixerFlags k) = k
toEnum 0 = AudioChannelMixerFlagsNone
toEnum 1 = AudioChannelMixerFlagsNonInterleavedIn
toEnum 2 = AudioChannelMixerFlagsNonInterleavedOut
toEnum 4 = AudioChannelMixerFlagsUnpositionedIn
toEnum 8 = AudioChannelMixerFlagsUnpositionedOut
toEnum k = AnotherAudioChannelMixerFlags k
instance P.Ord AudioChannelMixerFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "gst_audio_channel_mixer_flags_get_type" c_gst_audio_channel_mixer_flags_get_type ::
IO GType
instance BoxedFlags AudioChannelMixerFlags where
boxedFlagsType _ = c_gst_audio_channel_mixer_flags_get_type
instance IsGFlag AudioChannelMixerFlags