{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)

Base structure for information concerning a media stream. Depending on the
stream type, one can find more media-specific information in
'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo', 'GI.GstPbutils.Objects.DiscovererVideoInfo.DiscovererVideoInfo', and
'GI.GstPbutils.Objects.DiscovererContainerInfo.DiscovererContainerInfo'.

The 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' represents the topology of the stream. Siblings
can be iterated over with 'GI.GstPbutils.Objects.DiscovererStreamInfo.discovererStreamInfoGetNext' and
'GI.GstPbutils.Objects.DiscovererStreamInfo.discovererStreamInfoGetPrevious'. Children (sub-streams) of a
stream can be accessed using the 'GI.GstPbutils.Objects.DiscovererContainerInfo.DiscovererContainerInfo' API.

As a simple example, if you run 'GI.GstPbutils.Objects.Discoverer.Discoverer' on an AVI file with one audio
and one video stream, you will get a 'GI.GstPbutils.Objects.DiscovererContainerInfo.DiscovererContainerInfo'
corresponding to the AVI container, which in turn will have a
'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' sub-stream and a 'GI.GstPbutils.Objects.DiscovererVideoInfo.DiscovererVideoInfo' sub-stream
for the audio and video streams respectively.
-}

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.GstPbutils.Objects.DiscovererStreamInfo
    (

-- * Exported types
    DiscovererStreamInfo(..)                ,
    IsDiscovererStreamInfo                  ,
    toDiscovererStreamInfo                  ,
    noDiscovererStreamInfo                  ,


 -- * Methods
-- ** getCaps #method:getCaps#

#if ENABLE_OVERLOADING
    DiscovererStreamInfoGetCapsMethodInfo   ,
#endif
    discovererStreamInfoGetCaps             ,


-- ** getMisc #method:getMisc#

#if ENABLE_OVERLOADING
    DiscovererStreamInfoGetMiscMethodInfo   ,
#endif
    discovererStreamInfoGetMisc             ,


-- ** getNext #method:getNext#

#if ENABLE_OVERLOADING
    DiscovererStreamInfoGetNextMethodInfo   ,
#endif
    discovererStreamInfoGetNext             ,


-- ** getPrevious #method:getPrevious#

#if ENABLE_OVERLOADING
    DiscovererStreamInfoGetPreviousMethodInfo,
#endif
    discovererStreamInfoGetPrevious         ,


-- ** getStreamId #method:getStreamId#

#if ENABLE_OVERLOADING
    DiscovererStreamInfoGetStreamIdMethodInfo,
#endif
    discovererStreamInfoGetStreamId         ,


-- ** getStreamTypeNick #method:getStreamTypeNick#

#if ENABLE_OVERLOADING
    DiscovererStreamInfoGetStreamTypeNickMethodInfo,
#endif
    discovererStreamInfoGetStreamTypeNick   ,


-- ** getTags #method:getTags#

#if ENABLE_OVERLOADING
    DiscovererStreamInfoGetTagsMethodInfo   ,
#endif
    discovererStreamInfoGetTags             ,


-- ** getToc #method:getToc#

#if ENABLE_OVERLOADING
    DiscovererStreamInfoGetTocMethodInfo    ,
#endif
    discovererStreamInfoGetToc              ,


-- ** listFree #method:listFree#

    discovererStreamInfoListFree            ,




    ) 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 qualified GI.Gst.Structs.Caps as Gst.Caps
import qualified GI.Gst.Structs.Structure as Gst.Structure
import qualified GI.Gst.Structs.TagList as Gst.TagList
import qualified GI.Gst.Structs.Toc as Gst.Toc

-- | Memory-managed wrapper type.
newtype DiscovererStreamInfo = DiscovererStreamInfo (ManagedPtr DiscovererStreamInfo)
foreign import ccall "gst_discoverer_stream_info_get_type"
    c_gst_discoverer_stream_info_get_type :: IO GType

instance GObject DiscovererStreamInfo where
    gobjectType = c_gst_discoverer_stream_info_get_type


-- | Type class for types which can be safely cast to `DiscovererStreamInfo`, for instance with `toDiscovererStreamInfo`.
class (GObject o, O.IsDescendantOf DiscovererStreamInfo o) => IsDiscovererStreamInfo o
instance (GObject o, O.IsDescendantOf DiscovererStreamInfo o) => IsDiscovererStreamInfo o

instance O.HasParentTypes DiscovererStreamInfo
type instance O.ParentTypes DiscovererStreamInfo = '[GObject.Object.Object]

-- | Cast to `DiscovererStreamInfo`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toDiscovererStreamInfo :: (MonadIO m, IsDiscovererStreamInfo o) => o -> m DiscovererStreamInfo
toDiscovererStreamInfo = liftIO . unsafeCastTo DiscovererStreamInfo

-- | A convenience alias for `Nothing` :: `Maybe` `DiscovererStreamInfo`.
noDiscovererStreamInfo :: Maybe DiscovererStreamInfo
noDiscovererStreamInfo = Nothing

#if ENABLE_OVERLOADING
type family ResolveDiscovererStreamInfoMethod (t :: Symbol) (o :: *) :: * where
    ResolveDiscovererStreamInfoMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDiscovererStreamInfoMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDiscovererStreamInfoMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDiscovererStreamInfoMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDiscovererStreamInfoMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveDiscovererStreamInfoMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDiscovererStreamInfoMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDiscovererStreamInfoMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDiscovererStreamInfoMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDiscovererStreamInfoMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDiscovererStreamInfoMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDiscovererStreamInfoMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDiscovererStreamInfoMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDiscovererStreamInfoMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDiscovererStreamInfoMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDiscovererStreamInfoMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDiscovererStreamInfoMethod "getCaps" o = DiscovererStreamInfoGetCapsMethodInfo
    ResolveDiscovererStreamInfoMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDiscovererStreamInfoMethod "getMisc" o = DiscovererStreamInfoGetMiscMethodInfo
    ResolveDiscovererStreamInfoMethod "getNext" o = DiscovererStreamInfoGetNextMethodInfo
    ResolveDiscovererStreamInfoMethod "getPrevious" o = DiscovererStreamInfoGetPreviousMethodInfo
    ResolveDiscovererStreamInfoMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDiscovererStreamInfoMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDiscovererStreamInfoMethod "getStreamId" o = DiscovererStreamInfoGetStreamIdMethodInfo
    ResolveDiscovererStreamInfoMethod "getStreamTypeNick" o = DiscovererStreamInfoGetStreamTypeNickMethodInfo
    ResolveDiscovererStreamInfoMethod "getTags" o = DiscovererStreamInfoGetTagsMethodInfo
    ResolveDiscovererStreamInfoMethod "getToc" o = DiscovererStreamInfoGetTocMethodInfo
    ResolveDiscovererStreamInfoMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDiscovererStreamInfoMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveDiscovererStreamInfoMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDiscovererStreamInfoMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveDiscovererStreamInfoMethod t DiscovererStreamInfo, O.MethodInfo info DiscovererStreamInfo p) => OL.IsLabel t (DiscovererStreamInfo -> 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 DiscovererStreamInfo
type instance O.AttributeList DiscovererStreamInfo = DiscovererStreamInfoAttributeList
type DiscovererStreamInfoAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
#endif

#if ENABLE_OVERLOADING
type instance O.SignalList DiscovererStreamInfo = DiscovererStreamInfoSignalList
type DiscovererStreamInfoSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method DiscovererStreamInfo::get_caps
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererStreamInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gst", name = "Caps"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_discoverer_stream_info_get_caps" gst_discoverer_stream_info_get_caps ::
    Ptr DiscovererStreamInfo ->             -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})
    IO (Ptr Gst.Caps.Caps)

{- |
/No description available in the introspection data./
-}
discovererStreamInfoGetCaps ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    a
    {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m Gst.Caps.Caps
    {- ^ __Returns:__ the 'GI.Gst.Structs.Caps.Caps' of the stream. Unref with
@/gst_caps_unref/@ after usage. -}
discovererStreamInfoGetCaps info = liftIO $ do
    info' <- unsafeManagedPtrCastPtr info
    result <- gst_discoverer_stream_info_get_caps info'
    checkUnexpectedReturnNULL "discovererStreamInfoGetCaps" result
    result' <- (wrapBoxed Gst.Caps.Caps) result
    touchManagedPtr info
    return result'

#if ENABLE_OVERLOADING
data DiscovererStreamInfoGetCapsMethodInfo
instance (signature ~ (m Gst.Caps.Caps), MonadIO m, IsDiscovererStreamInfo a) => O.MethodInfo DiscovererStreamInfoGetCapsMethodInfo a signature where
    overloadedMethod _ = discovererStreamInfoGetCaps

#endif

-- method DiscovererStreamInfo::get_misc
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererStreamInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gst", name = "Structure"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_discoverer_stream_info_get_misc" gst_discoverer_stream_info_get_misc ::
    Ptr DiscovererStreamInfo ->             -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})
    IO (Ptr Gst.Structure.Structure)

{-# DEPRECATED discovererStreamInfoGetMisc ["This functions is deprecated since version 1.4, use","@/gst_discoverer_info_get_missing_elements_installer_details/@"] #-}
{- |
/No description available in the introspection data./
-}
discovererStreamInfoGetMisc ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    a
    {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m Gst.Structure.Structure
    {- ^ __Returns:__ additional information regarding the stream (for
example codec version, profile, etc..). If you wish to use the 'GI.Gst.Structs.Structure.Structure'
after the life-time of /@info@/ you will need to copy it. -}
discovererStreamInfoGetMisc info = liftIO $ do
    info' <- unsafeManagedPtrCastPtr info
    result <- gst_discoverer_stream_info_get_misc info'
    checkUnexpectedReturnNULL "discovererStreamInfoGetMisc" result
    result' <- (newBoxed Gst.Structure.Structure) result
    touchManagedPtr info
    return result'

#if ENABLE_OVERLOADING
data DiscovererStreamInfoGetMiscMethodInfo
instance (signature ~ (m Gst.Structure.Structure), MonadIO m, IsDiscovererStreamInfo a) => O.MethodInfo DiscovererStreamInfoGetMiscMethodInfo a signature where
    overloadedMethod _ = discovererStreamInfoGetMisc

#endif

-- method DiscovererStreamInfo::get_next
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererStreamInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_discoverer_stream_info_get_next" gst_discoverer_stream_info_get_next ::
    Ptr DiscovererStreamInfo ->             -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})
    IO (Ptr DiscovererStreamInfo)

{- |
/No description available in the introspection data./
-}
discovererStreamInfoGetNext ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    a
    {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m DiscovererStreamInfo
    {- ^ __Returns:__ the next 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' in a chain. 'Nothing'
for final streams.
Unref with @/gst_discoverer_stream_info_unref/@ after usage. -}
discovererStreamInfoGetNext info = liftIO $ do
    info' <- unsafeManagedPtrCastPtr info
    result <- gst_discoverer_stream_info_get_next info'
    checkUnexpectedReturnNULL "discovererStreamInfoGetNext" result
    result' <- (wrapObject DiscovererStreamInfo) result
    touchManagedPtr info
    return result'

#if ENABLE_OVERLOADING
data DiscovererStreamInfoGetNextMethodInfo
instance (signature ~ (m DiscovererStreamInfo), MonadIO m, IsDiscovererStreamInfo a) => O.MethodInfo DiscovererStreamInfoGetNextMethodInfo a signature where
    overloadedMethod _ = discovererStreamInfoGetNext

#endif

-- method DiscovererStreamInfo::get_previous
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererStreamInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_discoverer_stream_info_get_previous" gst_discoverer_stream_info_get_previous ::
    Ptr DiscovererStreamInfo ->             -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})
    IO (Ptr DiscovererStreamInfo)

{- |
/No description available in the introspection data./
-}
discovererStreamInfoGetPrevious ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    a
    {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m DiscovererStreamInfo
    {- ^ __Returns:__ the previous 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' in a chain.
'Nothing' for starting points. Unref with @/gst_discoverer_stream_info_unref/@
after usage. -}
discovererStreamInfoGetPrevious info = liftIO $ do
    info' <- unsafeManagedPtrCastPtr info
    result <- gst_discoverer_stream_info_get_previous info'
    checkUnexpectedReturnNULL "discovererStreamInfoGetPrevious" result
    result' <- (wrapObject DiscovererStreamInfo) result
    touchManagedPtr info
    return result'

#if ENABLE_OVERLOADING
data DiscovererStreamInfoGetPreviousMethodInfo
instance (signature ~ (m DiscovererStreamInfo), MonadIO m, IsDiscovererStreamInfo a) => O.MethodInfo DiscovererStreamInfoGetPreviousMethodInfo a signature where
    overloadedMethod _ = discovererStreamInfoGetPrevious

#endif

-- method DiscovererStreamInfo::get_stream_id
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererStreamInfo", 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_stream_info_get_stream_id" gst_discoverer_stream_info_get_stream_id ::
    Ptr DiscovererStreamInfo ->             -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})
    IO CString

{- |
/No description available in the introspection data./
-}
discovererStreamInfoGetStreamId ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    a
    {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m T.Text
    {- ^ __Returns:__ the stream ID of this stream. If you wish to
use the stream ID after the life-time of /@info@/ you will need to copy it. -}
discovererStreamInfoGetStreamId info = liftIO $ do
    info' <- unsafeManagedPtrCastPtr info
    result <- gst_discoverer_stream_info_get_stream_id info'
    checkUnexpectedReturnNULL "discovererStreamInfoGetStreamId" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'

#if ENABLE_OVERLOADING
data DiscovererStreamInfoGetStreamIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDiscovererStreamInfo a) => O.MethodInfo DiscovererStreamInfoGetStreamIdMethodInfo a signature where
    overloadedMethod _ = discovererStreamInfoGetStreamId

#endif

-- method DiscovererStreamInfo::get_stream_type_nick
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererStreamInfo", 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_stream_info_get_stream_type_nick" gst_discoverer_stream_info_get_stream_type_nick ::
    Ptr DiscovererStreamInfo ->             -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})
    IO CString

