{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstPbutils.Objects.DiscovererInfo
(
DiscovererInfo(..) ,
IsDiscovererInfo ,
toDiscovererInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveDiscovererInfoMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DiscovererInfoCopyMethodInfo ,
#endif
discovererInfoCopy ,
discovererInfoFromVariant ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetAudioStreamsMethodInfo ,
#endif
discovererInfoGetAudioStreams ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetContainerStreamsMethodInfo,
#endif
discovererInfoGetContainerStreams ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetDurationMethodInfo ,
#endif
discovererInfoGetDuration ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetLiveMethodInfo ,
#endif
discovererInfoGetLive ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetMiscMethodInfo ,
#endif
discovererInfoGetMisc ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetMissingElementsInstallerDetailsMethodInfo,
#endif
discovererInfoGetMissingElementsInstallerDetails,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetResultMethodInfo ,
#endif
discovererInfoGetResult ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetSeekableMethodInfo ,
#endif
discovererInfoGetSeekable ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetStreamInfoMethodInfo ,
#endif
discovererInfoGetStreamInfo ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetStreamListMethodInfo ,
#endif
discovererInfoGetStreamList ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetStreamsMethodInfo ,
#endif
discovererInfoGetStreams ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetSubtitleStreamsMethodInfo,
#endif
discovererInfoGetSubtitleStreams ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetTagsMethodInfo ,
#endif
discovererInfoGetTags ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetTocMethodInfo ,
#endif
discovererInfoGetToc ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetUriMethodInfo ,
#endif
discovererInfoGetUri ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoGetVideoStreamsMethodInfo ,
#endif
discovererInfoGetVideoStreams ,
#if defined(ENABLE_OVERLOADING)
DiscovererInfoToVariantMethodInfo ,
#endif
discovererInfoToVariant ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
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 GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
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
import {-# SOURCE #-} qualified GI.GstPbutils.Enums as GstPbutils.Enums
import {-# SOURCE #-} qualified GI.GstPbutils.Flags as GstPbutils.Flags
import {-# SOURCE #-} qualified GI.GstPbutils.Objects.DiscovererStreamInfo as GstPbutils.DiscovererStreamInfo
newtype DiscovererInfo = DiscovererInfo (SP.ManagedPtr DiscovererInfo)
deriving (DiscovererInfo -> DiscovererInfo -> Bool
(DiscovererInfo -> DiscovererInfo -> Bool)
-> (DiscovererInfo -> DiscovererInfo -> Bool) -> Eq DiscovererInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiscovererInfo -> DiscovererInfo -> Bool
$c/= :: DiscovererInfo -> DiscovererInfo -> Bool
== :: DiscovererInfo -> DiscovererInfo -> Bool
$c== :: DiscovererInfo -> DiscovererInfo -> Bool
Eq)
instance SP.ManagedPtrNewtype DiscovererInfo where
toManagedPtr :: DiscovererInfo -> ManagedPtr DiscovererInfo
toManagedPtr (DiscovererInfo ManagedPtr DiscovererInfo
p) = ManagedPtr DiscovererInfo
p
foreign import ccall "gst_discoverer_info_get_type"
c_gst_discoverer_info_get_type :: IO B.Types.GType
instance B.Types.TypedObject DiscovererInfo where
glibType :: IO GType
glibType = IO GType
c_gst_discoverer_info_get_type
instance B.Types.GObject DiscovererInfo
class (SP.GObject o, O.IsDescendantOf DiscovererInfo o) => IsDiscovererInfo o
instance (SP.GObject o, O.IsDescendantOf DiscovererInfo o) => IsDiscovererInfo o
instance O.HasParentTypes DiscovererInfo
type instance O.ParentTypes DiscovererInfo = '[GObject.Object.Object]
toDiscovererInfo :: (MIO.MonadIO m, IsDiscovererInfo o) => o -> m DiscovererInfo
toDiscovererInfo :: forall (m :: * -> *) o.
(MonadIO m, IsDiscovererInfo o) =>
o -> m DiscovererInfo
toDiscovererInfo = IO DiscovererInfo -> m DiscovererInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DiscovererInfo -> m DiscovererInfo)
-> (o -> IO DiscovererInfo) -> o -> m DiscovererInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DiscovererInfo -> DiscovererInfo)
-> o -> IO DiscovererInfo
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DiscovererInfo -> DiscovererInfo
DiscovererInfo
instance B.GValue.IsGValue (Maybe DiscovererInfo) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_discoverer_info_get_type
gvalueSet_ :: Ptr GValue -> Maybe DiscovererInfo -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DiscovererInfo
P.Nothing = Ptr GValue -> Ptr DiscovererInfo -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DiscovererInfo
forall a. Ptr a
FP.nullPtr :: FP.Ptr DiscovererInfo)
gvalueSet_ Ptr GValue
gv (P.Just DiscovererInfo
obj) = DiscovererInfo -> (Ptr DiscovererInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DiscovererInfo
obj (Ptr GValue -> Ptr DiscovererInfo -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DiscovererInfo)
gvalueGet_ Ptr GValue
gv = do
Ptr DiscovererInfo
ptr <- Ptr GValue -> IO (Ptr DiscovererInfo)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DiscovererInfo)
if Ptr DiscovererInfo
ptr Ptr DiscovererInfo -> Ptr DiscovererInfo -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DiscovererInfo
forall a. Ptr a
FP.nullPtr
then DiscovererInfo -> Maybe DiscovererInfo
forall a. a -> Maybe a
P.Just (DiscovererInfo -> Maybe DiscovererInfo)
-> IO DiscovererInfo -> IO (Maybe DiscovererInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DiscovererInfo -> DiscovererInfo)
-> Ptr DiscovererInfo -> IO DiscovererInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DiscovererInfo -> DiscovererInfo
DiscovererInfo Ptr DiscovererInfo
ptr
else Maybe DiscovererInfo -> IO (Maybe DiscovererInfo)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DiscovererInfo
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDiscovererInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveDiscovererInfoMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDiscovererInfoMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDiscovererInfoMethod "copy" o = DiscovererInfoCopyMethodInfo
ResolveDiscovererInfoMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDiscovererInfoMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDiscovererInfoMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDiscovererInfoMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDiscovererInfoMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDiscovererInfoMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDiscovererInfoMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDiscovererInfoMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDiscovererInfoMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDiscovererInfoMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDiscovererInfoMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDiscovererInfoMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDiscovererInfoMethod "toVariant" o = DiscovererInfoToVariantMethodInfo
ResolveDiscovererInfoMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDiscovererInfoMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDiscovererInfoMethod "getAudioStreams" o = DiscovererInfoGetAudioStreamsMethodInfo
ResolveDiscovererInfoMethod "getContainerStreams" o = DiscovererInfoGetContainerStreamsMethodInfo
ResolveDiscovererInfoMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDiscovererInfoMethod "getDuration" o = DiscovererInfoGetDurationMethodInfo
ResolveDiscovererInfoMethod "getLive" o = DiscovererInfoGetLiveMethodInfo
ResolveDiscovererInfoMethod "getMisc" o = DiscovererInfoGetMiscMethodInfo
ResolveDiscovererInfoMethod "getMissingElementsInstallerDetails" o = DiscovererInfoGetMissingElementsInstallerDetailsMethodInfo
ResolveDiscovererInfoMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDiscovererInfoMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDiscovererInfoMethod "getResult" o = DiscovererInfoGetResultMethodInfo
ResolveDiscovererInfoMethod "getSeekable" o = DiscovererInfoGetSeekableMethodInfo
ResolveDiscovererInfoMethod "getStreamInfo" o = DiscovererInfoGetStreamInfoMethodInfo
ResolveDiscovererInfoMethod "getStreamList" o = DiscovererInfoGetStreamListMethodInfo
ResolveDiscovererInfoMethod "getStreams" o = DiscovererInfoGetStreamsMethodInfo
ResolveDiscovererInfoMethod "getSubtitleStreams" o = DiscovererInfoGetSubtitleStreamsMethodInfo
ResolveDiscovererInfoMethod "getTags" o = DiscovererInfoGetTagsMethodInfo
ResolveDiscovererInfoMethod "getToc" o = DiscovererInfoGetTocMethodInfo
ResolveDiscovererInfoMethod "getUri" o = DiscovererInfoGetUriMethodInfo
ResolveDiscovererInfoMethod "getVideoStreams" o = DiscovererInfoGetVideoStreamsMethodInfo
ResolveDiscovererInfoMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDiscovererInfoMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDiscovererInfoMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDiscovererInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDiscovererInfoMethod t DiscovererInfo, O.OverloadedMethod info DiscovererInfo p) => OL.IsLabel t (DiscovererInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDiscovererInfoMethod t DiscovererInfo, O.OverloadedMethod info DiscovererInfo p, R.HasField t DiscovererInfo p) => R.HasField t DiscovererInfo p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDiscovererInfoMethod t DiscovererInfo, O.OverloadedMethodInfo info DiscovererInfo) => OL.IsLabel t (O.MethodProxy info DiscovererInfo) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DiscovererInfo
type instance O.AttributeList DiscovererInfo = DiscovererInfoAttributeList
type DiscovererInfoAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DiscovererInfo = DiscovererInfoSignalList
type DiscovererInfoSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_discoverer_info_copy" gst_discoverer_info_copy ::
Ptr DiscovererInfo ->
IO (Ptr DiscovererInfo)
discovererInfoCopy ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m DiscovererInfo
discovererInfoCopy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m DiscovererInfo
discovererInfoCopy a
ptr = IO DiscovererInfo -> m DiscovererInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DiscovererInfo -> m DiscovererInfo)
-> IO DiscovererInfo -> m DiscovererInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr DiscovererInfo
ptr' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ptr
Ptr DiscovererInfo
result <- Ptr DiscovererInfo -> IO (Ptr DiscovererInfo)
gst_discoverer_info_copy Ptr DiscovererInfo
ptr'
Text -> Ptr DiscovererInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoCopy" Ptr DiscovererInfo
result
DiscovererInfo
result' <- ((ManagedPtr DiscovererInfo -> DiscovererInfo)
-> Ptr DiscovererInfo -> IO DiscovererInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DiscovererInfo -> DiscovererInfo
DiscovererInfo) Ptr DiscovererInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ptr
DiscovererInfo -> IO DiscovererInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DiscovererInfo
result'
#if defined(ENABLE_OVERLOADING)
data DiscovererInfoCopyMethodInfo
instance (signature ~ (m DiscovererInfo), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoCopyMethodInfo a signature where
overloadedMethod = discovererInfoCopy
instance O.OverloadedMethodInfo DiscovererInfoCopyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoCopy"
})
#endif
foreign import ccall "gst_discoverer_info_get_audio_streams" gst_discoverer_info_get_audio_streams ::
Ptr DiscovererInfo ->
IO (Ptr (GList (Ptr GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo)))
discovererInfoGetAudioStreams ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]
discovererInfoGetAudioStreams :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m [DiscovererStreamInfo]
discovererInfoGetAudioStreams 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr (GList (Ptr DiscovererStreamInfo))
result <- Ptr DiscovererInfo -> IO (Ptr (GList (Ptr DiscovererStreamInfo)))
gst_discoverer_info_get_audio_streams Ptr DiscovererInfo
info'
[Ptr DiscovererStreamInfo]
result' <- Ptr (GList (Ptr DiscovererStreamInfo))
-> IO [Ptr DiscovererStreamInfo]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr DiscovererStreamInfo))
result
[DiscovererStreamInfo]
result'' <- (Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo)
-> [Ptr DiscovererStreamInfo] -> IO [DiscovererStreamInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((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
GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo) [Ptr DiscovererStreamInfo]
result'
Ptr (GList (Ptr DiscovererStreamInfo)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (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 DiscovererInfoGetAudioStreamsMethodInfo
instance (signature ~ (m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetAudioStreamsMethodInfo a signature where
overloadedMethod = discovererInfoGetAudioStreams
instance O.OverloadedMethodInfo DiscovererInfoGetAudioStreamsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetAudioStreams",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetAudioStreams"
})
#endif
foreign import ccall "gst_discoverer_info_get_container_streams" gst_discoverer_info_get_container_streams ::
Ptr DiscovererInfo ->
IO (Ptr (GList (Ptr GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo)))
discovererInfoGetContainerStreams ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]
discovererInfoGetContainerStreams :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m [DiscovererStreamInfo]
discovererInfoGetContainerStreams 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr (GList (Ptr DiscovererStreamInfo))
result <- Ptr DiscovererInfo -> IO (Ptr (GList (Ptr DiscovererStreamInfo)))
gst_discoverer_info_get_container_streams Ptr DiscovererInfo
info'
[Ptr DiscovererStreamInfo]
result' <- Ptr (GList (Ptr DiscovererStreamInfo))
-> IO [Ptr DiscovererStreamInfo]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr DiscovererStreamInfo))
result
[DiscovererStreamInfo]
result'' <- (Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo)
-> [Ptr DiscovererStreamInfo] -> IO [DiscovererStreamInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((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
GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo) [Ptr DiscovererStreamInfo]
result'
Ptr (GList (Ptr DiscovererStreamInfo)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (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 DiscovererInfoGetContainerStreamsMethodInfo
instance (signature ~ (m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetContainerStreamsMethodInfo a signature where
overloadedMethod = discovererInfoGetContainerStreams
instance O.OverloadedMethodInfo DiscovererInfoGetContainerStreamsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetContainerStreams",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetContainerStreams"
})
#endif
foreign import ccall "gst_discoverer_info_get_duration" gst_discoverer_info_get_duration ::
Ptr DiscovererInfo ->
IO Word64
discovererInfoGetDuration ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m Word64
discovererInfoGetDuration :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m Word64
discovererInfoGetDuration a
info = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Word64
result <- Ptr DiscovererInfo -> IO Word64
gst_discoverer_info_get_duration Ptr DiscovererInfo
info'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data DiscovererInfoGetDurationMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetDurationMethodInfo a signature where
overloadedMethod = discovererInfoGetDuration
instance O.OverloadedMethodInfo DiscovererInfoGetDurationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetDuration",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetDuration"
})
#endif
foreign import ccall "gst_discoverer_info_get_live" gst_discoverer_info_get_live ::
Ptr DiscovererInfo ->
IO CInt
discovererInfoGetLive ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m Bool
discovererInfoGetLive :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m Bool
discovererInfoGetLive a
info = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CInt
result <- Ptr DiscovererInfo -> IO CInt
gst_discoverer_info_get_live Ptr DiscovererInfo
info'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DiscovererInfoGetLiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetLiveMethodInfo a signature where
overloadedMethod = discovererInfoGetLive
instance O.OverloadedMethodInfo DiscovererInfoGetLiveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetLive",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetLive"
})
#endif
foreign import ccall "gst_discoverer_info_get_misc" gst_discoverer_info_get_misc ::
Ptr DiscovererInfo ->
IO (Ptr Gst.Structure.Structure)
{-# DEPRECATED discovererInfoGetMisc ["This functions is deprecated since version 1.4, use","@/gst_discoverer_info_get_missing_elements_installer_details/@"] #-}
discovererInfoGetMisc ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m Gst.Structure.Structure
discovererInfoGetMisc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m Structure
discovererInfoGetMisc 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr Structure
result <- Ptr DiscovererInfo -> IO (Ptr Structure)
gst_discoverer_info_get_misc Ptr DiscovererInfo
info'
Text -> Ptr Structure -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoGetMisc" Ptr Structure
result
Structure
result' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed 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 DiscovererInfoGetMiscMethodInfo
instance (signature ~ (m Gst.Structure.Structure), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetMiscMethodInfo a signature where
overloadedMethod = discovererInfoGetMisc
instance O.OverloadedMethodInfo DiscovererInfoGetMiscMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetMisc",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetMisc"
})
#endif
foreign import ccall "gst_discoverer_info_get_missing_elements_installer_details" gst_discoverer_info_get_missing_elements_installer_details ::
Ptr DiscovererInfo ->
IO (Ptr CString)
discovererInfoGetMissingElementsInstallerDetails ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m [T.Text]
discovererInfoGetMissingElementsInstallerDetails :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m [Text]
discovererInfoGetMissingElementsInstallerDetails 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr CString
result <- Ptr DiscovererInfo -> IO (Ptr CString)
gst_discoverer_info_get_missing_elements_installer_details Ptr DiscovererInfo
info'
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoGetMissingElementsInstallerDetails" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr 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 DiscovererInfoGetMissingElementsInstallerDetailsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetMissingElementsInstallerDetailsMethodInfo a signature where
overloadedMethod = discovererInfoGetMissingElementsInstallerDetails
instance O.OverloadedMethodInfo DiscovererInfoGetMissingElementsInstallerDetailsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetMissingElementsInstallerDetails",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetMissingElementsInstallerDetails"
})
#endif
foreign import ccall "gst_discoverer_info_get_result" gst_discoverer_info_get_result ::
Ptr DiscovererInfo ->
IO CUInt
discovererInfoGetResult ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m GstPbutils.Enums.DiscovererResult
discovererInfoGetResult :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m DiscovererResult
discovererInfoGetResult a
info = IO DiscovererResult -> m DiscovererResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DiscovererResult -> m DiscovererResult)
-> IO DiscovererResult -> m DiscovererResult
forall a b. (a -> b) -> a -> b
$ do
Ptr DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CUInt
result <- Ptr DiscovererInfo -> IO CUInt
gst_discoverer_info_get_result Ptr DiscovererInfo
info'
let result' :: DiscovererResult
result' = (Int -> DiscovererResult
forall a. Enum a => Int -> a
toEnum (Int -> DiscovererResult)
-> (CUInt -> Int) -> CUInt -> DiscovererResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
DiscovererResult -> IO DiscovererResult
forall (m :: * -> *) a. Monad m => a -> m a
return DiscovererResult
result'
#if defined(ENABLE_OVERLOADING)
data DiscovererInfoGetResultMethodInfo
instance (signature ~ (m GstPbutils.Enums.DiscovererResult), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetResultMethodInfo a signature where
overloadedMethod = discovererInfoGetResult
instance O.OverloadedMethodInfo DiscovererInfoGetResultMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetResult",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetResult"
})
#endif
foreign import ccall "gst_discoverer_info_get_seekable" gst_discoverer_info_get_seekable ::
Ptr DiscovererInfo ->
IO CInt
discovererInfoGetSeekable ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m Bool
discovererInfoGetSeekable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m Bool
discovererInfoGetSeekable a
info = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CInt
result <- Ptr DiscovererInfo -> IO CInt
gst_discoverer_info_get_seekable Ptr DiscovererInfo
info'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DiscovererInfoGetSeekableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetSeekableMethodInfo a signature where
overloadedMethod = discovererInfoGetSeekable
instance O.OverloadedMethodInfo DiscovererInfoGetSeekableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetSeekable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetSeekable"
})
#endif
foreign import ccall "gst_discoverer_info_get_stream_info" gst_discoverer_info_get_stream_info ::
Ptr DiscovererInfo ->
IO (Ptr GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo)
discovererInfoGetStreamInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo
discovererInfoGetStreamInfo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m DiscovererStreamInfo
discovererInfoGetStreamInfo 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr DiscovererStreamInfo
result <- Ptr DiscovererInfo -> IO (Ptr DiscovererStreamInfo)
gst_discoverer_info_get_stream_info Ptr DiscovererInfo
info'
Text -> Ptr DiscovererStreamInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoGetStreamInfo" 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
GstPbutils.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 DiscovererInfoGetStreamInfoMethodInfo
instance (signature ~ (m GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetStreamInfoMethodInfo a signature where
overloadedMethod = discovererInfoGetStreamInfo
instance O.OverloadedMethodInfo DiscovererInfoGetStreamInfoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetStreamInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetStreamInfo"
})
#endif
foreign import ccall "gst_discoverer_info_get_stream_list" gst_discoverer_info_get_stream_list ::
Ptr DiscovererInfo ->
IO (Ptr (GList (Ptr GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo)))
discovererInfoGetStreamList ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]
discovererInfoGetStreamList :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m [DiscovererStreamInfo]
discovererInfoGetStreamList 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr (GList (Ptr DiscovererStreamInfo))
result <- Ptr DiscovererInfo -> IO (Ptr (GList (Ptr DiscovererStreamInfo)))
gst_discoverer_info_get_stream_list Ptr DiscovererInfo
info'
[Ptr DiscovererStreamInfo]
result' <- Ptr (GList (Ptr DiscovererStreamInfo))
-> IO [Ptr DiscovererStreamInfo]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr DiscovererStreamInfo))
result
[DiscovererStreamInfo]
result'' <- (Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo)
-> [Ptr DiscovererStreamInfo] -> IO [DiscovererStreamInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((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
GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo) [Ptr DiscovererStreamInfo]
result'
Ptr (GList (Ptr DiscovererStreamInfo)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (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 DiscovererInfoGetStreamListMethodInfo
instance (signature ~ (m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetStreamListMethodInfo a signature where
overloadedMethod = discovererInfoGetStreamList
instance O.OverloadedMethodInfo DiscovererInfoGetStreamListMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetStreamList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetStreamList"
})
#endif
foreign import ccall "gst_discoverer_info_get_streams" gst_discoverer_info_get_streams ::
Ptr DiscovererInfo ->
CGType ->
IO (Ptr (GList (Ptr GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo)))
discovererInfoGetStreams ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> GType
-> m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]
discovererInfoGetStreams :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> GType -> m [DiscovererStreamInfo]
discovererInfoGetStreams a
info GType
streamtype = 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
let streamtype' :: Word64
streamtype' = GType -> Word64
gtypeToCGType GType
streamtype
Ptr (GList (Ptr DiscovererStreamInfo))
result <- Ptr DiscovererInfo
-> Word64 -> IO (Ptr (GList (Ptr DiscovererStreamInfo)))
gst_discoverer_info_get_streams Ptr DiscovererInfo
info' Word64
streamtype'
[Ptr DiscovererStreamInfo]
result' <- Ptr (GList (Ptr DiscovererStreamInfo))
-> IO [Ptr DiscovererStreamInfo]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr DiscovererStreamInfo))
result
[DiscovererStreamInfo]
result'' <- (Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo)
-> [Ptr DiscovererStreamInfo] -> IO [DiscovererStreamInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((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
GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo) [Ptr DiscovererStreamInfo]
result'
Ptr (GList (Ptr DiscovererStreamInfo)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (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 DiscovererInfoGetStreamsMethodInfo
instance (signature ~ (GType -> m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetStreamsMethodInfo a signature where
overloadedMethod = discovererInfoGetStreams
instance O.OverloadedMethodInfo DiscovererInfoGetStreamsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetStreams",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetStreams"
})
#endif
foreign import ccall "gst_discoverer_info_get_subtitle_streams" gst_discoverer_info_get_subtitle_streams ::
Ptr DiscovererInfo ->
IO (Ptr (GList (Ptr GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo)))
discovererInfoGetSubtitleStreams ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]
discovererInfoGetSubtitleStreams :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m [DiscovererStreamInfo]
discovererInfoGetSubtitleStreams 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr (GList (Ptr DiscovererStreamInfo))
result <- Ptr DiscovererInfo -> IO (Ptr (GList (Ptr DiscovererStreamInfo)))
gst_discoverer_info_get_subtitle_streams Ptr DiscovererInfo
info'
[Ptr DiscovererStreamInfo]
result' <- Ptr (GList (Ptr DiscovererStreamInfo))
-> IO [Ptr DiscovererStreamInfo]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr DiscovererStreamInfo))
result
[DiscovererStreamInfo]
result'' <- (Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo)
-> [Ptr DiscovererStreamInfo] -> IO [DiscovererStreamInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((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
GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo) [Ptr DiscovererStreamInfo]
result'
Ptr (GList (Ptr DiscovererStreamInfo)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (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 DiscovererInfoGetSubtitleStreamsMethodInfo
instance (signature ~ (m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetSubtitleStreamsMethodInfo a signature where
overloadedMethod = discovererInfoGetSubtitleStreams
instance O.OverloadedMethodInfo DiscovererInfoGetSubtitleStreamsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetSubtitleStreams",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetSubtitleStreams"
})
#endif
foreign import ccall "gst_discoverer_info_get_tags" gst_discoverer_info_get_tags ::
Ptr DiscovererInfo ->
IO (Ptr Gst.TagList.TagList)
discovererInfoGetTags ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m Gst.TagList.TagList
discovererInfoGetTags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m TagList
discovererInfoGetTags 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr TagList
result <- Ptr DiscovererInfo -> IO (Ptr TagList)
gst_discoverer_info_get_tags Ptr DiscovererInfo
info'
Text -> Ptr TagList -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoGetTags" Ptr TagList
result
TagList
result' <- ((ManagedPtr TagList -> TagList) -> Ptr TagList -> IO TagList
forall a.
(HasCallStack, GBoxed 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 DiscovererInfoGetTagsMethodInfo
instance (signature ~ (m Gst.TagList.TagList), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetTagsMethodInfo a signature where
overloadedMethod = discovererInfoGetTags
instance O.OverloadedMethodInfo DiscovererInfoGetTagsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetTags",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetTags"
})
#endif
foreign import ccall "gst_discoverer_info_get_toc" gst_discoverer_info_get_toc ::
Ptr DiscovererInfo ->
IO (Ptr Gst.Toc.Toc)
discovererInfoGetToc ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m Gst.Toc.Toc
discovererInfoGetToc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m Toc
discovererInfoGetToc 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr Toc
result <- Ptr DiscovererInfo -> IO (Ptr Toc)
gst_discoverer_info_get_toc Ptr DiscovererInfo
info'
Text -> Ptr Toc -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoGetToc" Ptr Toc
result
Toc
result' <- ((ManagedPtr Toc -> Toc) -> Ptr Toc -> IO Toc
forall a.
(HasCallStack, GBoxed 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 DiscovererInfoGetTocMethodInfo
instance (signature ~ (m Gst.Toc.Toc), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetTocMethodInfo a signature where
overloadedMethod = discovererInfoGetToc
instance O.OverloadedMethodInfo DiscovererInfoGetTocMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetToc",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetToc"
})
#endif
foreign import ccall "gst_discoverer_info_get_uri" gst_discoverer_info_get_uri ::
Ptr DiscovererInfo ->
IO CString
discovererInfoGetUri ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m T.Text
discovererInfoGetUri :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m Text
discovererInfoGetUri 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
result <- Ptr DiscovererInfo -> IO CString
gst_discoverer_info_get_uri Ptr DiscovererInfo
info'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoGetUri" 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 DiscovererInfoGetUriMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetUriMethodInfo a signature where
overloadedMethod = discovererInfoGetUri
instance O.OverloadedMethodInfo DiscovererInfoGetUriMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetUri",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetUri"
})
#endif
foreign import ccall "gst_discoverer_info_get_video_streams" gst_discoverer_info_get_video_streams ::
Ptr DiscovererInfo ->
IO (Ptr (GList (Ptr GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo)))
discovererInfoGetVideoStreams ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]
discovererInfoGetVideoStreams :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> m [DiscovererStreamInfo]
discovererInfoGetVideoStreams 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 DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr (GList (Ptr DiscovererStreamInfo))
result <- Ptr DiscovererInfo -> IO (Ptr (GList (Ptr DiscovererStreamInfo)))
gst_discoverer_info_get_video_streams Ptr DiscovererInfo
info'
[Ptr DiscovererStreamInfo]
result' <- Ptr (GList (Ptr DiscovererStreamInfo))
-> IO [Ptr DiscovererStreamInfo]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr DiscovererStreamInfo))
result
[DiscovererStreamInfo]
result'' <- (Ptr DiscovererStreamInfo -> IO DiscovererStreamInfo)
-> [Ptr DiscovererStreamInfo] -> IO [DiscovererStreamInfo]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((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
GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo) [Ptr DiscovererStreamInfo]
result'
Ptr (GList (Ptr DiscovererStreamInfo)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (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 DiscovererInfoGetVideoStreamsMethodInfo
instance (signature ~ (m [GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo]), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoGetVideoStreamsMethodInfo a signature where
overloadedMethod = discovererInfoGetVideoStreams
instance O.OverloadedMethodInfo DiscovererInfoGetVideoStreamsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoGetVideoStreams",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoGetVideoStreams"
})
#endif
foreign import ccall "gst_discoverer_info_to_variant" gst_discoverer_info_to_variant ::
Ptr DiscovererInfo ->
CUInt ->
IO (Ptr GVariant)
discovererInfoToVariant ::
(B.CallStack.HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a
-> [GstPbutils.Flags.DiscovererSerializeFlags]
-> m GVariant
discovererInfoToVariant :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDiscovererInfo a) =>
a -> [DiscovererSerializeFlags] -> m GVariant
discovererInfoToVariant a
info [DiscovererSerializeFlags]
flags = IO GVariant -> m GVariant
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
Ptr DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
let flags' :: CUInt
flags' = [DiscovererSerializeFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DiscovererSerializeFlags]
flags
Ptr GVariant
result <- Ptr DiscovererInfo -> CUInt -> IO (Ptr GVariant)
gst_discoverer_info_to_variant Ptr DiscovererInfo
info' CUInt
flags'
Text -> Ptr GVariant -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoToVariant" Ptr GVariant
result
GVariant
result' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
GVariant -> IO GVariant
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result'
#if defined(ENABLE_OVERLOADING)
data DiscovererInfoToVariantMethodInfo
instance (signature ~ ([GstPbutils.Flags.DiscovererSerializeFlags] -> m GVariant), MonadIO m, IsDiscovererInfo a) => O.OverloadedMethod DiscovererInfoToVariantMethodInfo a signature where
overloadedMethod = discovererInfoToVariant
instance O.OverloadedMethodInfo DiscovererInfoToVariantMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstPbutils.Objects.DiscovererInfo.discovererInfoToVariant",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstpbutils-1.0.24/docs/GI-GstPbutils-Objects-DiscovererInfo.html#v:discovererInfoToVariant"
})
#endif
foreign import ccall "gst_discoverer_info_from_variant" gst_discoverer_info_from_variant ::
Ptr GVariant ->
IO (Ptr DiscovererInfo)
discovererInfoFromVariant ::
(B.CallStack.HasCallStack, MonadIO m) =>
GVariant
-> m DiscovererInfo
discovererInfoFromVariant :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GVariant -> m DiscovererInfo
discovererInfoFromVariant GVariant
variant = IO DiscovererInfo -> m DiscovererInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DiscovererInfo -> m DiscovererInfo)
-> IO DiscovererInfo -> m DiscovererInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr GVariant
variant' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
variant
Ptr DiscovererInfo
result <- Ptr GVariant -> IO (Ptr DiscovererInfo)
gst_discoverer_info_from_variant Ptr GVariant
variant'
Text -> Ptr DiscovererInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"discovererInfoFromVariant" Ptr DiscovererInfo
result
DiscovererInfo
result' <- ((ManagedPtr DiscovererInfo -> DiscovererInfo)
-> Ptr DiscovererInfo -> IO DiscovererInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DiscovererInfo -> DiscovererInfo
DiscovererInfo) Ptr DiscovererInfo
result
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
variant
DiscovererInfo -> IO DiscovererInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DiscovererInfo
result'
#if defined(ENABLE_OVERLOADING)
#endif