{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Base structure for information concerning a media stream. Depending on the
-- stream type, one can find more media-specific information in
-- t'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo', t'GI.GstPbutils.Objects.DiscovererVideoInfo.DiscovererVideoInfo', and
-- t'GI.GstPbutils.Objects.DiscovererContainerInfo.DiscovererContainerInfo'.
-- 
-- The t'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 t'GI.GstPbutils.Objects.DiscovererContainerInfo.DiscovererContainerInfo' API.
-- 
-- As a simple example, if you run t'GI.GstPbutils.Objects.Discoverer.Discoverer' on an AVI file with one audio
-- and one video stream, you will get a t'GI.GstPbutils.Objects.DiscovererContainerInfo.DiscovererContainerInfo'
-- corresponding to the AVI container, which in turn will have a
-- t'GI.GstPbutils.Objects.DiscovererAudioInfo.DiscovererAudioInfo' sub-stream and a t'GI.GstPbutils.Objects.DiscovererVideoInfo.DiscovererVideoInfo' sub-stream
-- for the audio and video streams respectively.

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

module GI.GstPbutils.Objects.DiscovererStreamInfo
    ( 

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


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveDiscovererStreamInfoMethod       ,
#endif


-- ** getCaps #method:getCaps#

#if defined(ENABLE_OVERLOADING)
    DiscovererStreamInfoGetCapsMethodInfo   ,
#endif
    discovererStreamInfoGetCaps             ,


-- ** getMisc #method:getMisc#

#if defined(ENABLE_OVERLOADING)
    DiscovererStreamInfoGetMiscMethodInfo   ,
#endif
    discovererStreamInfoGetMisc             ,


-- ** getNext #method:getNext#

#if defined(ENABLE_OVERLOADING)
    DiscovererStreamInfoGetNextMethodInfo   ,
#endif
    discovererStreamInfoGetNext             ,


-- ** getPrevious #method:getPrevious#

#if defined(ENABLE_OVERLOADING)
    DiscovererStreamInfoGetPreviousMethodInfo,
#endif
    discovererStreamInfoGetPrevious         ,


-- ** getStreamId #method:getStreamId#

#if defined(ENABLE_OVERLOADING)
    DiscovererStreamInfoGetStreamIdMethodInfo,
#endif
    discovererStreamInfoGetStreamId         ,


-- ** getStreamTypeNick #method:getStreamTypeNick#

#if defined(ENABLE_OVERLOADING)
    DiscovererStreamInfoGetStreamTypeNickMethodInfo,
#endif
    discovererStreamInfoGetStreamTypeNick   ,


-- ** getTags #method:getTags#

#if defined(ENABLE_OVERLOADING)
    DiscovererStreamInfoGetTagsMethodInfo   ,
#endif
    discovererStreamInfoGetTags             ,


-- ** getToc #method:getToc#

#if defined(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.GI.Base.Signals as B.Signals
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)
    deriving (DiscovererStreamInfo -> DiscovererStreamInfo -> Bool
(DiscovererStreamInfo -> DiscovererStreamInfo -> Bool)
-> (DiscovererStreamInfo -> DiscovererStreamInfo -> Bool)
-> Eq DiscovererStreamInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiscovererStreamInfo -> DiscovererStreamInfo -> Bool
$c/= :: DiscovererStreamInfo -> DiscovererStreamInfo -> Bool
== :: DiscovererStreamInfo -> DiscovererStreamInfo -> Bool
$c== :: DiscovererStreamInfo -> DiscovererStreamInfo -> Bool
Eq)
foreign import ccall "gst_discoverer_stream_info_get_type"
    c_gst_discoverer_stream_info_get_type :: IO GType

instance GObject DiscovererStreamInfo where
    gobjectType :: IO GType
gobjectType = IO GType
c_gst_discoverer_stream_info_get_type
    

-- | Convert 'DiscovererStreamInfo' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue DiscovererStreamInfo where
    toGValue :: DiscovererStreamInfo -> IO GValue
toGValue o :: DiscovererStreamInfo
o = do
        GType
gtype <- IO GType
c_gst_discoverer_stream_info_get_type
        DiscovererStreamInfo
-> (Ptr DiscovererStreamInfo -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DiscovererStreamInfo
o (GType
-> (GValue -> Ptr DiscovererStreamInfo -> IO ())
-> Ptr DiscovererStreamInfo
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr DiscovererStreamInfo -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO DiscovererStreamInfo
fromGValue gv :: GValue
gv = do
        Ptr DiscovererStreamInfo
ptr <- GValue -> IO (Ptr DiscovererStreamInfo)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr DiscovererStreamInfo)
        (ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo)
-> Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo
DiscovererStreamInfo Ptr DiscovererStreamInfo
ptr
        
    

-- | 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 :: o -> m DiscovererStreamInfo
toDiscovererStreamInfo = IO DiscovererStreamInfo -> m DiscovererStreamInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DiscovererStreamInfo -> m DiscovererStreamInfo)
-> (o -> IO DiscovererStreamInfo) -> o -> m DiscovererStreamInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo)
-> o -> IO DiscovererStreamInfo
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo
DiscovererStreamInfo

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

#if defined(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 @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DiscovererStreamInfo
type instance O.AttributeList DiscovererStreamInfo = DiscovererStreamInfoAttributeList
type DiscovererStreamInfoAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(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 t'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo'
    -> m Gst.Caps.Caps
    -- ^ __Returns:__ the t'GI.Gst.Structs.Caps.Caps' of the stream. Unref with
    -- @/gst_caps_unref/@ after usage.
discovererStreamInfoGetCaps :: a -> m Caps
discovererStreamInfoGetCaps info :: a
info = IO Caps -> m Caps
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
    Ptr DiscovererStreamInfo
info' <- a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
    Ptr Caps
result <- Ptr DiscovererStreamInfo -> IO (Ptr Caps)
gst_discoverer_stream_info_get_caps Ptr DiscovererStreamInfo
info'
    Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "discovererStreamInfoGetCaps" Ptr Caps
result
    Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
    Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'

#if defined(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 t'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 t'GI.Gst.Structs.Structure.Structure'
    -- after the life-time of /@info@/ you will need to copy it.
discovererStreamInfoGetMisc :: a -> m Structure
discovererStreamInfoGetMisc info :: a
info = IO Structure -> m Structure
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Structure -> m Structure) -> IO Structure -> m Structure
forall a b. (a -> b) -> a -> b
$ do
    Ptr DiscovererStreamInfo
info' <- a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
    Ptr Structure
result <- Ptr DiscovererStreamInfo -> IO (Ptr Structure)
gst_discoverer_stream_info_get_misc Ptr DiscovererStreamInfo
info'
    Text -> Ptr Structure -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "discovererStreamInfoGetMisc" Ptr Structure
result
    Structure
result' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Structure -> Structure
Gst.Structure.Structure) Ptr Structure
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
    Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result'

#if defined(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 t'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo'
    -> m DiscovererStreamInfo
    -- ^ __Returns:__ the next t'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' in a chain. 'P.Nothing'
    -- for final streams.
    -- Unref with @/gst_discoverer_stream_info_unref/@ after usage.
discovererStreamInfoGetNext :: a -> m DiscovererStreamInfo
discovererStreamInfoGetNext info :: a
info = IO DiscovererStreamInfo -> m DiscovererStreamInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DiscovererStreamInfo -> m DiscovererStreamInfo)
-> IO DiscovererStreamInfo -> m DiscovererStreamInfo
forall a b. (a -> b) -> a -> b
$ do
    Ptr DiscovererStreamInfo
info' <- a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
    Ptr DiscovererStreamInfo
result <- Ptr DiscovererStreamInfo -> IO (Ptr DiscovererStreamInfo)
gst_discoverer_stream_info_get_next Ptr DiscovererStreamInfo
info'
    Text -> Ptr DiscovererStreamInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "discovererStreamInfoGetNext" Ptr DiscovererStreamInfo
result
    DiscovererStreamInfo
result' <- ((ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo)
-> Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo
DiscovererStreamInfo) Ptr DiscovererStreamInfo
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
    DiscovererStreamInfo -> IO DiscovererStreamInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DiscovererStreamInfo
result'

#if defined(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 t'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo'
    -> m DiscovererStreamInfo
    -- ^ __Returns:__ the previous t'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo' in a chain.
    -- 'P.Nothing' for starting points. Unref with @/gst_discoverer_stream_info_unref/@
    -- after usage.
discovererStreamInfoGetPrevious :: a -> m DiscovererStreamInfo
discovererStreamInfoGetPrevious info :: a
info = IO DiscovererStreamInfo -> m DiscovererStreamInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DiscovererStreamInfo -> m DiscovererStreamInfo)
-> IO DiscovererStreamInfo -> m DiscovererStreamInfo
forall a b. (a -> b) -> a -> b
$ do
    Ptr DiscovererStreamInfo
info' <- a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
    Ptr DiscovererStreamInfo
