{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GES.Objects.UriSourceAsset
(
UriSourceAsset(..) ,
IsUriSourceAsset ,
toUriSourceAsset ,
#if defined(ENABLE_OVERLOADING)
ResolveUriSourceAssetMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
UriSourceAssetGetFilesourceAssetMethodInfo,
#endif
uriSourceAssetGetFilesourceAsset ,
#if defined(ENABLE_OVERLOADING)
UriSourceAssetGetStreamInfoMethodInfo ,
#endif
uriSourceAssetGetStreamInfo ,
#if defined(ENABLE_OVERLOADING)
UriSourceAssetGetStreamUriMethodInfo ,
#endif
uriSourceAssetGetStreamUri ,
#if defined(ENABLE_OVERLOADING)
UriSourceAssetIsImageMethodInfo ,
#endif
uriSourceAssetIsImage ,
) 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.GHashTable as B.GHT
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.Kind as DK
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 {-# SOURCE #-} qualified GI.GES.Interfaces.MetaContainer as GES.MetaContainer
import {-# SOURCE #-} qualified GI.GES.Objects.Asset as GES.Asset
import {-# SOURCE #-} qualified GI.GES.Objects.TrackElementAsset as GES.TrackElementAsset
import {-# SOURCE #-} qualified GI.GES.Objects.UriClipAsset as GES.UriClipAsset
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.GstPbutils.Objects.DiscovererStreamInfo as GstPbutils.DiscovererStreamInfo
newtype UriSourceAsset = UriSourceAsset (SP.ManagedPtr UriSourceAsset)
deriving (UriSourceAsset -> UriSourceAsset -> Bool
(UriSourceAsset -> UriSourceAsset -> Bool)
-> (UriSourceAsset -> UriSourceAsset -> Bool) -> Eq UriSourceAsset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UriSourceAsset -> UriSourceAsset -> Bool
== :: UriSourceAsset -> UriSourceAsset -> Bool
$c/= :: UriSourceAsset -> UriSourceAsset -> Bool
/= :: UriSourceAsset -> UriSourceAsset -> Bool
Eq)
instance SP.ManagedPtrNewtype UriSourceAsset where
toManagedPtr :: UriSourceAsset -> ManagedPtr UriSourceAsset
toManagedPtr (UriSourceAsset ManagedPtr UriSourceAsset
p) = ManagedPtr UriSourceAsset
p
foreign import ccall "ges_uri_source_asset_get_type"
c_ges_uri_source_asset_get_type :: IO B.Types.GType
instance B.Types.TypedObject UriSourceAsset where
glibType :: IO GType
glibType = IO GType
c_ges_uri_source_asset_get_type
instance B.Types.GObject UriSourceAsset
class (SP.GObject o, O.IsDescendantOf UriSourceAsset o) => IsUriSourceAsset o
instance (SP.GObject o, O.IsDescendantOf UriSourceAsset o) => IsUriSourceAsset o
instance O.HasParentTypes UriSourceAsset
type instance O.ParentTypes UriSourceAsset = '[GES.TrackElementAsset.TrackElementAsset, GES.Asset.Asset, GObject.Object.Object, GES.MetaContainer.MetaContainer, Gio.AsyncInitable.AsyncInitable, Gio.Initable.Initable]
toUriSourceAsset :: (MIO.MonadIO m, IsUriSourceAsset o) => o -> m UriSourceAsset
toUriSourceAsset :: forall (m :: * -> *) o.
(MonadIO m, IsUriSourceAsset o) =>
o -> m UriSourceAsset
toUriSourceAsset = IO UriSourceAsset -> m UriSourceAsset
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO UriSourceAsset -> m UriSourceAsset)
-> (o -> IO UriSourceAsset) -> o -> m UriSourceAsset
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr UriSourceAsset -> UriSourceAsset)
-> o -> IO UriSourceAsset
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr UriSourceAsset -> UriSourceAsset
UriSourceAsset
instance B.GValue.IsGValue (Maybe UriSourceAsset) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ges_uri_source_asset_get_type
gvalueSet_ :: Ptr GValue -> Maybe UriSourceAsset -> IO ()
gvalueSet_ Ptr GValue
gv Maybe UriSourceAsset
P.Nothing = Ptr GValue -> Ptr UriSourceAsset -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr UriSourceAsset
forall a. Ptr a
FP.nullPtr :: FP.Ptr UriSourceAsset)
gvalueSet_ Ptr GValue
gv (P.Just UriSourceAsset
obj) = UriSourceAsset -> (Ptr UriSourceAsset -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr UriSourceAsset
obj (Ptr GValue -> Ptr UriSourceAsset -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe UriSourceAsset)
gvalueGet_ Ptr GValue
gv = do
Ptr UriSourceAsset
ptr <- Ptr GValue -> IO (Ptr UriSourceAsset)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr UriSourceAsset)
if Ptr UriSourceAsset
ptr Ptr UriSourceAsset -> Ptr UriSourceAsset -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr UriSourceAsset
forall a. Ptr a
FP.nullPtr
then UriSourceAsset -> Maybe UriSourceAsset
forall a. a -> Maybe a
P.Just (UriSourceAsset -> Maybe UriSourceAsset)
-> IO UriSourceAsset -> IO (Maybe UriSourceAsset)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr UriSourceAsset -> UriSourceAsset)
-> Ptr UriSourceAsset -> IO UriSourceAsset
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr UriSourceAsset -> UriSourceAsset
UriSourceAsset Ptr UriSourceAsset
ptr
else Maybe UriSourceAsset -> IO (Maybe UriSourceAsset)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe UriSourceAsset
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveUriSourceAssetMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveUriSourceAssetMethod "addMetasFromString" o = GES.MetaContainer.MetaContainerAddMetasFromStringMethodInfo
ResolveUriSourceAssetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveUriSourceAssetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveUriSourceAssetMethod "checkMetaRegistered" o = GES.MetaContainer.MetaContainerCheckMetaRegisteredMethodInfo
ResolveUriSourceAssetMethod "extract" o = GES.Asset.AssetExtractMethodInfo
ResolveUriSourceAssetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveUriSourceAssetMethod "foreach" o = GES.MetaContainer.MetaContainerForeachMethodInfo
ResolveUriSourceAssetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveUriSourceAssetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveUriSourceAssetMethod "init" o = Gio.Initable.InitableInitMethodInfo
ResolveUriSourceAssetMethod "initAsync" o = Gio.AsyncInitable.AsyncInitableInitAsyncMethodInfo
ResolveUriSourceAssetMethod "initFinish" o = Gio.AsyncInitable.AsyncInitableInitFinishMethodInfo
ResolveUriSourceAssetMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveUriSourceAssetMethod "isImage" o = UriSourceAssetIsImageMethodInfo
ResolveUriSourceAssetMethod "listProxies" o = GES.Asset.AssetListProxiesMethodInfo
ResolveUriSourceAssetMethod "metasToString" o = GES.MetaContainer.MetaContainerMetasToStringMethodInfo
ResolveUriSourceAssetMethod "newFinish" o = Gio.AsyncInitable.AsyncInitableNewFinishMethodInfo
ResolveUriSourceAssetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveUriSourceAssetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveUriSourceAssetMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveUriSourceAssetMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveUriSourceAssetMethod "registerMeta" o = GES.MetaContainer.MetaContainerRegisterMetaMethodInfo
ResolveUriSourceAssetMethod "registerMetaBoolean" o = GES.MetaContainer.MetaContainerRegisterMetaBooleanMethodInfo
ResolveUriSourceAssetMethod "registerMetaDate" o = GES.MetaContainer.MetaContainerRegisterMetaDateMethodInfo
ResolveUriSourceAssetMethod "registerMetaDateTime" o = GES.MetaContainer.MetaContainerRegisterMetaDateTimeMethodInfo
ResolveUriSourceAssetMethod "registerMetaDouble" o = GES.MetaContainer.MetaContainerRegisterMetaDoubleMethodInfo
ResolveUriSourceAssetMethod "registerMetaFloat" o = GES.MetaContainer.MetaContainerRegisterMetaFloatMethodInfo
ResolveUriSourceAssetMethod "registerMetaInt" o = GES.MetaContainer.MetaContainerRegisterMetaIntMethodInfo
ResolveUriSourceAssetMethod "registerMetaInt64" o = GES.MetaContainer.MetaContainerRegisterMetaInt64MethodInfo
ResolveUriSourceAssetMethod "registerMetaString" o = GES.MetaContainer.MetaContainerRegisterMetaStringMethodInfo
ResolveUriSourceAssetMethod "registerMetaUint" o = GES.MetaContainer.MetaContainerRegisterMetaUintMethodInfo
ResolveUriSourceAssetMethod "registerMetaUint64" o = GES.MetaContainer.MetaContainerRegisterMetaUint64MethodInfo
ResolveUriSourceAssetMethod "registerStaticMeta" o = GES.MetaContainer.MetaContainerRegisterStaticMetaMethodInfo
ResolveUriSourceAssetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveUriSourceAssetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveUriSourceAssetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveUriSourceAssetMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveUriSourceAssetMethod "unproxy" o = GES.Asset.AssetUnproxyMethodInfo
ResolveUriSourceAssetMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveUriSourceAssetMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveUriSourceAssetMethod "getBoolean" o = GES.MetaContainer.MetaContainerGetBooleanMethodInfo
ResolveUriSourceAssetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveUriSourceAssetMethod "getDate" o = GES.MetaContainer.MetaContainerGetDateMethodInfo
ResolveUriSourceAssetMethod "getDateTime" o = GES.MetaContainer.MetaContainerGetDateTimeMethodInfo
ResolveUriSourceAssetMethod "getDouble" o = GES.MetaContainer.MetaContainerGetDoubleMethodInfo
ResolveUriSourceAssetMethod "getError" o = GES.Asset.AssetGetErrorMethodInfo
ResolveUriSourceAssetMethod "getExtractableType" o = GES.Asset.AssetGetExtractableTypeMethodInfo
ResolveUriSourceAssetMethod "getFilesourceAsset" o = UriSourceAssetGetFilesourceAssetMethodInfo
ResolveUriSourceAssetMethod "getFloat" o = GES.MetaContainer.MetaContainerGetFloatMethodInfo
ResolveUriSourceAssetMethod "getId" o = GES.Asset.AssetGetIdMethodInfo
ResolveUriSourceAssetMethod "getInt" o = GES.MetaContainer.MetaContainerGetIntMethodInfo
ResolveUriSourceAssetMethod "getInt64" o = GES.MetaContainer.MetaContainerGetInt64MethodInfo
ResolveUriSourceAssetMethod "getMarkerList" o = GES.MetaContainer.MetaContainerGetMarkerListMethodInfo
ResolveUriSourceAssetMethod "getMeta" o = GES.MetaContainer.MetaContainerGetMetaMethodInfo
ResolveUriSourceAssetMethod "getNaturalFramerate" o = GES.TrackElementAsset.TrackElementAssetGetNaturalFramerateMethodInfo
ResolveUriSourceAssetMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveUriSourceAssetMethod "getProxy" o = GES.Asset.AssetGetProxyMethodInfo
ResolveUriSourceAssetMethod "getProxyTarget" o = GES.Asset.AssetGetProxyTargetMethodInfo
ResolveUriSourceAssetMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveUriSourceAssetMethod "getStreamInfo" o = UriSourceAssetGetStreamInfoMethodInfo
ResolveUriSourceAssetMethod "getStreamUri" o = UriSourceAssetGetStreamUriMethodInfo
ResolveUriSourceAssetMethod "getString" o = GES.MetaContainer.MetaContainerGetStringMethodInfo
ResolveUriSourceAssetMethod "getTrackType" o = GES.TrackElementAsset.TrackElementAssetGetTrackTypeMethodInfo
ResolveUriSourceAssetMethod "getUint" o = GES.MetaContainer.MetaContainerGetUintMethodInfo
ResolveUriSourceAssetMethod "getUint64" o = GES.MetaContainer.MetaContainerGetUint64MethodInfo
ResolveUriSourceAssetMethod "setBoolean" o = GES.MetaContainer.MetaContainerSetBooleanMethodInfo
ResolveUriSourceAssetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveUriSourceAssetMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveUriSourceAssetMethod "setDate" o = GES.MetaContainer.MetaContainerSetDateMethodInfo
ResolveUriSourceAssetMethod "setDateTime" o = GES.MetaContainer.MetaContainerSetDateTimeMethodInfo
ResolveUriSourceAssetMethod "setDouble" o = GES.MetaContainer.MetaContainerSetDoubleMethodInfo
ResolveUriSourceAssetMethod "setFloat" o = GES.MetaContainer.MetaContainerSetFloatMethodInfo
ResolveUriSourceAssetMethod "setInt" o = GES.MetaContainer.MetaContainerSetIntMethodInfo
ResolveUriSourceAssetMethod "setInt64" o = GES.MetaContainer.MetaContainerSetInt64MethodInfo
ResolveUriSourceAssetMethod "setMarkerList" o = GES.MetaContainer.MetaContainerSetMarkerListMethodInfo
ResolveUriSourceAssetMethod "setMeta" o = GES.MetaContainer.MetaContainerSetMetaMethodInfo
ResolveUriSourceAssetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveUriSourceAssetMethod "setProxy" o = GES.Asset.AssetSetProxyMethodInfo
ResolveUriSourceAssetMethod "setString" o = GES.MetaContainer.MetaContainerSetStringMethodInfo
ResolveUriSourceAssetMethod "setTrackType" o = GES.TrackElementAsset.TrackElementAssetSetTrackTypeMethodInfo
ResolveUriSourceAssetMethod "setUint" o = GES.MetaContainer.MetaContainerSetUintMethodInfo
ResolveUriSourceAssetMethod "setUint64" o = GES.MetaContainer.MetaContainerSetUint64MethodInfo
ResolveUriSourceAssetMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveUriSourceAssetMethod t UriSourceAsset, O.OverloadedMethod info UriSourceAsset p) => OL.IsLabel t (UriSourceAsset -> 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 ~ ResolveUriSourceAssetMethod t UriSourceAsset, O.OverloadedMethod info UriSourceAsset p, R.HasField t UriSourceAsset p) => R.HasField t UriSourceAsset p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveUriSourceAssetMethod t UriSourceAsset, O.OverloadedMethodInfo info UriSourceAsset) => OL.IsLabel t (O.MethodProxy info UriSourceAsset) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList UriSourceAsset
type instance O.AttributeList UriSourceAsset = UriSourceAssetAttributeList
type UriSourceAssetAttributeList = ('[ '("extractableType", GES.Asset.AssetExtractableTypePropertyInfo), '("id", GES.Asset.AssetIdPropertyInfo), '("proxy", GES.Asset.AssetProxyPropertyInfo), '("proxyTarget", GES.Asset.AssetProxyTargetPropertyInfo), '("trackType", GES.TrackElementAsset.TrackElementAssetTrackTypePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList UriSourceAsset = UriSourceAssetSignalList
type UriSourceAssetSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("notifyMeta", GES.MetaContainer.MetaContainerNotifyMetaSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "ges_uri_source_asset_get_filesource_asset" ges_uri_source_asset_get_filesource_asset ::
Ptr UriSourceAsset ->
IO (Ptr GES.UriClipAsset.UriClipAsset)
uriSourceAssetGetFilesourceAsset ::
(B.CallStack.HasCallStack, MonadIO m, IsUriSourceAsset a) =>
a
-> m GES.UriClipAsset.UriClipAsset
uriSourceAssetGetFilesourceAsset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUriSourceAsset a) =>
a -> m UriClipAsset
uriSourceAssetGetFilesourceAsset a
asset = IO UriClipAsset -> m UriClipAsset
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UriClipAsset -> m UriClipAsset)
-> IO UriClipAsset -> m UriClipAsset
forall a b. (a -> b) -> a -> b
$ do
Ptr UriSourceAsset
asset' <- a -> IO (Ptr UriSourceAsset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
asset
Ptr UriClipAsset
result <- Ptr UriSourceAsset -> IO (Ptr UriClipAsset)
ges_uri_source_asset_get_filesource_asset Ptr UriSourceAsset
asset'
Text -> Ptr UriClipAsset -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"uriSourceAssetGetFilesourceAsset" Ptr UriClipAsset
result
UriClipAsset
result' <- ((ManagedPtr UriClipAsset -> UriClipAsset)
-> Ptr UriClipAsset -> IO UriClipAsset
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr UriClipAsset -> UriClipAsset
GES.UriClipAsset.UriClipAsset) Ptr UriClipAsset
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
asset
UriClipAsset -> IO UriClipAsset
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return UriClipAsset
result'
#if defined(ENABLE_OVERLOADING)
data UriSourceAssetGetFilesourceAssetMethodInfo
instance (signature ~ (m GES.UriClipAsset.UriClipAsset), MonadIO m, IsUriSourceAsset a) => O.OverloadedMethod UriSourceAssetGetFilesourceAssetMethodInfo a signature where
overloadedMethod = uriSourceAssetGetFilesourceAsset
instance O.OverloadedMethodInfo UriSourceAssetGetFilesourceAssetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.UriSourceAsset.uriSourceAssetGetFilesourceAsset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-UriSourceAsset.html#v:uriSourceAssetGetFilesourceAsset"
})
#endif
foreign import ccall "ges_uri_source_asset_get_stream_info" ges_uri_source_asset_get_stream_info ::
Ptr UriSourceAsset ->
IO (Ptr GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo)
uriSourceAssetGetStreamInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsUriSourceAsset a) =>
a
-> m GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo
uriSourceAssetGetStreamInfo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUriSourceAsset a) =>
a -> m DiscovererStreamInfo
uriSourceAssetGetStreamInfo a
asset = IO DiscovererStreamInfo -> m DiscovererStreamInfo
forall a. IO a -> m a
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 UriSourceAsset
asset' <- a -> IO (Ptr UriSourceAsset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
asset
Ptr DiscovererStreamInfo
result <- Ptr UriSourceAsset -> IO (Ptr DiscovererStreamInfo)
ges_uri_source_asset_get_stream_info Ptr UriSourceAsset
asset'
Text -> Ptr DiscovererStreamInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"uriSourceAssetGetStreamInfo" 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
newObject ManagedPtr DiscovererStreamInfo -> DiscovererStreamInfo
GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo) Ptr DiscovererStreamInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
asset
DiscovererStreamInfo -> IO DiscovererStreamInfo
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DiscovererStreamInfo
result'
#if defined(ENABLE_OVERLOADING)
data UriSourceAssetGetStreamInfoMethodInfo
instance (signature ~ (m GstPbutils.DiscovererStreamInfo.DiscovererStreamInfo), MonadIO m, IsUriSourceAsset a) => O.OverloadedMethod UriSourceAssetGetStreamInfoMethodInfo a signature where
overloadedMethod = uriSourceAssetGetStreamInfo
instance O.OverloadedMethodInfo UriSourceAssetGetStreamInfoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.UriSourceAsset.uriSourceAssetGetStreamInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-UriSourceAsset.html#v:uriSourceAssetGetStreamInfo"
})
#endif
foreign import ccall "ges_uri_source_asset_get_stream_uri" ges_uri_source_asset_get_stream_uri ::
Ptr UriSourceAsset ->
IO CString
uriSourceAssetGetStreamUri ::
(B.CallStack.HasCallStack, MonadIO m, IsUriSourceAsset a) =>
a
-> m T.Text
uriSourceAssetGetStreamUri :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUriSourceAsset a) =>
a -> m Text
uriSourceAssetGetStreamUri a
asset = IO Text -> m Text
forall a. IO a -> m a
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 UriSourceAsset
asset' <- a -> IO (Ptr UriSourceAsset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
asset
CString
result <- Ptr UriSourceAsset -> IO CString
ges_uri_source_asset_get_stream_uri Ptr UriSourceAsset
asset'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"uriSourceAssetGetStreamUri" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
asset
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data UriSourceAssetGetStreamUriMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsUriSourceAsset a) => O.OverloadedMethod UriSourceAssetGetStreamUriMethodInfo a signature where
overloadedMethod = uriSourceAssetGetStreamUri
instance O.OverloadedMethodInfo UriSourceAssetGetStreamUriMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.UriSourceAsset.uriSourceAssetGetStreamUri",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-UriSourceAsset.html#v:uriSourceAssetGetStreamUri"
})
#endif
foreign import ccall "ges_uri_source_asset_is_image" ges_uri_source_asset_is_image ::
Ptr UriSourceAsset ->
IO CInt
uriSourceAssetIsImage ::
(B.CallStack.HasCallStack, MonadIO m, IsUriSourceAsset a) =>
a
-> m Bool
uriSourceAssetIsImage :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUriSourceAsset a) =>
a -> m Bool
uriSourceAssetIsImage a
asset = IO Bool -> m Bool
forall a. IO a -> m a
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 UriSourceAsset
asset' <- a -> IO (Ptr UriSourceAsset)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
asset
CInt
result <- Ptr UriSourceAsset -> IO CInt
ges_uri_source_asset_is_image Ptr UriSourceAsset
asset'
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
asset
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data UriSourceAssetIsImageMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsUriSourceAsset a) => O.OverloadedMethod UriSourceAssetIsImageMethodInfo a signature where
overloadedMethod = uriSourceAssetIsImage
instance O.OverloadedMethodInfo UriSourceAssetIsImageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GES.Objects.UriSourceAsset.uriSourceAssetIsImage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ges-1.0.4/docs/GI-GES-Objects-UriSourceAsset.html#v:uriSourceAssetIsImage"
})
#endif