{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' specific to audio streams. -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GstPbutils.Objects.DiscovererAudioInfo ( -- * Exported types DiscovererAudioInfo(..) , IsDiscovererAudioInfo , toDiscovererAudioInfo , noDiscovererAudioInfo , -- * Methods -- ** getBitrate #method:getBitrate# #if ENABLE_OVERLOADING DiscovererAudioInfoGetBitrateMethodInfo , #endif discovererAudioInfoGetBitrate , -- ** getChannelMask #method:getChannelMask# #if ENABLE_OVERLOADING DiscovererAudioInfoGetChannelMaskMethodInfo, #endif discovererAudioInfoGetChannelMask , -- ** getChannels #method:getChannels# #if ENABLE_OVERLOADING DiscovererAudioInfoGetChannelsMethodInfo, #endif discovererAudioInfoGetChannels , -- ** getDepth #method:getDepth# #if ENABLE_OVERLOADING DiscovererAudioInfoGetDepthMethodInfo , #endif discovererAudioInfoGetDepth , -- ** getLanguage #method:getLanguage# #if ENABLE_OVERLOADING DiscovererAudioInfoGetLanguageMethodInfo, #endif discovererAudioInfoGetLanguage , -- ** getMaxBitrate #method:getMaxBitrate# #if ENABLE_OVERLOADING DiscovererAudioInfoGetMaxBitrateMethodInfo, #endif discovererAudioInfoGetMaxBitrate , -- ** getSampleRate #method:getSampleRate# #if ENABLE_OVERLOADING DiscovererAudioInfoGetSampleRateMethodInfo, #endif discovererAudioInfoGetSampleRate , ) 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 import qualified GI.GObject.Objects.Object as GObject.Object import {-# SOURCE #-} qualified GI.GstPbutils.Objects.DiscovererStreamInfo as GstPbutils.DiscovererStreamInfo -- | Memory-managed wrapper type. newtype DiscovererAudioInfo = DiscovererAudioInfo (ManagedPtr DiscovererAudioInfo) foreign import ccall "gst_discoverer_audio_info_get_type" c_gst_discoverer_audio_info_get_type :: IO GType instance GObject DiscovererAudioInfo where gobjectType = c_gst_discoverer_audio_info_get_type -- | Type class for types which can be safely cast to `DiscovererAudioInfo`, for instance with `toDiscovererAudioInfo`. class (GObject o, O.IsDescendantOf DiscovererAudioInfo o) => IsDiscovererAudioInfo o instance (GObject o, O.IsDescendantOf DiscovererAudioInfo o) => IsDiscovererAudioInfo o instance O.HasParentTypes DiscovererAudioInfo type instance O.ParentTypes DiscovererAudioInfo = '[GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo, GObject.Object.Object] -- | Cast to `DiscovererAudioInfo`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`. toDiscovererAudioInfo :: (MonadIO m, IsDiscovererAudioInfo o) => o -> m DiscovererAudioInfo toDiscovererAudioInfo = liftIO . unsafeCastTo DiscovererAudioInfo -- | A convenience alias for `Nothing` :: `Maybe` `DiscovererAudioInfo`. noDiscovererAudioInfo :: Maybe DiscovererAudioInfo noDiscovererAudioInfo = Nothing #if ENABLE_OVERLOADING type family ResolveDiscovererAudioInfoMethod (t :: Symbol) (o :: *) :: * where ResolveDiscovererAudioInfoMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveDiscovererAudioInfoMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveDiscovererAudioInfoMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolveDiscovererAudioInfoMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolveDiscovererAudioInfoMethod "getv" o = GObject.Object.ObjectGetvMethodInfo ResolveDiscovererAudioInfoMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolveDiscovererAudioInfoMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo ResolveDiscovererAudioInfoMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo ResolveDiscovererAudioInfoMethod "ref" o = GObject.Object.ObjectRefMethodInfo ResolveDiscovererAudioInfoMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo ResolveDiscovererAudioInfoMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo ResolveDiscovererAudioInfoMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolveDiscovererAudioInfoMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolveDiscovererAudioInfoMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolveDiscovererAudioInfoMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo ResolveDiscovererAudioInfoMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolveDiscovererAudioInfoMethod "getBitrate" o = DiscovererAudioInfoGetBitrateMethodInfo ResolveDiscovererAudioInfoMethod "getCaps" o = GstPbutils.DiscovererStreamInfo.DiscovererStreamInfoGetCapsMethodInfo ResolveDiscovererAudioInfoMethod "getChannelMask" o = DiscovererAudioInfoGetChannelMaskMethodInfo ResolveDiscovererAudioInfoMethod "getChannels" o = DiscovererAudioInfoGetChannelsMethodInfo ResolveDiscovererAudioInfoMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolveDiscovererAudioInfoMethod "getDepth" o = DiscovererAudioInfoGetDepthMethodInfo ResolveDiscovererAudioInfoMethod "getLanguage" o = DiscovererAudioInfoGetLanguageMethodInfo ResolveDiscovererAudioInfoMethod "getMaxBitrate" o = DiscovererAudioInfoGetMaxBitrateMethodInfo ResolveDiscovererAudioInfoMethod "getMisc" o = GstPbutils.DiscovererStreamInfo.DiscovererStreamInfoGetMiscMethodInfo ResolveDiscovererAudioInfoMethod "getNext" o = GstPbutils.DiscovererStreamInfo.DiscovererStreamInfoGetNextMethodInfo ResolveDiscovererAudioInfoMethod "getPrevious" o = GstPbutils.DiscovererStreamInfo.DiscovererStreamInfoGetPreviousMethodInfo ResolveDiscovererAudioInfoMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolveDiscovererAudioInfoMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolveDiscovererAudioInfoMethod "getSampleRate" o = DiscovererAudioInfoGetSampleRateMethodInfo ResolveDiscovererAudioInfoMethod "getStreamId" o = GstPbutils.DiscovererStreamInfo.DiscovererStreamInfoGetStreamIdMethodInfo ResolveDiscovererAudioInfoMethod "getStreamTypeNick" o = GstPbutils.DiscovererStreamInfo.DiscovererStreamInfoGetStreamTypeNickMethodInfo ResolveDiscovererAudioInfoMethod "getTags" o = GstPbutils.DiscovererStreamInfo.DiscovererStreamInfoGetTagsMethodInfo ResolveDiscovererAudioInfoMethod "getToc" o = GstPbutils.DiscovererStreamInfo.DiscovererStreamInfoGetTocMethodInfo ResolveDiscovererAudioInfoMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolveDiscovererAudioInfoMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo ResolveDiscovererAudioInfoMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveDiscovererAudioInfoMethod t DiscovererAudioInfo, O.MethodInfo info DiscovererAudioInfo p) => OL.IsLabel t (DiscovererAudioInfo -> p) where #if MIN_VERSION_base(4,10,0) fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #else fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #endif #endif #if ENABLE_OVERLOADING instance O.HasAttributeList DiscovererAudioInfo type instance O.AttributeList DiscovererAudioInfo = DiscovererAudioInfoAttributeList type DiscovererAudioInfoAttributeList = ('[ ] :: [(Symbol, *)]) #endif #if ENABLE_OVERLOADING #endif #if ENABLE_OVERLOADING type instance O.SignalList DiscovererAudioInfo = DiscovererAudioInfoSignalList type DiscovererAudioInfoSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)]) #endif -- method DiscovererAudioInfo::get_bitrate -- method type : OrdinaryMethod -- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererAudioInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_discoverer_audio_info_get_bitrate" gst_discoverer_audio_info_get_bitrate :: Ptr DiscovererAudioInfo -> -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}) IO Word32 {- | /No description available in the introspection data./ -} discovererAudioInfoGetBitrate :: (B.CallStack.HasCallStack, MonadIO m, IsDiscovererAudioInfo a) => a {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' -} -> m Word32 {- ^ __Returns:__ the average or nominal bitrate of the stream in bits\/second. -} discovererAudioInfoGetBitrate info = liftIO $ do info' <- unsafeManagedPtrCastPtr info result <- gst_discoverer_audio_info_get_bitrate info' touchManagedPtr info return result #if ENABLE_OVERLOADING data DiscovererAudioInfoGetBitrateMethodInfo instance (signature ~ (m Word32), MonadIO m, IsDiscovererAudioInfo a) => O.MethodInfo DiscovererAudioInfoGetBitrateMethodInfo a signature where overloadedMethod _ = discovererAudioInfoGetBitrate #endif -- method DiscovererAudioInfo::get_channel_mask -- method type : OrdinaryMethod -- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererAudioInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_discoverer_audio_info_get_channel_mask" gst_discoverer_audio_info_get_channel_mask :: Ptr DiscovererAudioInfo -> -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}) IO Word64 {- | /No description available in the introspection data./ /Since: 1.14/ -} discovererAudioInfoGetChannelMask :: (B.CallStack.HasCallStack, MonadIO m, IsDiscovererAudioInfo a) => a {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' -} -> m Word64 {- ^ __Returns:__ the channel-mask of the stream, refer to 'GI.GstAudio.Functions.audioChannelPositionsFromMask' for more information. -} discovererAudioInfoGetChannelMask info = liftIO $ do info' <- unsafeManagedPtrCastPtr info result <- gst_discoverer_audio_info_get_channel_mask info' touchManagedPtr info return result #if ENABLE_OVERLOADING data DiscovererAudioInfoGetChannelMaskMethodInfo instance (signature ~ (m Word64), MonadIO m, IsDiscovererAudioInfo a) => O.MethodInfo DiscovererAudioInfoGetChannelMaskMethodInfo a signature where overloadedMethod _ = discovererAudioInfoGetChannelMask #endif -- method DiscovererAudioInfo::get_channels -- method type : OrdinaryMethod -- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererAudioInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_discoverer_audio_info_get_channels" gst_discoverer_audio_info_get_channels :: Ptr DiscovererAudioInfo -> -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}) IO Word32 {- | /No description available in the introspection data./ -} discovererAudioInfoGetChannels :: (B.CallStack.HasCallStack, MonadIO m, IsDiscovererAudioInfo a) => a {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' -} -> m Word32 {- ^ __Returns:__ the number of channels in the stream. -} discovererAudioInfoGetChannels info = liftIO $ do info' <- unsafeManagedPtrCastPtr info result <- gst_discoverer_audio_info_get_channels info' touchManagedPtr info return result #if ENABLE_OVERLOADING data DiscovererAudioInfoGetChannelsMethodInfo instance (signature ~ (m Word32), MonadIO m, IsDiscovererAudioInfo a) => O.MethodInfo DiscovererAudioInfoGetChannelsMethodInfo a signature where overloadedMethod _ = discovererAudioInfoGetChannels #endif -- method DiscovererAudioInfo::get_depth -- method type : OrdinaryMethod -- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererAudioInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_discoverer_audio_info_get_depth" gst_discoverer_audio_info_get_depth :: Ptr DiscovererAudioInfo -> -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}) IO Word32 {- | /No description available in the introspection data./ -} discovererAudioInfoGetDepth :: (B.CallStack.HasCallStack, MonadIO m, IsDiscovererAudioInfo a) => a {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' -} -> m Word32 {- ^ __Returns:__ the number of bits used per sample in each channel. -} discovererAudioInfoGetDepth info = liftIO $ do info' <- unsafeManagedPtrCastPtr info result <- gst_discoverer_audio_info_get_depth info' touchManagedPtr info return result #if ENABLE_OVERLOADING data DiscovererAudioInfoGetDepthMethodInfo instance (signature ~ (m Word32), MonadIO m, IsDiscovererAudioInfo a) => O.MethodInfo DiscovererAudioInfoGetDepthMethodInfo a signature where overloadedMethod _ = discovererAudioInfoGetDepth #endif -- method DiscovererAudioInfo::get_language -- method type : OrdinaryMethod -- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererAudioInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_discoverer_audio_info_get_language" gst_discoverer_audio_info_get_language :: Ptr DiscovererAudioInfo -> -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}) IO CString {- | /No description available in the introspection data./ -} discovererAudioInfoGetLanguage :: (B.CallStack.HasCallStack, MonadIO m, IsDiscovererAudioInfo a) => a {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' -} -> m T.Text {- ^ __Returns:__ the language of the stream, or NULL if unknown. -} discovererAudioInfoGetLanguage info = liftIO $ do info' <- unsafeManagedPtrCastPtr info result <- gst_discoverer_audio_info_get_language info' checkUnexpectedReturnNULL "discovererAudioInfoGetLanguage" result result' <- cstringToText result touchManagedPtr info return result' #if ENABLE_OVERLOADING data DiscovererAudioInfoGetLanguageMethodInfo instance (signature ~ (m T.Text), MonadIO m, IsDiscovererAudioInfo a) => O.MethodInfo DiscovererAudioInfoGetLanguageMethodInfo a signature where overloadedMethod _ = discovererAudioInfoGetLanguage #endif -- method DiscovererAudioInfo::get_max_bitrate -- method type : OrdinaryMethod -- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererAudioInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_discoverer_audio_info_get_max_bitrate" gst_discoverer_audio_info_get_max_bitrate :: Ptr DiscovererAudioInfo -> -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}) IO Word32 {- | /No description available in the introspection data./ -} discovererAudioInfoGetMaxBitrate :: (B.CallStack.HasCallStack, MonadIO m, IsDiscovererAudioInfo a) => a {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' -} -> m Word32 {- ^ __Returns:__ the maximum bitrate of the stream in bits\/second. -} discovererAudioInfoGetMaxBitrate info = liftIO $ do info' <- unsafeManagedPtrCastPtr info result <- gst_discoverer_audio_info_get_max_bitrate info' touchManagedPtr info return result #if ENABLE_OVERLOADING data DiscovererAudioInfoGetMaxBitrateMethodInfo instance (signature ~ (m Word32), MonadIO m, IsDiscovererAudioInfo a) => O.MethodInfo DiscovererAudioInfoGetMaxBitrateMethodInfo a signature where overloadedMethod _ = discovererAudioInfoGetMaxBitrate #endif -- method DiscovererAudioInfo::get_sample_rate -- method type : OrdinaryMethod -- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererAudioInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_discoverer_audio_info_get_sample_rate" gst_discoverer_audio_info_get_sample_rate :: Ptr DiscovererAudioInfo -> -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererAudioInfo"}) IO Word32 {- | /No description available in the introspection data./ -} discovererAudioInfoGetSampleRate :: (B.CallStack.HasCallStack, MonadIO m, IsDiscovererAudioInfo a) => a {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' -} -> m Word32 {- ^ __Returns:__ the sample rate of the stream in Hertz. -} discovererAudioInfoGetSampleRate info = liftIO $ do info' <- unsafeManagedPtrCastPtr info result <- gst_discoverer_audio_info_get_sample_rate info' touchManagedPtr info return result #if ENABLE_OVERLOADING data DiscovererAudioInfoGetSampleRateMethodInfo instance (signature ~ (m Word32), MonadIO m, IsDiscovererAudioInfo a) => O.MethodInfo DiscovererAudioInfoGetSampleRateMethodInfo a signature where overloadedMethod _ = discovererAudioInfoGetSampleRate #endif