result <- Ptr DiscovererStreamInfo -> IO (Ptr DiscovererStreamInfo)
gst_discoverer_stream_info_get_previous Ptr DiscovererStreamInfo
info'
    Text -> Ptr DiscovererStreamInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "discovererStreamInfoGetPrevious" Ptr DiscovererStreamInfo
result
    DiscovererStreamInfo
result' <- ((ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo)
-> Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo
DiscovererStreamInfo) Ptr DiscovererStreamInfo
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
    DiscovererStreamInfo -> IO DiscovererStreamInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DiscovererStreamInfo
result'

#if defined(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 t'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 :: a -> m Text
discovererStreamInfoGetStreamId info :: a
info = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr DiscovererStreamInfo
info' <- a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
    CString
result <- Ptr DiscovererStreamInfo -> IO CString
gst_discoverer_stream_info_get_stream_id Ptr DiscovererStreamInfo
info'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "discovererStreamInfoGetStreamId" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(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 t'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 :: a -> m Text
discovererStreamInfoGetStreamTypeNick info :: a
info = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr DiscovererStreamInfo
info' <- a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
    CString
result <- Ptr DiscovererStreamInfo -> IO CString
gst_discoverer_stream_info_get_stream_type_nick Ptr DiscovererStreamInfo
info'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "discovererStreamInfoGetStreamTypeNick" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(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 t'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 :: a -> m TagList
discovererStreamInfoGetTags info :: a
info = IO TagList -> m TagList
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TagList -> m TagList) -> IO TagList -> m TagList
forall a b. (a -> b) -> a -> b
$ do
    Ptr DiscovererStreamInfo
info' <- a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
    Ptr TagList
result <- Ptr DiscovererStreamInfo -> IO (Ptr TagList)
gst_discoverer_stream_info_get_tags Ptr DiscovererStreamInfo
info'
    Text -> Ptr TagList -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "discovererStreamInfoGetTags" Ptr TagList
result
    TagList
result' <- ((ManagedPtr TagList -> TagList) -> Ptr TagList -> IO TagList
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr TagList -> TagList
Gst.TagList.TagList) Ptr TagList
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
    TagList -> IO TagList
forall (m :: * -> *) a. Monad m => a -> m a
return TagList
result'

#if defined(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 t'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 :: a -> m Toc
discovererStreamInfoGetToc info :: a
info = IO Toc -> m Toc
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Toc -> m Toc) -> IO Toc -> m Toc
forall a b. (a -> b) -> a -> b
$ do
    Ptr DiscovererStreamInfo
info' <- a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
    Ptr Toc
result <- Ptr DiscovererStreamInfo -> IO (Ptr Toc)
gst_discoverer_stream_info_get_toc Ptr DiscovererStreamInfo
info'
    Text -> Ptr Toc -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "discovererStreamInfoGetToc" Ptr Toc
result
    Toc
result' <- ((ManagedPtr Toc -> Toc) -> Ptr Toc -> IO Toc
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Toc -> Toc
Gst.Toc.Toc) Ptr Toc
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
    Toc -> IO Toc
forall (m :: * -> *) a. Monad m => a -> m a
return Toc
result'

#if defined(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 t'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo'
-- and fress the t'GI.GLib.Structs.List.List'.
discovererStreamInfoListFree ::
    (B.CallStack.HasCallStack, MonadIO m, IsDiscovererStreamInfo a) =>
    [a]
    -- ^ /@infos@/: a t'GI.GLib.Structs.List.List' of t'GI.GstPbutils.Objects.DiscovererStreamInfo.DiscovererStreamInfo'
    -> m ()
discovererStreamInfoListFree :: [a] -> m ()
discovererStreamInfoListFree infos :: [a]
infos = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    [Ptr DiscovererStreamInfo]
infos' <- (a -> IO (Ptr DiscovererStreamInfo))
-> [a] -> IO [Ptr DiscovererStreamInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM a -> IO (Ptr DiscovererStreamInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [a]
infos
    Ptr (GList (Ptr DiscovererStreamInfo))
infos'' <- [Ptr DiscovererStreamInfo]
-> IO (Ptr (GList (Ptr DiscovererStreamInfo)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr DiscovererStreamInfo]
infos'
    Ptr (GList (Ptr DiscovererStreamInfo)) -> IO ()
gst_discoverer_stream_info_list_free Ptr (GList (Ptr DiscovererStreamInfo))
infos''
    (a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
infos
    Ptr (GList (Ptr DiscovererStreamInfo)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr DiscovererStreamInfo))
infos''
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif