{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstBase.Structs.FlowCombiner
(
FlowCombiner(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveFlowCombinerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FlowCombinerAddPadMethodInfo ,
#endif
flowCombinerAddPad ,
#if defined(ENABLE_OVERLOADING)
FlowCombinerClearMethodInfo ,
#endif
flowCombinerClear ,
#if defined(ENABLE_OVERLOADING)
FlowCombinerFreeMethodInfo ,
#endif
flowCombinerFree ,
flowCombinerNew ,
#if defined(ENABLE_OVERLOADING)
FlowCombinerRefMethodInfo ,
#endif
flowCombinerRef ,
#if defined(ENABLE_OVERLOADING)
FlowCombinerRemovePadMethodInfo ,
#endif
flowCombinerRemovePad ,
#if defined(ENABLE_OVERLOADING)
FlowCombinerResetMethodInfo ,
#endif
flowCombinerReset ,
#if defined(ENABLE_OVERLOADING)
FlowCombinerUnrefMethodInfo ,
#endif
flowCombinerUnref ,
#if defined(ENABLE_OVERLOADING)
FlowCombinerUpdateFlowMethodInfo ,
#endif
flowCombinerUpdateFlow ,
#if defined(ENABLE_OVERLOADING)
FlowCombinerUpdatePadFlowMethodInfo ,
#endif
flowCombinerUpdatePadFlow ,
) 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.Gst.Enums as Gst.Enums
import qualified GI.Gst.Objects.Pad as Gst.Pad
newtype FlowCombiner = FlowCombiner (SP.ManagedPtr FlowCombiner)
deriving (FlowCombiner -> FlowCombiner -> Bool
(FlowCombiner -> FlowCombiner -> Bool)
-> (FlowCombiner -> FlowCombiner -> Bool) -> Eq FlowCombiner
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FlowCombiner -> FlowCombiner -> Bool
$c/= :: FlowCombiner -> FlowCombiner -> Bool
== :: FlowCombiner -> FlowCombiner -> Bool
$c== :: FlowCombiner -> FlowCombiner -> Bool
Eq)
instance SP.ManagedPtrNewtype FlowCombiner where
toManagedPtr :: FlowCombiner -> ManagedPtr FlowCombiner
toManagedPtr (FlowCombiner ManagedPtr FlowCombiner
p) = ManagedPtr FlowCombiner
p
foreign import ccall "gst_flow_combiner_get_type" c_gst_flow_combiner_get_type ::
IO GType
type instance O.ParentTypes FlowCombiner = '[]
instance O.HasParentTypes FlowCombiner
instance B.Types.TypedObject FlowCombiner where
glibType :: IO GType
glibType = IO GType
c_gst_flow_combiner_get_type
instance B.Types.GBoxed FlowCombiner
instance B.GValue.IsGValue (Maybe FlowCombiner) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_flow_combiner_get_type
gvalueSet_ :: Ptr GValue -> Maybe FlowCombiner -> IO ()
gvalueSet_ Ptr GValue
gv Maybe FlowCombiner
P.Nothing = Ptr GValue -> Ptr FlowCombiner -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr FlowCombiner
forall a. Ptr a
FP.nullPtr :: FP.Ptr FlowCombiner)
gvalueSet_ Ptr GValue
gv (P.Just FlowCombiner
obj) = FlowCombiner -> (Ptr FlowCombiner -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FlowCombiner
obj (Ptr GValue -> Ptr FlowCombiner -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe FlowCombiner)
gvalueGet_ Ptr GValue
gv = do
Ptr FlowCombiner
ptr <- Ptr GValue -> IO (Ptr FlowCombiner)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr FlowCombiner)
if Ptr FlowCombiner
ptr Ptr FlowCombiner -> Ptr FlowCombiner -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr FlowCombiner
forall a. Ptr a
FP.nullPtr
then FlowCombiner -> Maybe FlowCombiner
forall a. a -> Maybe a
P.Just (FlowCombiner -> Maybe FlowCombiner)
-> IO FlowCombiner -> IO (Maybe FlowCombiner)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr FlowCombiner -> FlowCombiner)
-> Ptr FlowCombiner -> IO FlowCombiner
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr FlowCombiner -> FlowCombiner
FlowCombiner Ptr FlowCombiner
ptr
else Maybe FlowCombiner -> IO (Maybe FlowCombiner)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FlowCombiner
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FlowCombiner
type instance O.AttributeList FlowCombiner = FlowCombinerAttributeList
type FlowCombinerAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "gst_flow_combiner_new" gst_flow_combiner_new ::
IO (Ptr FlowCombiner)
flowCombinerNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m FlowCombiner
flowCombinerNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m FlowCombiner
flowCombinerNew = IO FlowCombiner -> m FlowCombiner
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowCombiner -> m FlowCombiner)
-> IO FlowCombiner -> m FlowCombiner
forall a b. (a -> b) -> a -> b
$ do
Ptr FlowCombiner
result <- IO (Ptr FlowCombiner)
gst_flow_combiner_new
Text -> Ptr FlowCombiner -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"flowCombinerNew" Ptr FlowCombiner
result
FlowCombiner
result' <- ((ManagedPtr FlowCombiner -> FlowCombiner)
-> Ptr FlowCombiner -> IO FlowCombiner
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FlowCombiner -> FlowCombiner
FlowCombiner) Ptr FlowCombiner
result
FlowCombiner -> IO FlowCombiner
forall (m :: * -> *) a. Monad m => a -> m a
return FlowCombiner
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_flow_combiner_add_pad" gst_flow_combiner_add_pad ::
Ptr FlowCombiner ->
Ptr Gst.Pad.Pad ->
IO ()
flowCombinerAddPad ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Pad.IsPad a) =>
FlowCombiner
-> a
-> m ()
flowCombinerAddPad :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPad a) =>
FlowCombiner -> a -> m ()
flowCombinerAddPad FlowCombiner
combiner a
pad = 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 FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
Ptr Pad
pad' <- a -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pad
Ptr FlowCombiner -> Ptr Pad -> IO ()
gst_flow_combiner_add_pad Ptr FlowCombiner
combiner' Ptr Pad
pad'
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pad
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FlowCombinerAddPadMethodInfo
instance (signature ~ (a -> m ()), MonadIO m, Gst.Pad.IsPad a) => O.OverloadedMethod FlowCombinerAddPadMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerAddPad
instance O.OverloadedMethodInfo FlowCombinerAddPadMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerAddPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerAddPad"
})
#endif
foreign import ccall "gst_flow_combiner_clear" gst_flow_combiner_clear ::
Ptr FlowCombiner ->
IO ()
flowCombinerClear ::
(B.CallStack.HasCallStack, MonadIO m) =>
FlowCombiner
-> m ()
flowCombinerClear :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FlowCombiner -> m ()
flowCombinerClear FlowCombiner
combiner = 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 FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
Ptr FlowCombiner -> IO ()
gst_flow_combiner_clear Ptr FlowCombiner
combiner'
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FlowCombinerClearMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod FlowCombinerClearMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerClear
instance O.OverloadedMethodInfo FlowCombinerClearMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerClear",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerClear"
})
#endif
foreign import ccall "gst_flow_combiner_free" gst_flow_combiner_free ::
Ptr FlowCombiner ->
IO ()
flowCombinerFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
FlowCombiner
-> m ()
flowCombinerFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FlowCombiner -> m ()
flowCombinerFree FlowCombiner
combiner = 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 FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
Ptr FlowCombiner -> IO ()
gst_flow_combiner_free Ptr FlowCombiner
combiner'
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FlowCombinerFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod FlowCombinerFreeMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerFree
instance O.OverloadedMethodInfo FlowCombinerFreeMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerFree"
})
#endif
foreign import ccall "gst_flow_combiner_ref" gst_flow_combiner_ref ::
Ptr FlowCombiner ->
IO (Ptr FlowCombiner)
flowCombinerRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
FlowCombiner
-> m FlowCombiner
flowCombinerRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FlowCombiner -> m FlowCombiner
flowCombinerRef FlowCombiner
combiner = IO FlowCombiner -> m FlowCombiner
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowCombiner -> m FlowCombiner)
-> IO FlowCombiner -> m FlowCombiner
forall a b. (a -> b) -> a -> b
$ do
Ptr FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
Ptr FlowCombiner
result <- Ptr FlowCombiner -> IO (Ptr FlowCombiner)
gst_flow_combiner_ref Ptr FlowCombiner
combiner'
Text -> Ptr FlowCombiner -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"flowCombinerRef" Ptr FlowCombiner
result
FlowCombiner
result' <- ((ManagedPtr FlowCombiner -> FlowCombiner)
-> Ptr FlowCombiner -> IO FlowCombiner
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr FlowCombiner -> FlowCombiner
FlowCombiner) Ptr FlowCombiner
result
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
FlowCombiner -> IO FlowCombiner
forall (m :: * -> *) a. Monad m => a -> m a
return FlowCombiner
result'
#if defined(ENABLE_OVERLOADING)
data FlowCombinerRefMethodInfo
instance (signature ~ (m FlowCombiner), MonadIO m) => O.OverloadedMethod FlowCombinerRefMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerRef
instance O.OverloadedMethodInfo FlowCombinerRefMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerRef",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerRef"
})
#endif
foreign import ccall "gst_flow_combiner_remove_pad" gst_flow_combiner_remove_pad ::
Ptr FlowCombiner ->
Ptr Gst.Pad.Pad ->
IO ()
flowCombinerRemovePad ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Pad.IsPad a) =>
FlowCombiner
-> a
-> m ()
flowCombinerRemovePad :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPad a) =>
FlowCombiner -> a -> m ()
flowCombinerRemovePad FlowCombiner
combiner a
pad = 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 FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
Ptr Pad
pad' <- a -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pad
Ptr FlowCombiner -> Ptr Pad -> IO ()
gst_flow_combiner_remove_pad Ptr FlowCombiner
combiner' Ptr Pad
pad'
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pad
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FlowCombinerRemovePadMethodInfo
instance (signature ~ (a -> m ()), MonadIO m, Gst.Pad.IsPad a) => O.OverloadedMethod FlowCombinerRemovePadMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerRemovePad
instance O.OverloadedMethodInfo FlowCombinerRemovePadMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerRemovePad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerRemovePad"
})
#endif
foreign import ccall "gst_flow_combiner_reset" gst_flow_combiner_reset ::
Ptr FlowCombiner ->
IO ()
flowCombinerReset ::
(B.CallStack.HasCallStack, MonadIO m) =>
FlowCombiner
-> m ()
flowCombinerReset :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FlowCombiner -> m ()
flowCombinerReset FlowCombiner
combiner = 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 FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
Ptr FlowCombiner -> IO ()
gst_flow_combiner_reset Ptr FlowCombiner
combiner'
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FlowCombinerResetMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod FlowCombinerResetMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerReset
instance O.OverloadedMethodInfo FlowCombinerResetMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerReset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerReset"
})
#endif
foreign import ccall "gst_flow_combiner_unref" gst_flow_combiner_unref ::
Ptr FlowCombiner ->
IO ()
flowCombinerUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
FlowCombiner
-> m ()
flowCombinerUnref :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FlowCombiner -> m ()
flowCombinerUnref FlowCombiner
combiner = 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 FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
Ptr FlowCombiner -> IO ()
gst_flow_combiner_unref Ptr FlowCombiner
combiner'
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FlowCombinerUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod FlowCombinerUnrefMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerUnref
instance O.OverloadedMethodInfo FlowCombinerUnrefMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerUnref",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerUnref"
})
#endif
foreign import ccall "gst_flow_combiner_update_flow" gst_flow_combiner_update_flow ::
Ptr FlowCombiner ->
CInt ->
IO CInt
flowCombinerUpdateFlow ::
(B.CallStack.HasCallStack, MonadIO m) =>
FlowCombiner
-> Gst.Enums.FlowReturn
-> m Gst.Enums.FlowReturn
flowCombinerUpdateFlow :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FlowCombiner -> FlowReturn -> m FlowReturn
flowCombinerUpdateFlow FlowCombiner
combiner FlowReturn
fret = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
let fret' :: CInt
fret' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (FlowReturn -> Int) -> FlowReturn -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FlowReturn -> Int
forall a. Enum a => a -> Int
fromEnum) FlowReturn
fret
CInt
result <- Ptr FlowCombiner -> CInt -> IO CInt
gst_flow_combiner_update_flow Ptr FlowCombiner
combiner' CInt
fret'
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
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data FlowCombinerUpdateFlowMethodInfo
instance (signature ~ (Gst.Enums.FlowReturn -> m Gst.Enums.FlowReturn), MonadIO m) => O.OverloadedMethod FlowCombinerUpdateFlowMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerUpdateFlow
instance O.OverloadedMethodInfo FlowCombinerUpdateFlowMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerUpdateFlow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerUpdateFlow"
})
#endif
foreign import ccall "gst_flow_combiner_update_pad_flow" gst_flow_combiner_update_pad_flow ::
Ptr FlowCombiner ->
Ptr Gst.Pad.Pad ->
CInt ->
IO CInt
flowCombinerUpdatePadFlow ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Pad.IsPad a) =>
FlowCombiner
-> a
-> Gst.Enums.FlowReturn
-> m Gst.Enums.FlowReturn
flowCombinerUpdatePadFlow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPad a) =>
FlowCombiner -> a -> FlowReturn -> m FlowReturn
flowCombinerUpdatePadFlow FlowCombiner
combiner a
pad FlowReturn
fret = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr FlowCombiner
combiner' <- FlowCombiner -> IO (Ptr FlowCombiner)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FlowCombiner
combiner
Ptr Pad
pad' <- a -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
pad
let fret' :: CInt
fret' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (FlowReturn -> Int) -> FlowReturn -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FlowReturn -> Int
forall a. Enum a => a -> Int
fromEnum) FlowReturn
fret
CInt
result <- Ptr FlowCombiner -> Ptr Pad -> CInt -> IO CInt
gst_flow_combiner_update_pad_flow Ptr FlowCombiner
combiner' Ptr Pad
pad' CInt
fret'
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
FlowCombiner -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FlowCombiner
combiner
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
pad
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data FlowCombinerUpdatePadFlowMethodInfo
instance (signature ~ (a -> Gst.Enums.FlowReturn -> m Gst.Enums.FlowReturn), MonadIO m, Gst.Pad.IsPad a) => O.OverloadedMethod FlowCombinerUpdatePadFlowMethodInfo FlowCombiner signature where
overloadedMethod = flowCombinerUpdatePadFlow
instance O.OverloadedMethodInfo FlowCombinerUpdatePadFlowMethodInfo FlowCombiner where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstBase.Structs.FlowCombiner.flowCombinerUpdatePadFlow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Structs-FlowCombiner.html#v:flowCombinerUpdatePadFlow"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveFlowCombinerMethod (t :: Symbol) (o :: *) :: * where
ResolveFlowCombinerMethod "addPad" o = FlowCombinerAddPadMethodInfo
ResolveFlowCombinerMethod "clear" o = FlowCombinerClearMethodInfo
ResolveFlowCombinerMethod "free" o = FlowCombinerFreeMethodInfo
ResolveFlowCombinerMethod "ref" o = FlowCombinerRefMethodInfo
ResolveFlowCombinerMethod "removePad" o = FlowCombinerRemovePadMethodInfo
ResolveFlowCombinerMethod "reset" o = FlowCombinerResetMethodInfo
ResolveFlowCombinerMethod "unref" o = FlowCombinerUnrefMethodInfo
ResolveFlowCombinerMethod "updateFlow" o = FlowCombinerUpdateFlowMethodInfo
ResolveFlowCombinerMethod "updatePadFlow" o = FlowCombinerUpdatePadFlowMethodInfo
ResolveFlowCombinerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFlowCombinerMethod t FlowCombiner, O.OverloadedMethod info FlowCombiner p) => OL.IsLabel t (FlowCombiner -> 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 ~ ResolveFlowCombinerMethod t FlowCombiner, O.OverloadedMethod info FlowCombiner p, R.HasField t FlowCombiner p) => R.HasField t FlowCombiner p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveFlowCombinerMethod t FlowCombiner, O.OverloadedMethodInfo info FlowCombiner) => OL.IsLabel t (O.MethodProxy info FlowCombiner) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif