{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstBase.Objects.CollectPads
(
CollectPads(..) ,
IsCollectPads ,
toCollectPads ,
#if defined(ENABLE_OVERLOADING)
ResolveCollectPadsMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
CollectPadsAddPadMethodInfo ,
#endif
collectPadsAddPad ,
#if defined(ENABLE_OVERLOADING)
CollectPadsAvailableMethodInfo ,
#endif
collectPadsAvailable ,
#if defined(ENABLE_OVERLOADING)
CollectPadsClipRunningTimeMethodInfo ,
#endif
collectPadsClipRunningTime ,
#if defined(ENABLE_OVERLOADING)
CollectPadsEventDefaultMethodInfo ,
#endif
collectPadsEventDefault ,
#if defined(ENABLE_OVERLOADING)
CollectPadsFlushMethodInfo ,
#endif
collectPadsFlush ,
collectPadsNew ,
#if defined(ENABLE_OVERLOADING)
CollectPadsPeekMethodInfo ,
#endif
collectPadsPeek ,
#if defined(ENABLE_OVERLOADING)
CollectPadsPopMethodInfo ,
#endif
collectPadsPop ,
#if defined(ENABLE_OVERLOADING)
CollectPadsQueryDefaultMethodInfo ,
#endif
collectPadsQueryDefault ,
#if defined(ENABLE_OVERLOADING)
CollectPadsReadBufferMethodInfo ,
#endif
collectPadsReadBuffer ,
#if defined(ENABLE_OVERLOADING)
CollectPadsRemovePadMethodInfo ,
#endif
collectPadsRemovePad ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetBufferFunctionMethodInfo ,
#endif
collectPadsSetBufferFunction ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetClipFunctionMethodInfo ,
#endif
collectPadsSetClipFunction ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetCompareFunctionMethodInfo ,
#endif
collectPadsSetCompareFunction ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetEventFunctionMethodInfo ,
#endif
collectPadsSetEventFunction ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetFlushFunctionMethodInfo ,
#endif
collectPadsSetFlushFunction ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetFlushingMethodInfo ,
#endif
collectPadsSetFlushing ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetFunctionMethodInfo ,
#endif
collectPadsSetFunction ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetQueryFunctionMethodInfo ,
#endif
collectPadsSetQueryFunction ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSetWaitingMethodInfo ,
#endif
collectPadsSetWaiting ,
#if defined(ENABLE_OVERLOADING)
CollectPadsSrcEventDefaultMethodInfo ,
#endif
collectPadsSrcEventDefault ,
#if defined(ENABLE_OVERLOADING)
CollectPadsStartMethodInfo ,
#endif
collectPadsStart ,
#if defined(ENABLE_OVERLOADING)
CollectPadsStopMethodInfo ,
#endif
collectPadsStop ,
#if defined(ENABLE_OVERLOADING)
CollectPadsTakeBufferMethodInfo ,
#endif
collectPadsTakeBuffer ,
) 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.Enums as Gst.Enums
import qualified GI.Gst.Objects.Object as Gst.Object
import qualified GI.Gst.Objects.Pad as Gst.Pad
import qualified GI.Gst.Structs.Buffer as Gst.Buffer
import qualified GI.Gst.Structs.Event as Gst.Event
import qualified GI.Gst.Structs.Query as Gst.Query
import qualified GI.GstBase.Callbacks as GstBase.Callbacks
import {-# SOURCE #-} qualified GI.GstBase.Structs.CollectData as GstBase.CollectData
newtype CollectPads = CollectPads (SP.ManagedPtr CollectPads)
deriving (CollectPads -> CollectPads -> Bool
(CollectPads -> CollectPads -> Bool)
-> (CollectPads -> CollectPads -> Bool) -> Eq CollectPads
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CollectPads -> CollectPads -> Bool
$c/= :: CollectPads -> CollectPads -> Bool
== :: CollectPads -> CollectPads -> Bool
$c== :: CollectPads -> CollectPads -> Bool
Eq)
instance SP.ManagedPtrNewtype CollectPads where
toManagedPtr :: CollectPads -> ManagedPtr CollectPads
toManagedPtr (CollectPads ManagedPtr CollectPads
p) = ManagedPtr CollectPads
p
foreign import ccall "gst_collect_pads_get_type"
c_gst_collect_pads_get_type :: IO B.Types.GType
instance B.Types.TypedObject CollectPads where
glibType :: IO GType
glibType = IO GType
c_gst_collect_pads_get_type
instance B.Types.GObject CollectPads
class (SP.GObject o, O.IsDescendantOf CollectPads o) => IsCollectPads o
instance (SP.GObject o, O.IsDescendantOf CollectPads o) => IsCollectPads o
instance O.HasParentTypes CollectPads
type instance O.ParentTypes CollectPads = '[Gst.Object.Object, GObject.Object.Object]
toCollectPads :: (MIO.MonadIO m, IsCollectPads o) => o -> m CollectPads
toCollectPads :: forall (m :: * -> *) o.
(MonadIO m, IsCollectPads o) =>
o -> m CollectPads
toCollectPads = IO CollectPads -> m CollectPads
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO CollectPads -> m CollectPads)
-> (o -> IO CollectPads) -> o -> m CollectPads
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr CollectPads -> CollectPads) -> o -> IO CollectPads
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr CollectPads -> CollectPads
CollectPads
instance B.GValue.IsGValue (Maybe CollectPads) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_collect_pads_get_type
gvalueSet_ :: Ptr GValue -> Maybe CollectPads -> IO ()
gvalueSet_ Ptr GValue
gv Maybe CollectPads
P.Nothing = Ptr GValue -> Ptr CollectPads -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr CollectPads
forall a. Ptr a
FP.nullPtr :: FP.Ptr CollectPads)
gvalueSet_ Ptr GValue
gv (P.Just CollectPads
obj) = CollectPads -> (Ptr CollectPads -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr CollectPads
obj (Ptr GValue -> Ptr CollectPads -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe CollectPads)
gvalueGet_ Ptr GValue
gv = do
Ptr CollectPads
ptr <- Ptr GValue -> IO (Ptr CollectPads)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr CollectPads)
if Ptr CollectPads
ptr Ptr CollectPads -> Ptr CollectPads -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr CollectPads
forall a. Ptr a
FP.nullPtr
then CollectPads -> Maybe CollectPads
forall a. a -> Maybe a
P.Just (CollectPads -> Maybe CollectPads)
-> IO CollectPads -> IO (Maybe CollectPads)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr CollectPads -> CollectPads)
-> Ptr CollectPads -> IO CollectPads
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr CollectPads -> CollectPads
CollectPads Ptr CollectPads
ptr
else Maybe CollectPads -> IO (Maybe CollectPads)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe CollectPads
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveCollectPadsMethod (t :: Symbol) (o :: *) :: * where
ResolveCollectPadsMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
ResolveCollectPadsMethod "addPad" o = CollectPadsAddPadMethodInfo
ResolveCollectPadsMethod "available" o = CollectPadsAvailableMethodInfo
ResolveCollectPadsMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveCollectPadsMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveCollectPadsMethod "clipRunningTime" o = CollectPadsClipRunningTimeMethodInfo
ResolveCollectPadsMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
ResolveCollectPadsMethod "eventDefault" o = CollectPadsEventDefaultMethodInfo
ResolveCollectPadsMethod "flush" o = CollectPadsFlushMethodInfo
ResolveCollectPadsMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveCollectPadsMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveCollectPadsMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveCollectPadsMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
ResolveCollectPadsMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
ResolveCollectPadsMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
ResolveCollectPadsMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
ResolveCollectPadsMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveCollectPadsMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveCollectPadsMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveCollectPadsMethod "peek" o = CollectPadsPeekMethodInfo
ResolveCollectPadsMethod "pop" o = CollectPadsPopMethodInfo
ResolveCollectPadsMethod "queryDefault" o = CollectPadsQueryDefaultMethodInfo
ResolveCollectPadsMethod "readBuffer" o = CollectPadsReadBufferMethodInfo
ResolveCollectPadsMethod "ref" o = Gst.Object.ObjectRefMethodInfo
ResolveCollectPadsMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveCollectPadsMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
ResolveCollectPadsMethod "removePad" o = CollectPadsRemovePadMethodInfo
ResolveCollectPadsMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveCollectPadsMethod "srcEventDefault" o = CollectPadsSrcEventDefaultMethodInfo
ResolveCollectPadsMethod "start" o = CollectPadsStartMethodInfo
ResolveCollectPadsMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveCollectPadsMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveCollectPadsMethod "stop" o = CollectPadsStopMethodInfo
ResolveCollectPadsMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
ResolveCollectPadsMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
ResolveCollectPadsMethod "takeBuffer" o = CollectPadsTakeBufferMethodInfo
ResolveCollectPadsMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveCollectPadsMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
ResolveCollectPadsMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
ResolveCollectPadsMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveCollectPadsMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
ResolveCollectPadsMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
ResolveCollectPadsMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveCollectPadsMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
ResolveCollectPadsMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
ResolveCollectPadsMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
ResolveCollectPadsMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
ResolveCollectPadsMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveCollectPadsMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveCollectPadsMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
ResolveCollectPadsMethod "setBufferFunction" o = CollectPadsSetBufferFunctionMethodInfo
ResolveCollectPadsMethod "setClipFunction" o = CollectPadsSetClipFunctionMethodInfo
ResolveCollectPadsMethod "setCompareFunction" o = CollectPadsSetCompareFunctionMethodInfo
ResolveCollectPadsMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
ResolveCollectPadsMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
ResolveCollectPadsMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
ResolveCollectPadsMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveCollectPadsMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveCollectPadsMethod "setEventFunction" o = CollectPadsSetEventFunctionMethodInfo
ResolveCollectPadsMethod "setFlushFunction" o = CollectPadsSetFlushFunctionMethodInfo
ResolveCollectPadsMethod "setFlushing" o = CollectPadsSetFlushingMethodInfo
ResolveCollectPadsMethod "setFunction" o = CollectPadsSetFunctionMethodInfo
ResolveCollectPadsMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
ResolveCollectPadsMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
ResolveCollectPadsMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveCollectPadsMethod "setQueryFunction" o = CollectPadsSetQueryFunctionMethodInfo
ResolveCollectPadsMethod "setWaiting" o = CollectPadsSetWaitingMethodInfo
ResolveCollectPadsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveCollectPadsMethod t CollectPads, O.OverloadedMethod info CollectPads p) => OL.IsLabel t (CollectPads -> 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 ~ ResolveCollectPadsMethod t CollectPads, O.OverloadedMethod info CollectPads p, R.HasField t CollectPads p) => R.HasField t CollectPads p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveCollectPadsMethod t CollectPads, O.OverloadedMethodInfo info CollectPads) => OL.IsLabel t (O.MethodProxy info CollectPads) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList CollectPads
type instance O.AttributeList CollectPads = CollectPadsAttributeList
type CollectPadsAttributeList = ('[ '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList CollectPads = CollectPadsSignalList
type CollectPadsSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_collect_pads_new" gst_collect_pads_new ::
IO (Ptr CollectPads)
collectPadsNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m CollectPads
collectPadsNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m CollectPads
collectPadsNew = IO CollectPads -> m CollectPads
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CollectPads -> m CollectPads)
-> IO CollectPads -> m CollectPads
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
result <- IO (Ptr CollectPads)
gst_collect_pads_new
Text -> Ptr CollectPads -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"collectPadsNew" Ptr CollectPads
result
CollectPads
result' <- ((ManagedPtr CollectPads -> CollectPads)
-> Ptr CollectPads -> IO CollectPads
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr CollectPads -> CollectPads
CollectPads) Ptr CollectPads
result
CollectPads -> IO CollectPads
forall (m :: * -> *) a. Monad m => a -> m a
return CollectPads
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_collect_pads_add_pad" gst_collect_pads_add_pad ::
Ptr CollectPads ->
Ptr Gst.Pad.Pad ->
Word32 ->
FunPtr GstBase.Callbacks.C_CollectDataDestroyNotify ->
CInt ->
IO (Ptr GstBase.CollectData.CollectData)
collectPadsAddPad ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a, Gst.Pad.IsPad b) =>
a
-> b
-> Word32
-> GstBase.Callbacks.CollectDataDestroyNotify
-> Bool
-> m (Maybe GstBase.CollectData.CollectData)
collectPadsAddPad :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsCollectPads a, IsPad b) =>
a
-> b
-> Word32
-> CollectDataDestroyNotify
-> Bool
-> m (Maybe CollectData)
collectPadsAddPad a
pads b
pad Word32
size CollectDataDestroyNotify
destroyNotify Bool
lock = IO (Maybe CollectData) -> m (Maybe CollectData)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe CollectData) -> m (Maybe CollectData))
-> IO (Maybe CollectData) -> m (Maybe CollectData)
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr Pad
pad' <- b -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
pad
Ptr (FunPtr C_CollectDataDestroyNotify)
ptrdestroyNotify <- IO (Ptr (FunPtr C_CollectDataDestroyNotify))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr GstBase.Callbacks.C_CollectDataDestroyNotify))
FunPtr C_CollectDataDestroyNotify
destroyNotify' <- C_CollectDataDestroyNotify
-> IO (FunPtr C_CollectDataDestroyNotify)
GstBase.Callbacks.mk_CollectDataDestroyNotify (Maybe (Ptr (FunPtr C_CollectDataDestroyNotify))
-> CollectDataDestroyNotify -> C_CollectDataDestroyNotify
GstBase.Callbacks.wrap_CollectDataDestroyNotify (Ptr (FunPtr C_CollectDataDestroyNotify)
-> Maybe (Ptr (FunPtr C_CollectDataDestroyNotify))
forall a. a -> Maybe a
Just Ptr (FunPtr C_CollectDataDestroyNotify)
ptrdestroyNotify) CollectDataDestroyNotify
destroyNotify)
Ptr (FunPtr C_CollectDataDestroyNotify)
-> FunPtr C_CollectDataDestroyNotify -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_CollectDataDestroyNotify)
ptrdestroyNotify FunPtr C_CollectDataDestroyNotify
destroyNotify'
let lock' :: CInt
lock' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
lock
Ptr CollectData
result <- Ptr CollectPads
-> Ptr Pad
-> Word32
-> FunPtr C_CollectDataDestroyNotify
-> CInt
-> IO (Ptr CollectData)
gst_collect_pads_add_pad Ptr CollectPads
pads' Ptr Pad
pad' Word32
size FunPtr C_CollectDataDestroyNotify
destroyNotify' CInt
lock'
Maybe CollectData
maybeResult <- Ptr CollectData
-> (Ptr CollectData -> IO CollectData) -> IO (Maybe CollectData)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CollectData
result ((Ptr CollectData -> IO CollectData) -> IO (Maybe CollectData))
-> (Ptr CollectData -> IO CollectData) -> IO (Maybe CollectData)
forall a b. (a -> b) -> a -> b
$ \Ptr CollectData
result' -> do
CollectData
result'' <- ((ManagedPtr CollectData -> CollectData)
-> Ptr CollectData -> IO CollectData
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr CollectData -> CollectData
GstBase.CollectData.CollectData) Ptr CollectData
result'
CollectData -> IO CollectData
forall (m :: * -> *) a. Monad m => a -> m a
return CollectData
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
pad
Maybe CollectData -> IO (Maybe CollectData)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe CollectData
maybeResult
#if defined(ENABLE_OVERLOADING)
data CollectPadsAddPadMethodInfo
instance (signature ~ (b -> Word32 -> GstBase.Callbacks.CollectDataDestroyNotify -> Bool -> m (Maybe GstBase.CollectData.CollectData)), MonadIO m, IsCollectPads a, Gst.Pad.IsPad b) => O.OverloadedMethod CollectPadsAddPadMethodInfo a signature where
overloadedMethod = collectPadsAddPad
instance O.OverloadedMethodInfo CollectPadsAddPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsAddPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsAddPad"
})
#endif
foreign import ccall "gst_collect_pads_available" gst_collect_pads_available ::
Ptr CollectPads ->
IO Word32
collectPadsAvailable ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> m Word32
collectPadsAvailable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> m Word32
collectPadsAvailable a
pads = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Word32
result <- Ptr CollectPads -> IO Word32
gst_collect_pads_available Ptr CollectPads
pads'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data CollectPadsAvailableMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsAvailableMethodInfo a signature where
overloadedMethod = collectPadsAvailable
instance O.OverloadedMethodInfo CollectPadsAvailableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsAvailable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsAvailable"
})
#endif
foreign import ccall "gst_collect_pads_clip_running_time" gst_collect_pads_clip_running_time ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
Ptr Gst.Buffer.Buffer ->
Ptr (Ptr Gst.Buffer.Buffer) ->
Ptr () ->
IO CInt
collectPadsClipRunningTime ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> Gst.Buffer.Buffer
-> Ptr ()
-> m ((Gst.Enums.FlowReturn, Maybe Gst.Buffer.Buffer))
collectPadsClipRunningTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> CollectData -> Buffer -> Ptr () -> m (FlowReturn, Maybe Buffer)
collectPadsClipRunningTime a
pads CollectData
cdata Buffer
buf Ptr ()
userData = IO (FlowReturn, Maybe Buffer) -> m (FlowReturn, Maybe Buffer)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (FlowReturn, Maybe Buffer) -> m (FlowReturn, Maybe Buffer))
-> IO (FlowReturn, Maybe Buffer) -> m (FlowReturn, Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
cdata' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
cdata
Ptr Buffer
buf' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buf
Ptr (Ptr Buffer)
outbuf <- IO (Ptr (Ptr Buffer))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Buffer.Buffer))
CInt
result <- Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt
gst_collect_pads_clip_running_time Ptr CollectPads
pads' Ptr CollectData
cdata' Ptr Buffer
buf' Ptr (Ptr Buffer)
outbuf Ptr ()
userData
let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
Ptr Buffer
outbuf' <- Ptr (Ptr Buffer) -> IO (Ptr Buffer)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Buffer)
outbuf
Maybe Buffer
maybeOutbuf' <- Ptr Buffer -> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Buffer
outbuf' ((Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer))
-> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ \Ptr Buffer
outbuf'' -> do
Buffer
outbuf''' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
outbuf''
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
outbuf'''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
cdata
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buf
Ptr (Ptr Buffer) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Buffer)
outbuf
(FlowReturn, Maybe Buffer) -> IO (FlowReturn, Maybe Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return (FlowReturn
result', Maybe Buffer
maybeOutbuf')
#if defined(ENABLE_OVERLOADING)
data CollectPadsClipRunningTimeMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> Gst.Buffer.Buffer -> Ptr () -> m ((Gst.Enums.FlowReturn, Maybe Gst.Buffer.Buffer))), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsClipRunningTimeMethodInfo a signature where
overloadedMethod = collectPadsClipRunningTime
instance O.OverloadedMethodInfo CollectPadsClipRunningTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsClipRunningTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsClipRunningTime"
})
#endif
foreign import ccall "gst_collect_pads_event_default" gst_collect_pads_event_default ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
Ptr Gst.Event.Event ->
CInt ->
IO CInt
collectPadsEventDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> Gst.Event.Event
-> Bool
-> m Bool
collectPadsEventDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectData -> Event -> Bool -> m Bool
collectPadsEventDefault a
pads CollectData
data_ Event
event Bool
discard = 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 CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
data_' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
data_
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
let discard' :: CInt
discard' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
discard
CInt
result <- Ptr CollectPads -> Ptr CollectData -> Ptr Event -> CInt -> IO CInt
gst_collect_pads_event_default Ptr CollectPads
pads' Ptr CollectData
data_' Ptr Event
event' CInt
discard'
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
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
data_
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CollectPadsEventDefaultMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> Gst.Event.Event -> Bool -> m Bool), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsEventDefaultMethodInfo a signature where
overloadedMethod = collectPadsEventDefault
instance O.OverloadedMethodInfo CollectPadsEventDefaultMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsEventDefault",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsEventDefault"
})
#endif
foreign import ccall "gst_collect_pads_flush" gst_collect_pads_flush ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
Word32 ->
IO Word32
collectPadsFlush ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> Word32
-> m Word32
collectPadsFlush :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectData -> Word32 -> m Word32
collectPadsFlush a
pads CollectData
data_ Word32
size = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
data_' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
data_
Word32
result <- Ptr CollectPads -> Ptr CollectData -> Word32 -> IO Word32
gst_collect_pads_flush Ptr CollectPads
pads' Ptr CollectData
data_' Word32
size
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
data_
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data CollectPadsFlushMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> Word32 -> m Word32), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsFlushMethodInfo a signature where
overloadedMethod = collectPadsFlush
instance O.OverloadedMethodInfo CollectPadsFlushMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsFlush",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsFlush"
})
#endif
foreign import ccall "gst_collect_pads_peek" gst_collect_pads_peek ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
IO (Ptr Gst.Buffer.Buffer)
collectPadsPeek ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> m (Maybe Gst.Buffer.Buffer)
collectPadsPeek :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectData -> m (Maybe Buffer)
collectPadsPeek a
pads CollectData
data_ = IO (Maybe Buffer) -> m (Maybe Buffer)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Buffer) -> m (Maybe Buffer))
-> IO (Maybe Buffer) -> m (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
data_' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
data_
Ptr Buffer
result <- Ptr CollectPads -> Ptr CollectData -> IO (Ptr Buffer)
gst_collect_pads_peek Ptr CollectPads
pads' Ptr CollectData
data_'
Maybe Buffer
maybeResult <- Ptr Buffer -> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Buffer
result ((Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer))
-> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ \Ptr Buffer
result' -> do
Buffer
result'' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
result'
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
data_
Maybe Buffer -> IO (Maybe Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Buffer
maybeResult
#if defined(ENABLE_OVERLOADING)
data CollectPadsPeekMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> m (Maybe Gst.Buffer.Buffer)), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsPeekMethodInfo a signature where
overloadedMethod = collectPadsPeek
instance O.OverloadedMethodInfo CollectPadsPeekMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsPeek",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsPeek"
})
#endif
foreign import ccall "gst_collect_pads_pop" gst_collect_pads_pop ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
IO (Ptr Gst.Buffer.Buffer)
collectPadsPop ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> m (Maybe Gst.Buffer.Buffer)
collectPadsPop :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectData -> m (Maybe Buffer)
collectPadsPop a
pads CollectData
data_ = IO (Maybe Buffer) -> m (Maybe Buffer)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Buffer) -> m (Maybe Buffer))
-> IO (Maybe Buffer) -> m (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
data_' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
data_
Ptr Buffer
result <- Ptr CollectPads -> Ptr CollectData -> IO (Ptr Buffer)
gst_collect_pads_pop Ptr CollectPads
pads' Ptr CollectData
data_'
Maybe Buffer
maybeResult <- Ptr Buffer -> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Buffer
result ((Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer))
-> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ \Ptr Buffer
result' -> do
Buffer
result'' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
result'
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
data_
Maybe Buffer -> IO (Maybe Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Buffer
maybeResult
#if defined(ENABLE_OVERLOADING)
data CollectPadsPopMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> m (Maybe Gst.Buffer.Buffer)), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsPopMethodInfo a signature where
overloadedMethod = collectPadsPop
instance O.OverloadedMethodInfo CollectPadsPopMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsPop",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsPop"
})
#endif
foreign import ccall "gst_collect_pads_query_default" gst_collect_pads_query_default ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
Ptr Gst.Query.Query ->
CInt ->
IO CInt
collectPadsQueryDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> Gst.Query.Query
-> Bool
-> m Bool
collectPadsQueryDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectData -> Query -> Bool -> m Bool
collectPadsQueryDefault a
pads CollectData
data_ Query
query Bool
discard = 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 CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
data_' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
data_
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let discard' :: CInt
discard' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
discard
CInt
result <- Ptr CollectPads -> Ptr CollectData -> Ptr Query -> CInt -> IO CInt
gst_collect_pads_query_default Ptr CollectPads
pads' Ptr CollectData
data_' Ptr Query
query' CInt
discard'
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
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
data_
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CollectPadsQueryDefaultMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> Gst.Query.Query -> Bool -> m Bool), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsQueryDefaultMethodInfo a signature where
overloadedMethod = collectPadsQueryDefault
instance O.OverloadedMethodInfo CollectPadsQueryDefaultMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsQueryDefault",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsQueryDefault"
})
#endif
foreign import ccall "gst_collect_pads_read_buffer" gst_collect_pads_read_buffer ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
Word32 ->
IO (Ptr Gst.Buffer.Buffer)
collectPadsReadBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> Word32
-> m (Maybe Gst.Buffer.Buffer)
collectPadsReadBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectData -> Word32 -> m (Maybe Buffer)
collectPadsReadBuffer a
pads CollectData
data_ Word32
size = IO (Maybe Buffer) -> m (Maybe Buffer)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Buffer) -> m (Maybe Buffer))
-> IO (Maybe Buffer) -> m (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
data_' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
data_
Ptr Buffer
result <- Ptr CollectPads -> Ptr CollectData -> Word32 -> IO (Ptr Buffer)
gst_collect_pads_read_buffer Ptr CollectPads
pads' Ptr CollectData
data_' Word32
size
Maybe Buffer
maybeResult <- Ptr Buffer -> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Buffer
result ((Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer))
-> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ \Ptr Buffer
result' -> do
Buffer
result'' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
result'
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
data_
Maybe Buffer -> IO (Maybe Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Buffer
maybeResult
#if defined(ENABLE_OVERLOADING)
data CollectPadsReadBufferMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> Word32 -> m (Maybe Gst.Buffer.Buffer)), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsReadBufferMethodInfo a signature where
overloadedMethod = collectPadsReadBuffer
instance O.OverloadedMethodInfo CollectPadsReadBufferMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsReadBuffer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsReadBuffer"
})
#endif
foreign import ccall "gst_collect_pads_remove_pad" gst_collect_pads_remove_pad ::
Ptr CollectPads ->
Ptr Gst.Pad.Pad ->
IO CInt
collectPadsRemovePad ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a, Gst.Pad.IsPad b) =>
a
-> b
-> m Bool
collectPadsRemovePad :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsCollectPads a, IsPad b) =>
a -> b -> m Bool
collectPadsRemovePad a
pads b
pad = 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 CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr Pad
pad' <- b -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
pad
CInt
result <- Ptr CollectPads -> Ptr Pad -> IO CInt
gst_collect_pads_remove_pad Ptr CollectPads
pads' Ptr Pad
pad'
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
pads
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
pad
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CollectPadsRemovePadMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsCollectPads a, Gst.Pad.IsPad b) => O.OverloadedMethod CollectPadsRemovePadMethodInfo a signature where
overloadedMethod = collectPadsRemovePad
instance O.OverloadedMethodInfo CollectPadsRemovePadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsRemovePad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsRemovePad"
})
#endif
foreign import ccall "gst_collect_pads_set_buffer_function" gst_collect_pads_set_buffer_function ::
Ptr CollectPads ->
FunPtr GstBase.Callbacks.C_CollectPadsBufferFunction ->
Ptr () ->
IO ()
collectPadsSetBufferFunction ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.Callbacks.CollectPadsBufferFunction
-> m ()
collectPadsSetBufferFunction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectPadsBufferFunction -> m ()
collectPadsSetBufferFunction a
pads CollectPadsBufferFunction
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
FunPtr C_CollectPadsBufferFunction
func' <- C_CollectPadsBufferFunction
-> IO (FunPtr C_CollectPadsBufferFunction)
GstBase.Callbacks.mk_CollectPadsBufferFunction (Maybe (Ptr (FunPtr C_CollectPadsBufferFunction))
-> CollectPadsBufferFunction_WithClosures
-> C_CollectPadsBufferFunction
GstBase.Callbacks.wrap_CollectPadsBufferFunction Maybe (Ptr (FunPtr C_CollectPadsBufferFunction))
forall a. Maybe a
Nothing (CollectPadsBufferFunction -> CollectPadsBufferFunction_WithClosures
GstBase.Callbacks.drop_closures_CollectPadsBufferFunction CollectPadsBufferFunction
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr CollectPads
-> FunPtr C_CollectPadsBufferFunction -> Ptr () -> IO ()
gst_collect_pads_set_buffer_function Ptr CollectPads
pads' FunPtr C_CollectPadsBufferFunction
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_CollectPadsBufferFunction -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CollectPadsBufferFunction
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetBufferFunctionMethodInfo
instance (signature ~ (GstBase.Callbacks.CollectPadsBufferFunction -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetBufferFunctionMethodInfo a signature where
overloadedMethod = collectPadsSetBufferFunction
instance O.OverloadedMethodInfo CollectPadsSetBufferFunctionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetBufferFunction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetBufferFunction"
})
#endif
foreign import ccall "gst_collect_pads_set_clip_function" gst_collect_pads_set_clip_function ::
Ptr CollectPads ->
FunPtr GstBase.Callbacks.C_CollectPadsClipFunction ->
Ptr () ->
IO ()
collectPadsSetClipFunction ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.Callbacks.CollectPadsClipFunction
-> m ()
collectPadsSetClipFunction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectPadsClipFunction -> m ()
collectPadsSetClipFunction a
pads CollectPadsClipFunction
clipfunc = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
FunPtr
(Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt)
clipfunc' <- (Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt)
-> IO
(FunPtr
(Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt))
GstBase.Callbacks.mk_CollectPadsClipFunction (Maybe
(Ptr
(FunPtr
(Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt)))
-> CollectPadsClipFunction_WithClosures
-> Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt
GstBase.Callbacks.wrap_CollectPadsClipFunction Maybe
(Ptr
(FunPtr
(Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt)))
forall a. Maybe a
Nothing (CollectPadsClipFunction -> CollectPadsClipFunction_WithClosures
GstBase.Callbacks.drop_closures_CollectPadsClipFunction CollectPadsClipFunction
clipfunc))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr CollectPads
-> FunPtr
(Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt)
-> Ptr ()
-> IO ()
gst_collect_pads_set_clip_function Ptr CollectPads
pads' FunPtr
(Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt)
clipfunc' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr
(Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt)
-> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr
(Ptr CollectPads
-> Ptr CollectData
-> Ptr Buffer
-> Ptr (Ptr Buffer)
-> Ptr ()
-> IO CInt)
clipfunc'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetClipFunctionMethodInfo
instance (signature ~ (GstBase.Callbacks.CollectPadsClipFunction -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetClipFunctionMethodInfo a signature where
overloadedMethod = collectPadsSetClipFunction
instance O.OverloadedMethodInfo CollectPadsSetClipFunctionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetClipFunction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetClipFunction"
})
#endif
foreign import ccall "gst_collect_pads_set_compare_function" gst_collect_pads_set_compare_function ::
Ptr CollectPads ->
FunPtr GstBase.Callbacks.C_CollectPadsCompareFunction ->
Ptr () ->
IO ()
collectPadsSetCompareFunction ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.Callbacks.CollectPadsCompareFunction
-> m ()
collectPadsSetCompareFunction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectPadsCompareFunction -> m ()
collectPadsSetCompareFunction a
pads CollectPadsCompareFunction
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
FunPtr C_CollectPadsCompareFunction
func' <- C_CollectPadsCompareFunction
-> IO (FunPtr C_CollectPadsCompareFunction)
GstBase.Callbacks.mk_CollectPadsCompareFunction (Maybe (Ptr (FunPtr C_CollectPadsCompareFunction))
-> CollectPadsCompareFunction_WithClosures
-> C_CollectPadsCompareFunction
GstBase.Callbacks.wrap_CollectPadsCompareFunction Maybe (Ptr (FunPtr C_CollectPadsCompareFunction))
forall a. Maybe a
Nothing (CollectPadsCompareFunction
-> CollectPadsCompareFunction_WithClosures
GstBase.Callbacks.drop_closures_CollectPadsCompareFunction CollectPadsCompareFunction
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr CollectPads
-> FunPtr C_CollectPadsCompareFunction -> Ptr () -> IO ()
gst_collect_pads_set_compare_function Ptr CollectPads
pads' FunPtr C_CollectPadsCompareFunction
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_CollectPadsCompareFunction -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CollectPadsCompareFunction
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetCompareFunctionMethodInfo
instance (signature ~ (GstBase.Callbacks.CollectPadsCompareFunction -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetCompareFunctionMethodInfo a signature where
overloadedMethod = collectPadsSetCompareFunction
instance O.OverloadedMethodInfo CollectPadsSetCompareFunctionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetCompareFunction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetCompareFunction"
})
#endif
foreign import ccall "gst_collect_pads_set_event_function" gst_collect_pads_set_event_function ::
Ptr CollectPads ->
FunPtr GstBase.Callbacks.C_CollectPadsEventFunction ->
Ptr () ->
IO ()
collectPadsSetEventFunction ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.Callbacks.CollectPadsEventFunction
-> m ()
collectPadsSetEventFunction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectPadsEventFunction -> m ()
collectPadsSetEventFunction a
pads CollectPadsEventFunction
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
FunPtr C_CollectPadsEventFunction
func' <- C_CollectPadsEventFunction
-> IO (FunPtr C_CollectPadsEventFunction)
GstBase.Callbacks.mk_CollectPadsEventFunction (Maybe (Ptr (FunPtr C_CollectPadsEventFunction))
-> CollectPadsEventFunction_WithClosures
-> C_CollectPadsEventFunction
GstBase.Callbacks.wrap_CollectPadsEventFunction Maybe (Ptr (FunPtr C_CollectPadsEventFunction))
forall a. Maybe a
Nothing (CollectPadsEventFunction -> CollectPadsEventFunction_WithClosures
GstBase.Callbacks.drop_closures_CollectPadsEventFunction CollectPadsEventFunction
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr CollectPads
-> FunPtr C_CollectPadsEventFunction -> Ptr () -> IO ()
gst_collect_pads_set_event_function Ptr CollectPads
pads' FunPtr C_CollectPadsEventFunction
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_CollectPadsEventFunction -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CollectPadsEventFunction
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetEventFunctionMethodInfo
instance (signature ~ (GstBase.Callbacks.CollectPadsEventFunction -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetEventFunctionMethodInfo a signature where
overloadedMethod = collectPadsSetEventFunction
instance O.OverloadedMethodInfo CollectPadsSetEventFunctionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetEventFunction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetEventFunction"
})
#endif
foreign import ccall "gst_collect_pads_set_flush_function" gst_collect_pads_set_flush_function ::
Ptr CollectPads ->
FunPtr GstBase.Callbacks.C_CollectPadsFlushFunction ->
Ptr () ->
IO ()
collectPadsSetFlushFunction ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.Callbacks.CollectPadsFlushFunction
-> m ()
collectPadsSetFlushFunction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectPadsFlushFunction -> m ()
collectPadsSetFlushFunction a
pads CollectPadsFlushFunction
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
FunPtr C_CollectPadsFlushFunction
func' <- C_CollectPadsFlushFunction
-> IO (FunPtr C_CollectPadsFlushFunction)
GstBase.Callbacks.mk_CollectPadsFlushFunction (Maybe (Ptr (FunPtr C_CollectPadsFlushFunction))
-> CollectPadsFlushFunction_WithClosures
-> C_CollectPadsFlushFunction
GstBase.Callbacks.wrap_CollectPadsFlushFunction Maybe (Ptr (FunPtr C_CollectPadsFlushFunction))
forall a. Maybe a
Nothing (CollectPadsFlushFunction -> CollectPadsFlushFunction_WithClosures
GstBase.Callbacks.drop_closures_CollectPadsFlushFunction CollectPadsFlushFunction
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr CollectPads
-> FunPtr C_CollectPadsFlushFunction -> Ptr () -> IO ()
gst_collect_pads_set_flush_function Ptr CollectPads
pads' FunPtr C_CollectPadsFlushFunction
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_CollectPadsFlushFunction -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CollectPadsFlushFunction
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetFlushFunctionMethodInfo
instance (signature ~ (GstBase.Callbacks.CollectPadsFlushFunction -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetFlushFunctionMethodInfo a signature where
overloadedMethod = collectPadsSetFlushFunction
instance O.OverloadedMethodInfo CollectPadsSetFlushFunctionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetFlushFunction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetFlushFunction"
})
#endif
foreign import ccall "gst_collect_pads_set_flushing" gst_collect_pads_set_flushing ::
Ptr CollectPads ->
CInt ->
IO ()
collectPadsSetFlushing ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> Bool
-> m ()
collectPadsSetFlushing :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> Bool -> m ()
collectPadsSetFlushing a
pads Bool
flushing = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
let flushing' :: CInt
flushing' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
flushing
Ptr CollectPads -> CInt -> IO ()
gst_collect_pads_set_flushing Ptr CollectPads
pads' CInt
flushing'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetFlushingMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetFlushingMethodInfo a signature where
overloadedMethod = collectPadsSetFlushing
instance O.OverloadedMethodInfo CollectPadsSetFlushingMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetFlushing",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetFlushing"
})
#endif
foreign import ccall "gst_collect_pads_set_function" gst_collect_pads_set_function ::
Ptr CollectPads ->
FunPtr GstBase.Callbacks.C_CollectPadsFunction ->
Ptr () ->
IO ()
collectPadsSetFunction ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.Callbacks.CollectPadsFunction
-> m ()
collectPadsSetFunction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectPadsFunction -> m ()
collectPadsSetFunction a
pads CollectPadsFunction
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
FunPtr C_CollectPadsFunction
func' <- C_CollectPadsFunction -> IO (FunPtr C_CollectPadsFunction)
GstBase.Callbacks.mk_CollectPadsFunction (Maybe (Ptr (FunPtr C_CollectPadsFunction))
-> CollectPadsFunction_WithClosures -> C_CollectPadsFunction
GstBase.Callbacks.wrap_CollectPadsFunction Maybe (Ptr (FunPtr C_CollectPadsFunction))
forall a. Maybe a
Nothing (CollectPadsFunction -> CollectPadsFunction_WithClosures
GstBase.Callbacks.drop_closures_CollectPadsFunction CollectPadsFunction
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr CollectPads -> FunPtr C_CollectPadsFunction -> Ptr () -> IO ()
gst_collect_pads_set_function Ptr CollectPads
pads' FunPtr C_CollectPadsFunction
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_CollectPadsFunction -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CollectPadsFunction
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetFunctionMethodInfo
instance (signature ~ (GstBase.Callbacks.CollectPadsFunction -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetFunctionMethodInfo a signature where
overloadedMethod = collectPadsSetFunction
instance O.OverloadedMethodInfo CollectPadsSetFunctionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetFunction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetFunction"
})
#endif
foreign import ccall "gst_collect_pads_set_query_function" gst_collect_pads_set_query_function ::
Ptr CollectPads ->
FunPtr GstBase.Callbacks.C_CollectPadsQueryFunction ->
Ptr () ->
IO ()
collectPadsSetQueryFunction ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.Callbacks.CollectPadsQueryFunction
-> m ()
collectPadsSetQueryFunction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectPadsQueryFunction -> m ()
collectPadsSetQueryFunction a
pads CollectPadsQueryFunction
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
FunPtr C_CollectPadsQueryFunction
func' <- C_CollectPadsQueryFunction
-> IO (FunPtr C_CollectPadsQueryFunction)
GstBase.Callbacks.mk_CollectPadsQueryFunction (Maybe (Ptr (FunPtr C_CollectPadsQueryFunction))
-> CollectPadsQueryFunction_WithClosures
-> C_CollectPadsQueryFunction
GstBase.Callbacks.wrap_CollectPadsQueryFunction Maybe (Ptr (FunPtr C_CollectPadsQueryFunction))
forall a. Maybe a
Nothing (CollectPadsQueryFunction -> CollectPadsQueryFunction_WithClosures
GstBase.Callbacks.drop_closures_CollectPadsQueryFunction CollectPadsQueryFunction
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr CollectPads
-> FunPtr C_CollectPadsQueryFunction -> Ptr () -> IO ()
gst_collect_pads_set_query_function Ptr CollectPads
pads' FunPtr C_CollectPadsQueryFunction
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_CollectPadsQueryFunction -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CollectPadsQueryFunction
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetQueryFunctionMethodInfo
instance (signature ~ (GstBase.Callbacks.CollectPadsQueryFunction -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetQueryFunctionMethodInfo a signature where
overloadedMethod = collectPadsSetQueryFunction
instance O.OverloadedMethodInfo CollectPadsSetQueryFunctionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetQueryFunction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetQueryFunction"
})
#endif
foreign import ccall "gst_collect_pads_set_waiting" gst_collect_pads_set_waiting ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
CInt ->
IO ()
collectPadsSetWaiting ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> Bool
-> m ()
collectPadsSetWaiting :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectData -> Bool -> m ()
collectPadsSetWaiting a
pads CollectData
data_ Bool
waiting = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
data_' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
data_
let waiting' :: CInt
waiting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
waiting
Ptr CollectPads -> Ptr CollectData -> CInt -> IO ()
gst_collect_pads_set_waiting Ptr CollectPads
pads' Ptr CollectData
data_' CInt
waiting'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
data_
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsSetWaitingMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> Bool -> m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsSetWaitingMethodInfo a signature where
overloadedMethod = collectPadsSetWaiting
instance O.OverloadedMethodInfo CollectPadsSetWaitingMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSetWaiting",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSetWaiting"
})
#endif
foreign import ccall "gst_collect_pads_src_event_default" gst_collect_pads_src_event_default ::
Ptr CollectPads ->
Ptr Gst.Pad.Pad ->
Ptr Gst.Event.Event ->
IO CInt
collectPadsSrcEventDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a, Gst.Pad.IsPad b) =>
a
-> b
-> Gst.Event.Event
-> m Bool
collectPadsSrcEventDefault :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsCollectPads a, IsPad b) =>
a -> b -> Event -> m Bool
collectPadsSrcEventDefault a
pads b
pad Event
event = 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 CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr Pad
pad' <- b -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
pad
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
CInt
result <- Ptr CollectPads -> Ptr Pad -> Ptr Event -> IO CInt
gst_collect_pads_src_event_default Ptr CollectPads
pads' Ptr Pad
pad' Ptr Event
event'
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
pads
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
pad
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CollectPadsSrcEventDefaultMethodInfo
instance (signature ~ (b -> Gst.Event.Event -> m Bool), MonadIO m, IsCollectPads a, Gst.Pad.IsPad b) => O.OverloadedMethod CollectPadsSrcEventDefaultMethodInfo a signature where
overloadedMethod = collectPadsSrcEventDefault
instance O.OverloadedMethodInfo CollectPadsSrcEventDefaultMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsSrcEventDefault",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsSrcEventDefault"
})
#endif
foreign import ccall "gst_collect_pads_start" gst_collect_pads_start ::
Ptr CollectPads ->
IO ()
collectPadsStart ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> m ()
collectPadsStart :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> m ()
collectPadsStart a
pads = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectPads -> IO ()
gst_collect_pads_start Ptr CollectPads
pads'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsStartMethodInfo
instance (signature ~ (m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsStartMethodInfo a signature where
overloadedMethod = collectPadsStart
instance O.OverloadedMethodInfo CollectPadsStartMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsStart",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsStart"
})
#endif
foreign import ccall "gst_collect_pads_stop" gst_collect_pads_stop ::
Ptr CollectPads ->
IO ()
collectPadsStop ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> m ()
collectPadsStop :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> m ()
collectPadsStop a
pads = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectPads -> IO ()
gst_collect_pads_stop Ptr CollectPads
pads'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CollectPadsStopMethodInfo
instance (signature ~ (m ()), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsStopMethodInfo a signature where
overloadedMethod = collectPadsStop
instance O.OverloadedMethodInfo CollectPadsStopMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsStop",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsStop"
})
#endif
foreign import ccall "gst_collect_pads_take_buffer" gst_collect_pads_take_buffer ::
Ptr CollectPads ->
Ptr GstBase.CollectData.CollectData ->
Word32 ->
IO (Ptr Gst.Buffer.Buffer)
collectPadsTakeBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsCollectPads a) =>
a
-> GstBase.CollectData.CollectData
-> Word32
-> m (Maybe Gst.Buffer.Buffer)
collectPadsTakeBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCollectPads a) =>
a -> CollectData -> Word32 -> m (Maybe Buffer)
collectPadsTakeBuffer a
pads CollectData
data_ Word32
size = IO (Maybe Buffer) -> m (Maybe Buffer)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Buffer) -> m (Maybe Buffer))
-> IO (Maybe Buffer) -> m (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ do
Ptr CollectPads
pads' <- a -> IO (Ptr CollectPads)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pads
Ptr CollectData
data_' <- CollectData -> IO (Ptr CollectData)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CollectData
data_
Ptr Buffer
result <- Ptr CollectPads -> Ptr CollectData -> Word32 -> IO (Ptr Buffer)
gst_collect_pads_take_buffer Ptr CollectPads
pads' Ptr CollectData
data_' Word32
size
Maybe Buffer
maybeResult <- Ptr Buffer -> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Buffer
result ((Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer))
-> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ \Ptr Buffer
result' -> do
Buffer
result'' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
result'
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pads
CollectDataDestroyNotify
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr CollectData
data_
Maybe Buffer -> IO (Maybe Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Buffer
maybeResult
#if defined(ENABLE_OVERLOADING)
data CollectPadsTakeBufferMethodInfo
instance (signature ~ (GstBase.CollectData.CollectData -> Word32 -> m (Maybe Gst.Buffer.Buffer)), MonadIO m, IsCollectPads a) => O.OverloadedMethod CollectPadsTakeBufferMethodInfo a signature where
overloadedMethod = collectPadsTakeBuffer
instance O.OverloadedMethodInfo CollectPadsTakeBufferMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Objects.CollectPads.collectPadsTakeBuffer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-CollectPads.html#v:collectPadsTakeBuffer"
})
#endif