#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gst.Objects.DeviceProvider
(
DeviceProvider(..) ,
IsDeviceProvider ,
toDeviceProvider ,
noDeviceProvider ,
#if ENABLE_OVERLOADING
DeviceProviderCanMonitorMethodInfo ,
#endif
deviceProviderCanMonitor ,
#if ENABLE_OVERLOADING
DeviceProviderDeviceAddMethodInfo ,
#endif
deviceProviderDeviceAdd ,
#if ENABLE_OVERLOADING
DeviceProviderDeviceChangedMethodInfo ,
#endif
deviceProviderDeviceChanged ,
#if ENABLE_OVERLOADING
DeviceProviderDeviceRemoveMethodInfo ,
#endif
deviceProviderDeviceRemove ,
#if ENABLE_OVERLOADING
DeviceProviderGetBusMethodInfo ,
#endif
deviceProviderGetBus ,
#if ENABLE_OVERLOADING
DeviceProviderGetDevicesMethodInfo ,
#endif
deviceProviderGetDevices ,
#if ENABLE_OVERLOADING
DeviceProviderGetFactoryMethodInfo ,
#endif
deviceProviderGetFactory ,
#if ENABLE_OVERLOADING
DeviceProviderGetHiddenProvidersMethodInfo,
#endif
deviceProviderGetHiddenProviders ,
#if ENABLE_OVERLOADING
DeviceProviderGetMetadataMethodInfo ,
#endif
deviceProviderGetMetadata ,
#if ENABLE_OVERLOADING
DeviceProviderHideProviderMethodInfo ,
#endif
deviceProviderHideProvider ,
deviceProviderRegister ,
#if ENABLE_OVERLOADING
DeviceProviderStartMethodInfo ,
#endif
deviceProviderStart ,
#if ENABLE_OVERLOADING
DeviceProviderStopMethodInfo ,
#endif
deviceProviderStop ,
#if ENABLE_OVERLOADING
DeviceProviderUnhideProviderMethodInfo ,
#endif
deviceProviderUnhideProvider ,
C_DeviceProviderProviderHiddenCallback ,
DeviceProviderProviderHiddenCallback ,
#if ENABLE_OVERLOADING
DeviceProviderProviderHiddenSignalInfo ,
#endif
afterDeviceProviderProviderHidden ,
genClosure_DeviceProviderProviderHidden ,
mk_DeviceProviderProviderHiddenCallback ,
noDeviceProviderProviderHiddenCallback ,
onDeviceProviderProviderHidden ,
wrap_DeviceProviderProviderHiddenCallback,
C_DeviceProviderProviderUnhiddenCallback,
DeviceProviderProviderUnhiddenCallback ,
#if ENABLE_OVERLOADING
DeviceProviderProviderUnhiddenSignalInfo,
#endif
afterDeviceProviderProviderUnhidden ,
genClosure_DeviceProviderProviderUnhidden,
mk_DeviceProviderProviderUnhiddenCallback,
noDeviceProviderProviderUnhiddenCallback,
onDeviceProviderProviderUnhidden ,
wrap_DeviceProviderProviderUnhiddenCallback,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gst.Objects.Bus as Gst.Bus
import {-# SOURCE #-} qualified GI.Gst.Objects.Device as Gst.Device
import {-# SOURCE #-} qualified GI.Gst.Objects.DeviceProviderFactory as Gst.DeviceProviderFactory
import {-# SOURCE #-} qualified GI.Gst.Objects.Object as Gst.Object
import {-# SOURCE #-} qualified GI.Gst.Objects.Plugin as Gst.Plugin
newtype DeviceProvider = DeviceProvider (ManagedPtr DeviceProvider)
foreign import ccall "gst_device_provider_get_type"
c_gst_device_provider_get_type :: IO GType
instance GObject DeviceProvider where
gobjectType = c_gst_device_provider_get_type
class (GObject o, O.IsDescendantOf DeviceProvider o) => IsDeviceProvider o
instance (GObject o, O.IsDescendantOf DeviceProvider o) => IsDeviceProvider o
instance O.HasParentTypes DeviceProvider
type instance O.ParentTypes DeviceProvider = '[Gst.Object.Object, GObject.Object.Object]
toDeviceProvider :: (MonadIO m, IsDeviceProvider o) => o -> m DeviceProvider
toDeviceProvider = liftIO . unsafeCastTo DeviceProvider
noDeviceProvider :: Maybe DeviceProvider
noDeviceProvider = Nothing
#if ENABLE_OVERLOADING
type family ResolveDeviceProviderMethod (t :: Symbol) (o :: *) :: * where
ResolveDeviceProviderMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
ResolveDeviceProviderMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeviceProviderMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeviceProviderMethod "canMonitor" o = DeviceProviderCanMonitorMethodInfo
ResolveDeviceProviderMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
ResolveDeviceProviderMethod "deviceAdd" o = DeviceProviderDeviceAddMethodInfo
ResolveDeviceProviderMethod "deviceChanged" o = DeviceProviderDeviceChangedMethodInfo
ResolveDeviceProviderMethod "deviceRemove" o = DeviceProviderDeviceRemoveMethodInfo
ResolveDeviceProviderMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeviceProviderMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeviceProviderMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeviceProviderMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
ResolveDeviceProviderMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
ResolveDeviceProviderMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
ResolveDeviceProviderMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
ResolveDeviceProviderMethod "hideProvider" o = DeviceProviderHideProviderMethodInfo
ResolveDeviceProviderMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeviceProviderMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeviceProviderMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeviceProviderMethod "ref" o = Gst.Object.ObjectRefMethodInfo
ResolveDeviceProviderMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeviceProviderMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
ResolveDeviceProviderMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeviceProviderMethod "start" o = DeviceProviderStartMethodInfo
ResolveDeviceProviderMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeviceProviderMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeviceProviderMethod "stop" o = DeviceProviderStopMethodInfo
ResolveDeviceProviderMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
ResolveDeviceProviderMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
ResolveDeviceProviderMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeviceProviderMethod "unhideProvider" o = DeviceProviderUnhideProviderMethodInfo
ResolveDeviceProviderMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
ResolveDeviceProviderMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
ResolveDeviceProviderMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeviceProviderMethod "getBus" o = DeviceProviderGetBusMethodInfo
ResolveDeviceProviderMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
ResolveDeviceProviderMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
ResolveDeviceProviderMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeviceProviderMethod "getDevices" o = DeviceProviderGetDevicesMethodInfo
ResolveDeviceProviderMethod "getFactory" o = DeviceProviderGetFactoryMethodInfo
ResolveDeviceProviderMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
ResolveDeviceProviderMethod "getHiddenProviders" o = DeviceProviderGetHiddenProvidersMethodInfo
ResolveDeviceProviderMethod "getMetadata" o = DeviceProviderGetMetadataMethodInfo
ResolveDeviceProviderMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
ResolveDeviceProviderMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
ResolveDeviceProviderMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
ResolveDeviceProviderMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeviceProviderMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeviceProviderMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
ResolveDeviceProviderMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
ResolveDeviceProviderMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
ResolveDeviceProviderMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
ResolveDeviceProviderMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeviceProviderMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
ResolveDeviceProviderMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
ResolveDeviceProviderMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeviceProviderMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeviceProviderMethod t DeviceProvider, O.MethodInfo info DeviceProvider p) => OL.IsLabel t (DeviceProvider -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
type DeviceProviderProviderHiddenCallback =
T.Text
-> IO ()
noDeviceProviderProviderHiddenCallback :: Maybe DeviceProviderProviderHiddenCallback
noDeviceProviderProviderHiddenCallback = Nothing
type C_DeviceProviderProviderHiddenCallback =
Ptr () ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DeviceProviderProviderHiddenCallback :: C_DeviceProviderProviderHiddenCallback -> IO (FunPtr C_DeviceProviderProviderHiddenCallback)
genClosure_DeviceProviderProviderHidden :: MonadIO m => DeviceProviderProviderHiddenCallback -> m (GClosure C_DeviceProviderProviderHiddenCallback)
genClosure_DeviceProviderProviderHidden cb = liftIO $ do
let cb' = wrap_DeviceProviderProviderHiddenCallback cb
mk_DeviceProviderProviderHiddenCallback cb' >>= B.GClosure.newGClosure
wrap_DeviceProviderProviderHiddenCallback ::
DeviceProviderProviderHiddenCallback ->
C_DeviceProviderProviderHiddenCallback
wrap_DeviceProviderProviderHiddenCallback _cb _ object _ = do
object' <- cstringToText object
_cb object'
onDeviceProviderProviderHidden :: (IsDeviceProvider a, MonadIO m) => a -> DeviceProviderProviderHiddenCallback -> m SignalHandlerId
onDeviceProviderProviderHidden obj cb = liftIO $ do
let cb' = wrap_DeviceProviderProviderHiddenCallback cb
cb'' <- mk_DeviceProviderProviderHiddenCallback cb'
connectSignalFunPtr obj "provider-hidden" cb'' SignalConnectBefore
afterDeviceProviderProviderHidden :: (IsDeviceProvider a, MonadIO m) => a -> DeviceProviderProviderHiddenCallback -> m SignalHandlerId
afterDeviceProviderProviderHidden obj cb = liftIO $ do
let cb' = wrap_DeviceProviderProviderHiddenCallback cb
cb'' <- mk_DeviceProviderProviderHiddenCallback cb'
connectSignalFunPtr obj "provider-hidden" cb'' SignalConnectAfter
type DeviceProviderProviderUnhiddenCallback =
T.Text
-> IO ()
noDeviceProviderProviderUnhiddenCallback :: Maybe DeviceProviderProviderUnhiddenCallback
noDeviceProviderProviderUnhiddenCallback = Nothing
type C_DeviceProviderProviderUnhiddenCallback =
Ptr () ->
CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DeviceProviderProviderUnhiddenCallback :: C_DeviceProviderProviderUnhiddenCallback -> IO (FunPtr C_DeviceProviderProviderUnhiddenCallback)
genClosure_DeviceProviderProviderUnhidden :: MonadIO m => DeviceProviderProviderUnhiddenCallback -> m (GClosure C_DeviceProviderProviderUnhiddenCallback)
genClosure_DeviceProviderProviderUnhidden cb = liftIO $ do
let cb' = wrap_DeviceProviderProviderUnhiddenCallback cb
mk_DeviceProviderProviderUnhiddenCallback cb' >>= B.GClosure.newGClosure
wrap_DeviceProviderProviderUnhiddenCallback ::
DeviceProviderProviderUnhiddenCallback ->
C_DeviceProviderProviderUnhiddenCallback
wrap_DeviceProviderProviderUnhiddenCallback _cb _ object _ = do
object' <- cstringToText object
_cb object'
onDeviceProviderProviderUnhidden :: (IsDeviceProvider a, MonadIO m) => a -> DeviceProviderProviderUnhiddenCallback -> m SignalHandlerId
onDeviceProviderProviderUnhidden obj cb = liftIO $ do
let cb' = wrap_DeviceProviderProviderUnhiddenCallback cb
cb'' <- mk_DeviceProviderProviderUnhiddenCallback cb'
connectSignalFunPtr obj "provider-unhidden" cb'' SignalConnectBefore
afterDeviceProviderProviderUnhidden :: (IsDeviceProvider a, MonadIO m) => a -> DeviceProviderProviderUnhiddenCallback -> m SignalHandlerId
afterDeviceProviderProviderUnhidden obj cb = liftIO $ do
let cb' = wrap_DeviceProviderProviderUnhiddenCallback cb
cb'' <- mk_DeviceProviderProviderUnhiddenCallback cb'
connectSignalFunPtr obj "provider-unhidden" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
instance O.HasAttributeList DeviceProvider
type instance O.AttributeList DeviceProvider = DeviceProviderAttributeList
type DeviceProviderAttributeList = ('[ '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
data DeviceProviderProviderHiddenSignalInfo
instance SignalInfo DeviceProviderProviderHiddenSignalInfo where
type HaskellCallbackType DeviceProviderProviderHiddenSignalInfo = DeviceProviderProviderHiddenCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_DeviceProviderProviderHiddenCallback cb
cb'' <- mk_DeviceProviderProviderHiddenCallback cb'
connectSignalFunPtr obj "provider-hidden" cb'' connectMode
data DeviceProviderProviderUnhiddenSignalInfo
instance SignalInfo DeviceProviderProviderUnhiddenSignalInfo where
type HaskellCallbackType DeviceProviderProviderUnhiddenSignalInfo = DeviceProviderProviderUnhiddenCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_DeviceProviderProviderUnhiddenCallback cb
cb'' <- mk_DeviceProviderProviderUnhiddenCallback cb'
connectSignalFunPtr obj "provider-unhidden" cb'' connectMode
type instance O.SignalList DeviceProvider = DeviceProviderSignalList
type DeviceProviderSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("providerHidden", DeviceProviderProviderHiddenSignalInfo), '("providerUnhidden", DeviceProviderProviderUnhiddenSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_device_provider_can_monitor" gst_device_provider_can_monitor ::
Ptr DeviceProvider ->
IO CInt
deviceProviderCanMonitor ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> m Bool
deviceProviderCanMonitor provider = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
result <- gst_device_provider_can_monitor provider'
let result' = (/= 0) result
touchManagedPtr provider
return result'
#if ENABLE_OVERLOADING
data DeviceProviderCanMonitorMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderCanMonitorMethodInfo a signature where
overloadedMethod _ = deviceProviderCanMonitor
#endif
foreign import ccall "gst_device_provider_device_add" gst_device_provider_device_add ::
Ptr DeviceProvider ->
Ptr Gst.Device.Device ->
IO ()
deviceProviderDeviceAdd ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a, Gst.Device.IsDevice b) =>
a
-> b
-> m ()
deviceProviderDeviceAdd provider device = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
device' <- unsafeManagedPtrCastPtr device
gst_device_provider_device_add provider' device'
touchManagedPtr provider
touchManagedPtr device
return ()
#if ENABLE_OVERLOADING
data DeviceProviderDeviceAddMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDeviceProvider a, Gst.Device.IsDevice b) => O.MethodInfo DeviceProviderDeviceAddMethodInfo a signature where
overloadedMethod _ = deviceProviderDeviceAdd
#endif
foreign import ccall "gst_device_provider_device_changed" gst_device_provider_device_changed ::
Ptr DeviceProvider ->
Ptr Gst.Device.Device ->
Ptr Gst.Device.Device ->
IO ()
deviceProviderDeviceChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a, Gst.Device.IsDevice b, Gst.Device.IsDevice c) =>
a
-> b
-> c
-> m ()
deviceProviderDeviceChanged provider device changedDevice = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
device' <- unsafeManagedPtrCastPtr device
changedDevice' <- unsafeManagedPtrCastPtr changedDevice
gst_device_provider_device_changed provider' device' changedDevice'
touchManagedPtr provider
touchManagedPtr device
touchManagedPtr changedDevice
return ()
#if ENABLE_OVERLOADING
data DeviceProviderDeviceChangedMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsDeviceProvider a, Gst.Device.IsDevice b, Gst.Device.IsDevice c) => O.MethodInfo DeviceProviderDeviceChangedMethodInfo a signature where
overloadedMethod _ = deviceProviderDeviceChanged
#endif
foreign import ccall "gst_device_provider_device_remove" gst_device_provider_device_remove ::
Ptr DeviceProvider ->
Ptr Gst.Device.Device ->
IO ()
deviceProviderDeviceRemove ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a, Gst.Device.IsDevice b) =>
a
-> b
-> m ()
deviceProviderDeviceRemove provider device = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
device' <- unsafeManagedPtrCastPtr device
gst_device_provider_device_remove provider' device'
touchManagedPtr provider
touchManagedPtr device
return ()
#if ENABLE_OVERLOADING
data DeviceProviderDeviceRemoveMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDeviceProvider a, Gst.Device.IsDevice b) => O.MethodInfo DeviceProviderDeviceRemoveMethodInfo a signature where
overloadedMethod _ = deviceProviderDeviceRemove
#endif
foreign import ccall "gst_device_provider_get_bus" gst_device_provider_get_bus ::
Ptr DeviceProvider ->
IO (Ptr Gst.Bus.Bus)
deviceProviderGetBus ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> m Gst.Bus.Bus
deviceProviderGetBus provider = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
result <- gst_device_provider_get_bus provider'
checkUnexpectedReturnNULL "deviceProviderGetBus" result
result' <- (wrapObject Gst.Bus.Bus) result
touchManagedPtr provider
return result'
#if ENABLE_OVERLOADING
data DeviceProviderGetBusMethodInfo
instance (signature ~ (m Gst.Bus.Bus), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderGetBusMethodInfo a signature where
overloadedMethod _ = deviceProviderGetBus
#endif
foreign import ccall "gst_device_provider_get_devices" gst_device_provider_get_devices ::
Ptr DeviceProvider ->
IO (Ptr (GList (Ptr Gst.Device.Device)))
deviceProviderGetDevices ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> m [Gst.Device.Device]
deviceProviderGetDevices provider = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
result <- gst_device_provider_get_devices provider'
result' <- unpackGList result
result'' <- mapM (wrapObject Gst.Device.Device) result'
g_list_free result
touchManagedPtr provider
return result''
#if ENABLE_OVERLOADING
data DeviceProviderGetDevicesMethodInfo
instance (signature ~ (m [Gst.Device.Device]), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderGetDevicesMethodInfo a signature where
overloadedMethod _ = deviceProviderGetDevices
#endif
foreign import ccall "gst_device_provider_get_factory" gst_device_provider_get_factory ::
Ptr DeviceProvider ->
IO (Ptr Gst.DeviceProviderFactory.DeviceProviderFactory)
deviceProviderGetFactory ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> m Gst.DeviceProviderFactory.DeviceProviderFactory
deviceProviderGetFactory provider = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
result <- gst_device_provider_get_factory provider'
checkUnexpectedReturnNULL "deviceProviderGetFactory" result
result' <- (newObject Gst.DeviceProviderFactory.DeviceProviderFactory) result
touchManagedPtr provider
return result'
#if ENABLE_OVERLOADING
data DeviceProviderGetFactoryMethodInfo
instance (signature ~ (m Gst.DeviceProviderFactory.DeviceProviderFactory), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderGetFactoryMethodInfo a signature where
overloadedMethod _ = deviceProviderGetFactory
#endif
foreign import ccall "gst_device_provider_get_hidden_providers" gst_device_provider_get_hidden_providers ::
Ptr DeviceProvider ->
IO (Ptr CString)
deviceProviderGetHiddenProviders ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> m [T.Text]
deviceProviderGetHiddenProviders provider = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
result <- gst_device_provider_get_hidden_providers provider'
checkUnexpectedReturnNULL "deviceProviderGetHiddenProviders" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
touchManagedPtr provider
return result'
#if ENABLE_OVERLOADING
data DeviceProviderGetHiddenProvidersMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderGetHiddenProvidersMethodInfo a signature where
overloadedMethod _ = deviceProviderGetHiddenProviders
#endif
foreign import ccall "gst_device_provider_get_metadata" gst_device_provider_get_metadata ::
Ptr DeviceProvider ->
CString ->
IO CString
deviceProviderGetMetadata ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> T.Text
-> m T.Text
deviceProviderGetMetadata provider key = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
key' <- textToCString key
result <- gst_device_provider_get_metadata provider' key'
checkUnexpectedReturnNULL "deviceProviderGetMetadata" result
result' <- cstringToText result
touchManagedPtr provider
freeMem key'
return result'
#if ENABLE_OVERLOADING
data DeviceProviderGetMetadataMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderGetMetadataMethodInfo a signature where
overloadedMethod _ = deviceProviderGetMetadata
#endif
foreign import ccall "gst_device_provider_hide_provider" gst_device_provider_hide_provider ::
Ptr DeviceProvider ->
CString ->
IO ()
deviceProviderHideProvider ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> T.Text
-> m ()
deviceProviderHideProvider provider name = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
name' <- textToCString name
gst_device_provider_hide_provider provider' name'
touchManagedPtr provider
freeMem name'
return ()
#if ENABLE_OVERLOADING
data DeviceProviderHideProviderMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderHideProviderMethodInfo a signature where
overloadedMethod _ = deviceProviderHideProvider
#endif
foreign import ccall "gst_device_provider_start" gst_device_provider_start ::
Ptr DeviceProvider ->
IO CInt
deviceProviderStart ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> m Bool
deviceProviderStart provider = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
result <- gst_device_provider_start provider'
let result' = (/= 0) result
touchManagedPtr provider
return result'
#if ENABLE_OVERLOADING
data DeviceProviderStartMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderStartMethodInfo a signature where
overloadedMethod _ = deviceProviderStart
#endif
foreign import ccall "gst_device_provider_stop" gst_device_provider_stop ::
Ptr DeviceProvider ->
IO ()
deviceProviderStop ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> m ()
deviceProviderStop provider = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
gst_device_provider_stop provider'
touchManagedPtr provider
return ()
#if ENABLE_OVERLOADING
data DeviceProviderStopMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderStopMethodInfo a signature where
overloadedMethod _ = deviceProviderStop
#endif
foreign import ccall "gst_device_provider_unhide_provider" gst_device_provider_unhide_provider ::
Ptr DeviceProvider ->
CString ->
IO ()
deviceProviderUnhideProvider ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceProvider a) =>
a
-> T.Text
-> m ()
deviceProviderUnhideProvider provider name = liftIO $ do
provider' <- unsafeManagedPtrCastPtr provider
name' <- textToCString name
gst_device_provider_unhide_provider provider' name'
touchManagedPtr provider
freeMem name'
return ()
#if ENABLE_OVERLOADING
data DeviceProviderUnhideProviderMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDeviceProvider a) => O.MethodInfo DeviceProviderUnhideProviderMethodInfo a signature where
overloadedMethod _ = deviceProviderUnhideProvider
#endif
foreign import ccall "gst_device_provider_register" gst_device_provider_register ::
Ptr Gst.Plugin.Plugin ->
CString ->
Word32 ->
CGType ->
IO CInt
deviceProviderRegister ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Plugin.IsPlugin a) =>
Maybe (a)
-> T.Text
-> Word32
-> GType
-> m Bool
deviceProviderRegister plugin name rank type_ = liftIO $ do
maybePlugin <- case plugin of
Nothing -> return nullPtr
Just jPlugin -> do
jPlugin' <- unsafeManagedPtrCastPtr jPlugin
return jPlugin'
name' <- textToCString name
let type_' = gtypeToCGType type_
result <- gst_device_provider_register maybePlugin name' rank type_'
let result' = (/= 0) result
whenJust plugin touchManagedPtr
freeMem name'
return result'
#if ENABLE_OVERLOADING
#endif