{- |
/No description available in the introspection data./
-}
discovererStreamInfoGetStreamTypeNick ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    a
    {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m T.Text
    {- ^ __Returns:__ a human readable name for the stream type of the given /@info@/ (ex : \"audio\",
\"container\",...). -}
discovererStreamInfoGetStreamTypeNick info = liftIO $ do
    info' <- unsafeManagedPtrCastPtr info
    result <- gst_discoverer_stream_info_get_stream_type_nick info'
    checkUnexpectedReturnNULL "discovererStreamInfoGetStreamTypeNick" result
    result' <- cstringToText result
    touchManagedPtr info
    return result'

#if ENABLE_OVERLOADING
data DiscovererStreamInfoGetStreamTypeNickMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDiscovererStreamInfo a) => O.MethodInfo DiscovererStreamInfoGetStreamTypeNickMethodInfo a signature where
    overloadedMethod _ = discovererStreamInfoGetStreamTypeNick

#endif

-- method DiscovererStreamInfo::get_tags
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererStreamInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gst", name = "TagList"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_discoverer_stream_info_get_tags" gst_discoverer_stream_info_get_tags ::
    Ptr DiscovererStreamInfo ->             -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})
    IO (Ptr Gst.TagList.TagList)

{- |
/No description available in the introspection data./
-}
discovererStreamInfoGetTags ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    a
    {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m Gst.TagList.TagList
    {- ^ __Returns:__ the tags contained in this stream. If you wish to
use the tags after the life-time of /@info@/ you will need to copy them. -}
discovererStreamInfoGetTags info = liftIO $ do
    info' <- unsafeManagedPtrCastPtr info
    result <- gst_discoverer_stream_info_get_tags info'
    checkUnexpectedReturnNULL "discovererStreamInfoGetTags" result
    result' <- (newBoxed Gst.TagList.TagList) result
    touchManagedPtr info
    return result'

#if ENABLE_OVERLOADING
data DiscovererStreamInfoGetTagsMethodInfo
instance (signature ~ (m Gst.TagList.TagList), MonadIO m, IsDiscovererStreamInfo a) => O.MethodInfo DiscovererStreamInfoGetTagsMethodInfo a signature where
    overloadedMethod _ = discovererStreamInfoGetTags

#endif

-- method DiscovererStreamInfo::get_toc
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "info", argType = TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstDiscovererStreamInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gst", name = "Toc"}))
-- throws : False
-- Skip return : False

foreign import ccall "gst_discoverer_stream_info_get_toc" gst_discoverer_stream_info_get_toc ::
    Ptr DiscovererStreamInfo ->             -- info : TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})
    IO (Ptr Gst.Toc.Toc)

{- |
/No description available in the introspection data./
-}
discovererStreamInfoGetToc ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    a
    {- ^ /@info@/: a 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m Gst.Toc.Toc
    {- ^ __Returns:__ the TOC contained in this stream. If you wish to
use the TOC after the life-time of /@info@/ you will need to copy it. -}
discovererStreamInfoGetToc info = liftIO $ do
    info' <- unsafeManagedPtrCastPtr info
    result <- gst_discoverer_stream_info_get_toc info'
    checkUnexpectedReturnNULL "discovererStreamInfoGetToc" result
    result' <- (newBoxed Gst.Toc.Toc) result
    touchManagedPtr info
    return result'

#if ENABLE_OVERLOADING
data DiscovererStreamInfoGetTocMethodInfo
instance (signature ~ (m Gst.Toc.Toc), MonadIO m, IsDiscovererStreamInfo a) => O.MethodInfo DiscovererStreamInfoGetTocMethodInfo a signature where
    overloadedMethod _ = discovererStreamInfoGetToc

#endif

-- method DiscovererStreamInfo::list_free
-- method type : MemberFunction
-- Args : [Arg {argCName = "infos", argType = TGList (TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GList of #GstDiscovererStreamInfo", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_discoverer_stream_info_list_free" gst_discoverer_stream_info_list_free ::
    Ptr (GList (Ptr DiscovererStreamInfo)) -> -- infos : TGList (TInterface (Name {namespace = "GstPbutils", name = "DiscovererStreamInfo"}))
    IO ()

{- |
Decrements the reference count of all contained 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo'
and fress the 'GI.GLib.Structs.List.List'.
-}
discovererStreamInfoListFree ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    [a]
    {- ^ /@infos@/: a 'GI.GLib.Structs.List.List' of 'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' -}
    -> m ()
discovererStreamInfoListFree infos = liftIO $ do
    infos' <- mapM unsafeManagedPtrCastPtr infos
    infos'' <- packGList infos'
    gst_discoverer_stream_info_list_free infos''
    mapM_ touchManagedPtr infos
    g_list_free infos''
    return ()

#if ENABLE_OVERLOADING
#endif