{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gst.Objects.Element
(
Element(..) ,
IsElement ,
toElement ,
#if defined(ENABLE_OVERLOADING)
ResolveElementMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ElementAbortStateMethodInfo ,
#endif
elementAbortState ,
#if defined(ENABLE_OVERLOADING)
ElementAddPadMethodInfo ,
#endif
elementAddPad ,
#if defined(ENABLE_OVERLOADING)
ElementAddPropertyDeepNotifyWatchMethodInfo,
#endif
elementAddPropertyDeepNotifyWatch ,
#if defined(ENABLE_OVERLOADING)
ElementAddPropertyNotifyWatchMethodInfo ,
#endif
elementAddPropertyNotifyWatch ,
#if defined(ENABLE_OVERLOADING)
ElementCallAsyncMethodInfo ,
#endif
elementCallAsync ,
#if defined(ENABLE_OVERLOADING)
ElementChangeStateMethodInfo ,
#endif
elementChangeState ,
#if defined(ENABLE_OVERLOADING)
ElementContinueStateMethodInfo ,
#endif
elementContinueState ,
#if defined(ENABLE_OVERLOADING)
ElementCreateAllPadsMethodInfo ,
#endif
elementCreateAllPads ,
#if defined(ENABLE_OVERLOADING)
ElementForeachPadMethodInfo ,
#endif
elementForeachPad ,
#if defined(ENABLE_OVERLOADING)
ElementForeachSinkPadMethodInfo ,
#endif
elementForeachSinkPad ,
#if defined(ENABLE_OVERLOADING)
ElementForeachSrcPadMethodInfo ,
#endif
elementForeachSrcPad ,
#if defined(ENABLE_OVERLOADING)
ElementGetBaseTimeMethodInfo ,
#endif
elementGetBaseTime ,
#if defined(ENABLE_OVERLOADING)
ElementGetBusMethodInfo ,
#endif
elementGetBus ,
#if defined(ENABLE_OVERLOADING)
ElementGetClockMethodInfo ,
#endif
elementGetClock ,
#if defined(ENABLE_OVERLOADING)
ElementGetCompatiblePadMethodInfo ,
#endif
elementGetCompatiblePad ,
#if defined(ENABLE_OVERLOADING)
ElementGetCompatiblePadTemplateMethodInfo,
#endif
elementGetCompatiblePadTemplate ,
#if defined(ENABLE_OVERLOADING)
ElementGetContextMethodInfo ,
#endif
elementGetContext ,
#if defined(ENABLE_OVERLOADING)
ElementGetContextUnlockedMethodInfo ,
#endif
elementGetContextUnlocked ,
#if defined(ENABLE_OVERLOADING)
ElementGetContextsMethodInfo ,
#endif
elementGetContexts ,
#if defined(ENABLE_OVERLOADING)
ElementGetCurrentClockTimeMethodInfo ,
#endif
elementGetCurrentClockTime ,
#if defined(ENABLE_OVERLOADING)
ElementGetCurrentRunningTimeMethodInfo ,
#endif
elementGetCurrentRunningTime ,
#if defined(ENABLE_OVERLOADING)
ElementGetFactoryMethodInfo ,
#endif
elementGetFactory ,
#if defined(ENABLE_OVERLOADING)
ElementGetMetadataMethodInfo ,
#endif
elementGetMetadata ,
#if defined(ENABLE_OVERLOADING)
ElementGetPadTemplateMethodInfo ,
#endif
elementGetPadTemplate ,
#if defined(ENABLE_OVERLOADING)
ElementGetPadTemplateListMethodInfo ,
#endif
elementGetPadTemplateList ,
#if defined(ENABLE_OVERLOADING)
ElementGetRequestPadMethodInfo ,
#endif
elementGetRequestPad ,
#if defined(ENABLE_OVERLOADING)
ElementGetStartTimeMethodInfo ,
#endif
elementGetStartTime ,
#if defined(ENABLE_OVERLOADING)
ElementGetStateMethodInfo ,
#endif
elementGetState ,
#if defined(ENABLE_OVERLOADING)
ElementGetStaticPadMethodInfo ,
#endif
elementGetStaticPad ,
#if defined(ENABLE_OVERLOADING)
ElementIsLockedStateMethodInfo ,
#endif
elementIsLockedState ,
#if defined(ENABLE_OVERLOADING)
ElementIteratePadsMethodInfo ,
#endif
elementIteratePads ,
#if defined(ENABLE_OVERLOADING)
ElementIterateSinkPadsMethodInfo ,
#endif
elementIterateSinkPads ,
#if defined(ENABLE_OVERLOADING)
ElementIterateSrcPadsMethodInfo ,
#endif
elementIterateSrcPads ,
#if defined(ENABLE_OVERLOADING)
ElementLinkMethodInfo ,
#endif
elementLink ,
#if defined(ENABLE_OVERLOADING)
ElementLinkFilteredMethodInfo ,
#endif
elementLinkFiltered ,
#if defined(ENABLE_OVERLOADING)
ElementLinkPadsMethodInfo ,
#endif
elementLinkPads ,
#if defined(ENABLE_OVERLOADING)
ElementLinkPadsFilteredMethodInfo ,
#endif
elementLinkPadsFiltered ,
#if defined(ENABLE_OVERLOADING)
ElementLinkPadsFullMethodInfo ,
#endif
elementLinkPadsFull ,
#if defined(ENABLE_OVERLOADING)
ElementLostStateMethodInfo ,
#endif
elementLostState ,
elementMakeFromUri ,
#if defined(ENABLE_OVERLOADING)
ElementMessageFullMethodInfo ,
#endif
elementMessageFull ,
#if defined(ENABLE_OVERLOADING)
ElementMessageFullWithDetailsMethodInfo ,
#endif
elementMessageFullWithDetails ,
#if defined(ENABLE_OVERLOADING)
ElementNoMorePadsMethodInfo ,
#endif
elementNoMorePads ,
#if defined(ENABLE_OVERLOADING)
ElementPostMessageMethodInfo ,
#endif
elementPostMessage ,
#if defined(ENABLE_OVERLOADING)
ElementProvideClockMethodInfo ,
#endif
elementProvideClock ,
#if defined(ENABLE_OVERLOADING)
ElementQueryMethodInfo ,
#endif
elementQuery ,
#if defined(ENABLE_OVERLOADING)
ElementQueryConvertMethodInfo ,
#endif
elementQueryConvert ,
#if defined(ENABLE_OVERLOADING)
ElementQueryDurationMethodInfo ,
#endif
elementQueryDuration ,
#if defined(ENABLE_OVERLOADING)
ElementQueryPositionMethodInfo ,
#endif
elementQueryPosition ,
elementRegister ,
#if defined(ENABLE_OVERLOADING)
ElementReleaseRequestPadMethodInfo ,
#endif
elementReleaseRequestPad ,
#if defined(ENABLE_OVERLOADING)
ElementRemovePadMethodInfo ,
#endif
elementRemovePad ,
#if defined(ENABLE_OVERLOADING)
ElementRemovePropertyNotifyWatchMethodInfo,
#endif
elementRemovePropertyNotifyWatch ,
#if defined(ENABLE_OVERLOADING)
ElementRequestPadMethodInfo ,
#endif
elementRequestPad ,
#if defined(ENABLE_OVERLOADING)
ElementRequestPadSimpleMethodInfo ,
#endif
elementRequestPadSimple ,
#if defined(ENABLE_OVERLOADING)
ElementSeekMethodInfo ,
#endif
elementSeek ,
#if defined(ENABLE_OVERLOADING)
ElementSeekSimpleMethodInfo ,
#endif
elementSeekSimple ,
#if defined(ENABLE_OVERLOADING)
ElementSendEventMethodInfo ,
#endif
elementSendEvent ,
#if defined(ENABLE_OVERLOADING)
ElementSetBaseTimeMethodInfo ,
#endif
elementSetBaseTime ,
#if defined(ENABLE_OVERLOADING)
ElementSetBusMethodInfo ,
#endif
elementSetBus ,
#if defined(ENABLE_OVERLOADING)
ElementSetClockMethodInfo ,
#endif
elementSetClock ,
#if defined(ENABLE_OVERLOADING)
ElementSetContextMethodInfo ,
#endif
elementSetContext ,
#if defined(ENABLE_OVERLOADING)
ElementSetLockedStateMethodInfo ,
#endif
elementSetLockedState ,
#if defined(ENABLE_OVERLOADING)
ElementSetStartTimeMethodInfo ,
#endif
elementSetStartTime ,
#if defined(ENABLE_OVERLOADING)
ElementSetStateMethodInfo ,
#endif
elementSetState ,
elementStateChangeReturnGetName ,
elementStateGetName ,
#if defined(ENABLE_OVERLOADING)
ElementSyncStateWithParentMethodInfo ,
#endif
elementSyncStateWithParent ,
#if defined(ENABLE_OVERLOADING)
ElementUnlinkMethodInfo ,
#endif
elementUnlink ,
#if defined(ENABLE_OVERLOADING)
ElementUnlinkPadsMethodInfo ,
#endif
elementUnlinkPads ,
ElementNoMorePadsCallback ,
#if defined(ENABLE_OVERLOADING)
ElementNoMorePadsSignalInfo ,
#endif
afterElementNoMorePads ,
onElementNoMorePads ,
ElementPadAddedCallback ,
#if defined(ENABLE_OVERLOADING)
ElementPadAddedSignalInfo ,
#endif
afterElementPadAdded ,
onElementPadAdded ,
ElementPadRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
ElementPadRemovedSignalInfo ,
#endif
afterElementPadRemoved ,
onElementPadRemoved ,
) 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.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gst.Callbacks as Gst.Callbacks
import {-# SOURCE #-} qualified GI.Gst.Enums as Gst.Enums
import {-# SOURCE #-} qualified GI.Gst.Flags as Gst.Flags
import {-# SOURCE #-} qualified GI.Gst.Objects.Bus as Gst.Bus
import {-# SOURCE #-} qualified GI.Gst.Objects.Clock as Gst.Clock
import {-# SOURCE #-} qualified GI.Gst.Objects.ElementFactory as Gst.ElementFactory
import {-# SOURCE #-} qualified GI.Gst.Objects.Object as Gst.Object
import {-# SOURCE #-} qualified GI.Gst.Objects.Pad as Gst.Pad
import {-# SOURCE #-} qualified GI.Gst.Objects.PadTemplate as Gst.PadTemplate
import {-# SOURCE #-} qualified GI.Gst.Objects.Plugin as Gst.Plugin
import {-# SOURCE #-} qualified GI.Gst.Structs.Caps as Gst.Caps
import {-# SOURCE #-} qualified GI.Gst.Structs.Context as Gst.Context
import {-# SOURCE #-} qualified GI.Gst.Structs.Event as Gst.Event
import {-# SOURCE #-} qualified GI.Gst.Structs.Iterator as Gst.Iterator
import {-# SOURCE #-} qualified GI.Gst.Structs.Message as Gst.Message
import {-# SOURCE #-} qualified GI.Gst.Structs.Query as Gst.Query
import {-# SOURCE #-} qualified GI.Gst.Structs.Structure as Gst.Structure
newtype Element = Element (SP.ManagedPtr Element)
deriving (Element -> Element -> Bool
(Element -> Element -> Bool)
-> (Element -> Element -> Bool) -> Eq Element
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Element -> Element -> Bool
$c/= :: Element -> Element -> Bool
== :: Element -> Element -> Bool
$c== :: Element -> Element -> Bool
Eq)
instance SP.ManagedPtrNewtype Element where
toManagedPtr :: Element -> ManagedPtr Element
toManagedPtr (Element ManagedPtr Element
p) = ManagedPtr Element
p
foreign import ccall "gst_element_get_type"
c_gst_element_get_type :: IO B.Types.GType
instance B.Types.TypedObject Element where
glibType :: IO GType
glibType = IO GType
c_gst_element_get_type
instance B.Types.GObject Element
class (SP.GObject o, O.IsDescendantOf Element o) => IsElement o
instance (SP.GObject o, O.IsDescendantOf Element o) => IsElement o
instance O.HasParentTypes Element
type instance O.ParentTypes Element = '[Gst.Object.Object, GObject.Object.Object]
toElement :: (MIO.MonadIO m, IsElement o) => o -> m Element
toElement :: forall (m :: * -> *) o. (MonadIO m, IsElement o) => o -> m Element
toElement = IO Element -> m Element
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Element -> m Element) -> (o -> IO Element) -> o -> m Element
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Element -> Element) -> o -> IO Element
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Element -> Element
Element
instance B.GValue.IsGValue (Maybe Element) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_element_get_type
gvalueSet_ :: Ptr GValue -> Maybe Element -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Element
P.Nothing = Ptr GValue -> Ptr Element -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Element
forall a. Ptr a
FP.nullPtr :: FP.Ptr Element)
gvalueSet_ Ptr GValue
gv (P.Just Element
obj) = Element -> (Ptr Element -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Element
obj (Ptr GValue -> Ptr Element -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Element)
gvalueGet_ Ptr GValue
gv = do
Ptr Element
ptr <- Ptr GValue -> IO (Ptr Element)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Element)
if Ptr Element
ptr Ptr Element -> Ptr Element -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Element
forall a. Ptr a
FP.nullPtr
then Element -> Maybe Element
forall a. a -> Maybe a
P.Just (Element -> Maybe Element) -> IO Element -> IO (Maybe Element)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Element -> Element) -> Ptr Element -> IO Element
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Element -> Element
Element Ptr Element
ptr
else Maybe Element -> IO (Maybe Element)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Element
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveElementMethod (t :: Symbol) (o :: *) :: * where
ResolveElementMethod "abortState" o = ElementAbortStateMethodInfo
ResolveElementMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
ResolveElementMethod "addPad" o = ElementAddPadMethodInfo
ResolveElementMethod "addPropertyDeepNotifyWatch" o = ElementAddPropertyDeepNotifyWatchMethodInfo
ResolveElementMethod "addPropertyNotifyWatch" o = ElementAddPropertyNotifyWatchMethodInfo
ResolveElementMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveElementMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveElementMethod "callAsync" o = ElementCallAsyncMethodInfo
ResolveElementMethod "changeState" o = ElementChangeStateMethodInfo
ResolveElementMethod "continueState" o = ElementContinueStateMethodInfo
ResolveElementMethod "createAllPads" o = ElementCreateAllPadsMethodInfo
ResolveElementMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
ResolveElementMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveElementMethod "foreachPad" o = ElementForeachPadMethodInfo
ResolveElementMethod "foreachSinkPad" o = ElementForeachSinkPadMethodInfo
ResolveElementMethod "foreachSrcPad" o = ElementForeachSrcPadMethodInfo
ResolveElementMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveElementMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveElementMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
ResolveElementMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
ResolveElementMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
ResolveElementMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
ResolveElementMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveElementMethod "isLockedState" o = ElementIsLockedStateMethodInfo
ResolveElementMethod "iteratePads" o = ElementIteratePadsMethodInfo
ResolveElementMethod "iterateSinkPads" o = ElementIterateSinkPadsMethodInfo
ResolveElementMethod "iterateSrcPads" o = ElementIterateSrcPadsMethodInfo
ResolveElementMethod "link" o = ElementLinkMethodInfo
ResolveElementMethod "linkFiltered" o = ElementLinkFilteredMethodInfo
ResolveElementMethod "linkPads" o = ElementLinkPadsMethodInfo
ResolveElementMethod "linkPadsFiltered" o = ElementLinkPadsFilteredMethodInfo
ResolveElementMethod "linkPadsFull" o = ElementLinkPadsFullMethodInfo
ResolveElementMethod "lostState" o = ElementLostStateMethodInfo
ResolveElementMethod "messageFull" o = ElementMessageFullMethodInfo
ResolveElementMethod "messageFullWithDetails" o = ElementMessageFullWithDetailsMethodInfo
ResolveElementMethod "noMorePads" o = ElementNoMorePadsMethodInfo
ResolveElementMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveElementMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveElementMethod "postMessage" o = ElementPostMessageMethodInfo
ResolveElementMethod "provideClock" o = ElementProvideClockMethodInfo
ResolveElementMethod "query" o = ElementQueryMethodInfo
ResolveElementMethod "queryConvert" o = ElementQueryConvertMethodInfo
ResolveElementMethod "queryDuration" o = ElementQueryDurationMethodInfo
ResolveElementMethod "queryPosition" o = ElementQueryPositionMethodInfo
ResolveElementMethod "ref" o = Gst.Object.ObjectRefMethodInfo
ResolveElementMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveElementMethod "releaseRequestPad" o = ElementReleaseRequestPadMethodInfo
ResolveElementMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
ResolveElementMethod "removePad" o = ElementRemovePadMethodInfo
ResolveElementMethod "removePropertyNotifyWatch" o = ElementRemovePropertyNotifyWatchMethodInfo
ResolveElementMethod "requestPad" o = ElementRequestPadMethodInfo
ResolveElementMethod "requestPadSimple" o = ElementRequestPadSimpleMethodInfo
ResolveElementMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveElementMethod "seek" o = ElementSeekMethodInfo
ResolveElementMethod "seekSimple" o = ElementSeekSimpleMethodInfo
ResolveElementMethod "sendEvent" o = ElementSendEventMethodInfo
ResolveElementMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveElementMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveElementMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
ResolveElementMethod "syncStateWithParent" o = ElementSyncStateWithParentMethodInfo
ResolveElementMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
ResolveElementMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveElementMethod "unlink" o = ElementUnlinkMethodInfo
ResolveElementMethod "unlinkPads" o = ElementUnlinkPadsMethodInfo
ResolveElementMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
ResolveElementMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
ResolveElementMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveElementMethod "getBaseTime" o = ElementGetBaseTimeMethodInfo
ResolveElementMethod "getBus" o = ElementGetBusMethodInfo
ResolveElementMethod "getClock" o = ElementGetClockMethodInfo
ResolveElementMethod "getCompatiblePad" o = ElementGetCompatiblePadMethodInfo
ResolveElementMethod "getCompatiblePadTemplate" o = ElementGetCompatiblePadTemplateMethodInfo
ResolveElementMethod "getContext" o = ElementGetContextMethodInfo
ResolveElementMethod "getContextUnlocked" o = ElementGetContextUnlockedMethodInfo
ResolveElementMethod "getContexts" o = ElementGetContextsMethodInfo
ResolveElementMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
ResolveElementMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
ResolveElementMethod "getCurrentClockTime" o = ElementGetCurrentClockTimeMethodInfo
ResolveElementMethod "getCurrentRunningTime" o = ElementGetCurrentRunningTimeMethodInfo
ResolveElementMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveElementMethod "getFactory" o = ElementGetFactoryMethodInfo
ResolveElementMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
ResolveElementMethod "getMetadata" o = ElementGetMetadataMethodInfo
ResolveElementMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
ResolveElementMethod "getPadTemplate" o = ElementGetPadTemplateMethodInfo
ResolveElementMethod "getPadTemplateList" o = ElementGetPadTemplateListMethodInfo
ResolveElementMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
ResolveElementMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
ResolveElementMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveElementMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveElementMethod "getRequestPad" o = ElementGetRequestPadMethodInfo
ResolveElementMethod "getStartTime" o = ElementGetStartTimeMethodInfo
ResolveElementMethod "getState" o = ElementGetStateMethodInfo
ResolveElementMethod "getStaticPad" o = ElementGetStaticPadMethodInfo
ResolveElementMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
ResolveElementMethod "setBaseTime" o = ElementSetBaseTimeMethodInfo
ResolveElementMethod "setBus" o = ElementSetBusMethodInfo
ResolveElementMethod "setClock" o = ElementSetClockMethodInfo
ResolveElementMethod "setContext" o = ElementSetContextMethodInfo
ResolveElementMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
ResolveElementMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
ResolveElementMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
ResolveElementMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveElementMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveElementMethod "setLockedState" o = ElementSetLockedStateMethodInfo
ResolveElementMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
ResolveElementMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
ResolveElementMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveElementMethod "setStartTime" o = ElementSetStartTimeMethodInfo
ResolveElementMethod "setState" o = ElementSetStateMethodInfo
ResolveElementMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveElementMethod t Element, O.OverloadedMethod info Element p) => OL.IsLabel t (Element -> 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 ~ ResolveElementMethod t Element, O.OverloadedMethod info Element p, R.HasField t Element p) => R.HasField t Element p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveElementMethod t Element, O.OverloadedMethodInfo info Element) => OL.IsLabel t (O.MethodProxy info Element) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type ElementNoMorePadsCallback =
IO ()
type C_ElementNoMorePadsCallback =
Ptr Element ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ElementNoMorePadsCallback :: C_ElementNoMorePadsCallback -> IO (FunPtr C_ElementNoMorePadsCallback)
wrap_ElementNoMorePadsCallback ::
GObject a => (a -> ElementNoMorePadsCallback) ->
C_ElementNoMorePadsCallback
wrap_ElementNoMorePadsCallback :: forall a. GObject a => (a -> IO ()) -> C_ElementNoMorePadsCallback
wrap_ElementNoMorePadsCallback a -> IO ()
gi'cb Ptr Element
gi'selfPtr Ptr ()
_ = do
Ptr Element -> (Element -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Element
gi'selfPtr ((Element -> IO ()) -> IO ()) -> (Element -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Element
gi'self -> a -> IO ()
gi'cb (Element -> a
Coerce.coerce Element
gi'self)
onElementNoMorePads :: (IsElement a, MonadIO m) => a -> ((?self :: a) => ElementNoMorePadsCallback) -> m SignalHandlerId
onElementNoMorePads :: forall a (m :: * -> *).
(IsElement a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onElementNoMorePads a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ElementNoMorePadsCallback
wrapped' = (a -> IO ()) -> C_ElementNoMorePadsCallback
forall a. GObject a => (a -> IO ()) -> C_ElementNoMorePadsCallback
wrap_ElementNoMorePadsCallback a -> IO ()
wrapped
FunPtr C_ElementNoMorePadsCallback
wrapped'' <- C_ElementNoMorePadsCallback
-> IO (FunPtr C_ElementNoMorePadsCallback)
mk_ElementNoMorePadsCallback C_ElementNoMorePadsCallback
wrapped'
a
-> Text
-> FunPtr C_ElementNoMorePadsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"no-more-pads" FunPtr C_ElementNoMorePadsCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterElementNoMorePads :: (IsElement a, MonadIO m) => a -> ((?self :: a) => ElementNoMorePadsCallback) -> m SignalHandlerId
afterElementNoMorePads :: forall a (m :: * -> *).
(IsElement a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterElementNoMorePads a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ElementNoMorePadsCallback
wrapped' = (a -> IO ()) -> C_ElementNoMorePadsCallback
forall a. GObject a => (a -> IO ()) -> C_ElementNoMorePadsCallback
wrap_ElementNoMorePadsCallback a -> IO ()
wrapped
FunPtr C_ElementNoMorePadsCallback
wrapped'' <- C_ElementNoMorePadsCallback
-> IO (FunPtr C_ElementNoMorePadsCallback)
mk_ElementNoMorePadsCallback C_ElementNoMorePadsCallback
wrapped'
a
-> Text
-> FunPtr C_ElementNoMorePadsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"no-more-pads" FunPtr C_ElementNoMorePadsCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ElementNoMorePadsSignalInfo
instance SignalInfo ElementNoMorePadsSignalInfo where
type HaskellCallbackType ElementNoMorePadsSignalInfo = ElementNoMorePadsCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ElementNoMorePadsCallback cb
cb'' <- mk_ElementNoMorePadsCallback cb'
connectSignalFunPtr obj "no-more-pads" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element::no-more-pads"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#g:signal:noMorePads"})
#endif
type ElementPadAddedCallback =
Gst.Pad.Pad
-> IO ()
type C_ElementPadAddedCallback =
Ptr Element ->
Ptr Gst.Pad.Pad ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ElementPadAddedCallback :: C_ElementPadAddedCallback -> IO (FunPtr C_ElementPadAddedCallback)
wrap_ElementPadAddedCallback ::
GObject a => (a -> ElementPadAddedCallback) ->
C_ElementPadAddedCallback
wrap_ElementPadAddedCallback :: forall a.
GObject a =>
(a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
wrap_ElementPadAddedCallback a -> ElementPadAddedCallback
gi'cb Ptr Element
gi'selfPtr Ptr Pad
newPad Ptr ()
_ = do
Pad
newPad' <- ((ManagedPtr Pad -> Pad) -> Ptr Pad -> IO Pad
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Pad -> Pad
Gst.Pad.Pad) Ptr Pad
newPad
Ptr Element -> (Element -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Element
gi'selfPtr ((Element -> IO ()) -> IO ()) -> (Element -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Element
gi'self -> a -> ElementPadAddedCallback
gi'cb (Element -> a
Coerce.coerce Element
gi'self) Pad
newPad'
onElementPadAdded :: (IsElement a, MonadIO m) => a -> ((?self :: a) => ElementPadAddedCallback) -> m SignalHandlerId
onElementPadAdded :: forall a (m :: * -> *).
(IsElement a, MonadIO m) =>
a -> ((?self::a) => ElementPadAddedCallback) -> m SignalHandlerId
onElementPadAdded a
obj (?self::a) => ElementPadAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ElementPadAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ElementPadAddedCallback
ElementPadAddedCallback
cb
let wrapped' :: C_ElementPadAddedCallback
wrapped' = (a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
forall a.
GObject a =>
(a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
wrap_ElementPadAddedCallback a -> ElementPadAddedCallback
wrapped
FunPtr C_ElementPadAddedCallback
wrapped'' <- C_ElementPadAddedCallback -> IO (FunPtr C_ElementPadAddedCallback)
mk_ElementPadAddedCallback C_ElementPadAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ElementPadAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pad-added" FunPtr C_ElementPadAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterElementPadAdded :: (IsElement a, MonadIO m) => a -> ((?self :: a) => ElementPadAddedCallback) -> m SignalHandlerId
afterElementPadAdded :: forall a (m :: * -> *).
(IsElement a, MonadIO m) =>
a -> ((?self::a) => ElementPadAddedCallback) -> m SignalHandlerId
afterElementPadAdded a
obj (?self::a) => ElementPadAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ElementPadAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ElementPadAddedCallback
ElementPadAddedCallback
cb
let wrapped' :: C_ElementPadAddedCallback
wrapped' = (a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
forall a.
GObject a =>
(a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
wrap_ElementPadAddedCallback a -> ElementPadAddedCallback
wrapped
FunPtr C_ElementPadAddedCallback
wrapped'' <- C_ElementPadAddedCallback -> IO (FunPtr C_ElementPadAddedCallback)
mk_ElementPadAddedCallback C_ElementPadAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ElementPadAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pad-added" FunPtr C_ElementPadAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ElementPadAddedSignalInfo
instance SignalInfo ElementPadAddedSignalInfo where
type HaskellCallbackType ElementPadAddedSignalInfo = ElementPadAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ElementPadAddedCallback cb
cb'' <- mk_ElementPadAddedCallback cb'
connectSignalFunPtr obj "pad-added" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element::pad-added"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#g:signal:padAdded"})
#endif
type ElementPadRemovedCallback =
Gst.Pad.Pad
-> IO ()
type C_ElementPadRemovedCallback =
Ptr Element ->
Ptr Gst.Pad.Pad ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ElementPadRemovedCallback :: C_ElementPadRemovedCallback -> IO (FunPtr C_ElementPadRemovedCallback)
wrap_ElementPadRemovedCallback ::
GObject a => (a -> ElementPadRemovedCallback) ->
C_ElementPadRemovedCallback
wrap_ElementPadRemovedCallback :: forall a.
GObject a =>
(a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
wrap_ElementPadRemovedCallback a -> ElementPadAddedCallback
gi'cb Ptr Element
gi'selfPtr Ptr Pad
oldPad Ptr ()
_ = do
Pad
oldPad' <- ((ManagedPtr Pad -> Pad) -> Ptr Pad -> IO Pad
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Pad -> Pad
Gst.Pad.Pad) Ptr Pad
oldPad
Ptr Element -> (Element -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Element
gi'selfPtr ((Element -> IO ()) -> IO ()) -> (Element -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Element
gi'self -> a -> ElementPadAddedCallback
gi'cb (Element -> a
Coerce.coerce Element
gi'self) Pad
oldPad'
onElementPadRemoved :: (IsElement a, MonadIO m) => a -> ((?self :: a) => ElementPadRemovedCallback) -> m SignalHandlerId
onElementPadRemoved :: forall a (m :: * -> *).
(IsElement a, MonadIO m) =>
a -> ((?self::a) => ElementPadAddedCallback) -> m SignalHandlerId
onElementPadRemoved a
obj (?self::a) => ElementPadAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ElementPadAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ElementPadAddedCallback
ElementPadAddedCallback
cb
let wrapped' :: C_ElementPadAddedCallback
wrapped' = (a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
forall a.
GObject a =>
(a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
wrap_ElementPadRemovedCallback a -> ElementPadAddedCallback
wrapped
FunPtr C_ElementPadAddedCallback
wrapped'' <- C_ElementPadAddedCallback -> IO (FunPtr C_ElementPadAddedCallback)
mk_ElementPadRemovedCallback C_ElementPadAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ElementPadAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pad-removed" FunPtr C_ElementPadAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterElementPadRemoved :: (IsElement a, MonadIO m) => a -> ((?self :: a) => ElementPadRemovedCallback) -> m SignalHandlerId
afterElementPadRemoved :: forall a (m :: * -> *).
(IsElement a, MonadIO m) =>
a -> ((?self::a) => ElementPadAddedCallback) -> m SignalHandlerId
afterElementPadRemoved a
obj (?self::a) => ElementPadAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ElementPadAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ElementPadAddedCallback
ElementPadAddedCallback
cb
let wrapped' :: C_ElementPadAddedCallback
wrapped' = (a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
forall a.
GObject a =>
(a -> ElementPadAddedCallback) -> C_ElementPadAddedCallback
wrap_ElementPadRemovedCallback a -> ElementPadAddedCallback
wrapped
FunPtr C_ElementPadAddedCallback
wrapped'' <- C_ElementPadAddedCallback -> IO (FunPtr C_ElementPadAddedCallback)
mk_ElementPadRemovedCallback C_ElementPadAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ElementPadAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pad-removed" FunPtr C_ElementPadAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ElementPadRemovedSignalInfo
instance SignalInfo ElementPadRemovedSignalInfo where
type HaskellCallbackType ElementPadRemovedSignalInfo = ElementPadRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ElementPadRemovedCallback cb
cb'' <- mk_ElementPadRemovedCallback cb'
connectSignalFunPtr obj "pad-removed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element::pad-removed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#g:signal:padRemoved"})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Element
type instance O.AttributeList Element = ElementAttributeList
type ElementAttributeList = ('[ '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Element = ElementSignalList
type ElementSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("noMorePads", ElementNoMorePadsSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("padAdded", ElementPadAddedSignalInfo), '("padRemoved", ElementPadRemovedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_element_abort_state" gst_element_abort_state ::
Ptr Element ->
IO ()
elementAbortState ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m ()
elementAbortState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m ()
elementAbortState a
element = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Element -> IO ()
gst_element_abort_state Ptr Element
element'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementAbortStateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementAbortStateMethodInfo a signature where
overloadedMethod = elementAbortState
instance O.OverloadedMethodInfo ElementAbortStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementAbortState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementAbortState"
})
#endif
foreign import ccall "gst_element_add_pad" gst_element_add_pad ::
Ptr Element ->
Ptr Gst.Pad.Pad ->
IO CInt
elementAddPad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, Gst.Pad.IsPad b) =>
a
-> b
-> m Bool
elementAddPad :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsPad b) =>
a -> b -> m Bool
elementAddPad a
element 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Pad
pad' <- b -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
pad
CInt
result <- Ptr Element -> Ptr Pad -> IO CInt
gst_element_add_pad Ptr Element
element' 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
element
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 ElementAddPadMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsElement a, Gst.Pad.IsPad b) => O.OverloadedMethod ElementAddPadMethodInfo a signature where
overloadedMethod = elementAddPad
instance O.OverloadedMethodInfo ElementAddPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementAddPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementAddPad"
})
#endif
foreign import ccall "gst_element_add_property_deep_notify_watch" gst_element_add_property_deep_notify_watch ::
Ptr Element ->
CString ->
CInt ->
IO CULong
elementAddPropertyDeepNotifyWatch ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Maybe (T.Text)
-> Bool
-> m CULong
elementAddPropertyDeepNotifyWatch :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Maybe Text -> Bool -> m SignalHandlerId
elementAddPropertyDeepNotifyWatch a
element Maybe Text
propertyName Bool
includeValue = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
maybePropertyName <- case Maybe Text
propertyName of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jPropertyName -> do
Ptr CChar
jPropertyName' <- Text -> IO (Ptr CChar)
textToCString Text
jPropertyName
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jPropertyName'
let includeValue' :: CInt
includeValue' = (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
includeValue
SignalHandlerId
result <- Ptr Element -> Ptr CChar -> CInt -> IO SignalHandlerId
gst_element_add_property_deep_notify_watch Ptr Element
element' Ptr CChar
maybePropertyName CInt
includeValue'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybePropertyName
SignalHandlerId -> IO SignalHandlerId
forall (m :: * -> *) a. Monad m => a -> m a
return SignalHandlerId
result
#if defined(ENABLE_OVERLOADING)
data ElementAddPropertyDeepNotifyWatchMethodInfo
instance (signature ~ (Maybe (T.Text) -> Bool -> m CULong), MonadIO m, IsElement a) => O.OverloadedMethod ElementAddPropertyDeepNotifyWatchMethodInfo a signature where
overloadedMethod = elementAddPropertyDeepNotifyWatch
instance O.OverloadedMethodInfo ElementAddPropertyDeepNotifyWatchMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementAddPropertyDeepNotifyWatch",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementAddPropertyDeepNotifyWatch"
})
#endif
foreign import ccall "gst_element_add_property_notify_watch" gst_element_add_property_notify_watch ::
Ptr Element ->
CString ->
CInt ->
IO CULong
elementAddPropertyNotifyWatch ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Maybe (T.Text)
-> Bool
-> m CULong
elementAddPropertyNotifyWatch :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Maybe Text -> Bool -> m SignalHandlerId
elementAddPropertyNotifyWatch a
element Maybe Text
propertyName Bool
includeValue = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
maybePropertyName <- case Maybe Text
propertyName of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jPropertyName -> do
Ptr CChar
jPropertyName' <- Text -> IO (Ptr CChar)
textToCString Text
jPropertyName
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jPropertyName'
let includeValue' :: CInt
includeValue' = (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
includeValue
SignalHandlerId
result <- Ptr Element -> Ptr CChar -> CInt -> IO SignalHandlerId
gst_element_add_property_notify_watch Ptr Element
element' Ptr CChar
maybePropertyName CInt
includeValue'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybePropertyName
SignalHandlerId -> IO SignalHandlerId
forall (m :: * -> *) a. Monad m => a -> m a
return SignalHandlerId
result
#if defined(ENABLE_OVERLOADING)
data ElementAddPropertyNotifyWatchMethodInfo
instance (signature ~ (Maybe (T.Text) -> Bool -> m CULong), MonadIO m, IsElement a) => O.OverloadedMethod ElementAddPropertyNotifyWatchMethodInfo a signature where
overloadedMethod = elementAddPropertyNotifyWatch
instance O.OverloadedMethodInfo ElementAddPropertyNotifyWatchMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementAddPropertyNotifyWatch",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementAddPropertyNotifyWatch"
})
#endif
foreign import ccall "gst_element_call_async" gst_element_call_async ::
Ptr Element ->
FunPtr Gst.Callbacks.C_ElementCallAsyncFunc ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
elementCallAsync ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Callbacks.ElementCallAsyncFunc
-> m ()
elementCallAsync :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> (Element -> IO ()) -> m ()
elementCallAsync a
element Element -> IO ()
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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
FunPtr C_ElementNoMorePadsCallback
func' <- C_ElementNoMorePadsCallback
-> IO (FunPtr C_ElementNoMorePadsCallback)
Gst.Callbacks.mk_ElementCallAsyncFunc (Maybe (Ptr (FunPtr C_ElementNoMorePadsCallback))
-> ElementCallAsyncFunc_WithClosures -> C_ElementNoMorePadsCallback
Gst.Callbacks.wrap_ElementCallAsyncFunc Maybe (Ptr (FunPtr C_ElementNoMorePadsCallback))
forall a. Maybe a
Nothing ((Element -> IO ()) -> ElementCallAsyncFunc_WithClosures
Gst.Callbacks.drop_closures_ElementCallAsyncFunc Element -> IO ()
func))
let userData :: Ptr ()
userData = FunPtr C_ElementNoMorePadsCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ElementNoMorePadsCallback
func'
let destroyNotify :: FunPtr (Ptr a -> IO ())
destroyNotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
Ptr Element
-> FunPtr C_ElementNoMorePadsCallback
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gst_element_call_async Ptr Element
element' FunPtr C_ElementNoMorePadsCallback
func' Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroyNotify
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementCallAsyncMethodInfo
instance (signature ~ (Gst.Callbacks.ElementCallAsyncFunc -> m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementCallAsyncMethodInfo a signature where
overloadedMethod = elementCallAsync
instance O.OverloadedMethodInfo ElementCallAsyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementCallAsync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementCallAsync"
})
#endif
foreign import ccall "gst_element_change_state" gst_element_change_state ::
Ptr Element ->
CUInt ->
IO CUInt
elementChangeState ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Enums.StateChange
-> m Gst.Enums.StateChangeReturn
elementChangeState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> StateChange -> m StateChangeReturn
elementChangeState a
element StateChange
transition = IO StateChangeReturn -> m StateChangeReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StateChangeReturn -> m StateChangeReturn)
-> IO StateChangeReturn -> m StateChangeReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let transition' :: CUInt
transition' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (StateChange -> Int) -> StateChange -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateChange -> Int
forall a. Enum a => a -> Int
fromEnum) StateChange
transition
CUInt
result <- Ptr Element -> CUInt -> IO CUInt
gst_element_change_state Ptr Element
element' CUInt
transition'
let result' :: StateChangeReturn
result' = (Int -> StateChangeReturn
forall a. Enum a => Int -> a
toEnum (Int -> StateChangeReturn)
-> (CUInt -> Int) -> CUInt -> StateChangeReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
StateChangeReturn -> IO StateChangeReturn
forall (m :: * -> *) a. Monad m => a -> m a
return StateChangeReturn
result'
#if defined(ENABLE_OVERLOADING)
data ElementChangeStateMethodInfo
instance (signature ~ (Gst.Enums.StateChange -> m Gst.Enums.StateChangeReturn), MonadIO m, IsElement a) => O.OverloadedMethod ElementChangeStateMethodInfo a signature where
overloadedMethod = elementChangeState
instance O.OverloadedMethodInfo ElementChangeStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementChangeState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementChangeState"
})
#endif
foreign import ccall "gst_element_continue_state" gst_element_continue_state ::
Ptr Element ->
CUInt ->
IO CUInt
elementContinueState ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Enums.StateChangeReturn
-> m Gst.Enums.StateChangeReturn
elementContinueState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> StateChangeReturn -> m StateChangeReturn
elementContinueState a
element StateChangeReturn
ret = IO StateChangeReturn -> m StateChangeReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StateChangeReturn -> m StateChangeReturn)
-> IO StateChangeReturn -> m StateChangeReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let ret' :: CUInt
ret' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (StateChangeReturn -> Int) -> StateChangeReturn -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateChangeReturn -> Int
forall a. Enum a => a -> Int
fromEnum) StateChangeReturn
ret
CUInt
result <- Ptr Element -> CUInt -> IO CUInt
gst_element_continue_state Ptr Element
element' CUInt
ret'
let result' :: StateChangeReturn
result' = (Int -> StateChangeReturn
forall a. Enum a => Int -> a
toEnum (Int -> StateChangeReturn)
-> (CUInt -> Int) -> CUInt -> StateChangeReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
StateChangeReturn -> IO StateChangeReturn
forall (m :: * -> *) a. Monad m => a -> m a
return StateChangeReturn
result'
#if defined(ENABLE_OVERLOADING)
data ElementContinueStateMethodInfo
instance (signature ~ (Gst.Enums.StateChangeReturn -> m Gst.Enums.StateChangeReturn), MonadIO m, IsElement a) => O.OverloadedMethod ElementContinueStateMethodInfo a signature where
overloadedMethod = elementContinueState
instance O.OverloadedMethodInfo ElementContinueStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementContinueState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementContinueState"
})
#endif
foreign import ccall "gst_element_create_all_pads" gst_element_create_all_pads ::
Ptr Element ->
IO ()
elementCreateAllPads ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m ()
elementCreateAllPads :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m ()
elementCreateAllPads a
element = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Element -> IO ()
gst_element_create_all_pads Ptr Element
element'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementCreateAllPadsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementCreateAllPadsMethodInfo a signature where
overloadedMethod = elementCreateAllPads
instance O.OverloadedMethodInfo ElementCreateAllPadsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementCreateAllPads",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementCreateAllPads"
})
#endif
foreign import ccall "gst_element_foreach_pad" gst_element_foreach_pad ::
Ptr Element ->
FunPtr Gst.Callbacks.C_ElementForeachPadFunc ->
Ptr () ->
IO CInt
elementForeachPad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Callbacks.ElementForeachPadFunc
-> m Bool
elementForeachPad :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> ElementForeachPadFunc -> m Bool
elementForeachPad a
element ElementForeachPadFunc
func = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
FunPtr C_ElementForeachPadFunc
func' <- C_ElementForeachPadFunc -> IO (FunPtr C_ElementForeachPadFunc)
Gst.Callbacks.mk_ElementForeachPadFunc (Maybe (Ptr (FunPtr C_ElementForeachPadFunc))
-> ElementForeachPadFunc_WithClosures -> C_ElementForeachPadFunc
Gst.Callbacks.wrap_ElementForeachPadFunc Maybe (Ptr (FunPtr C_ElementForeachPadFunc))
forall a. Maybe a
Nothing (ElementForeachPadFunc -> ElementForeachPadFunc_WithClosures
Gst.Callbacks.drop_closures_ElementForeachPadFunc ElementForeachPadFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr Element -> FunPtr C_ElementForeachPadFunc -> Ptr () -> IO CInt
gst_element_foreach_pad Ptr Element
element' FunPtr C_ElementForeachPadFunc
func' Ptr ()
forall a. Ptr a
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ElementForeachPadFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ElementForeachPadFunc
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementForeachPadMethodInfo
instance (signature ~ (Gst.Callbacks.ElementForeachPadFunc -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementForeachPadMethodInfo a signature where
overloadedMethod = elementForeachPad
instance O.OverloadedMethodInfo ElementForeachPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementForeachPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementForeachPad"
})
#endif
foreign import ccall "gst_element_foreach_sink_pad" gst_element_foreach_sink_pad ::
Ptr Element ->
FunPtr Gst.Callbacks.C_ElementForeachPadFunc ->
Ptr () ->
IO CInt
elementForeachSinkPad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Callbacks.ElementForeachPadFunc
-> m Bool
elementForeachSinkPad :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> ElementForeachPadFunc -> m Bool
elementForeachSinkPad a
element ElementForeachPadFunc
func = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
FunPtr C_ElementForeachPadFunc
func' <- C_ElementForeachPadFunc -> IO (FunPtr C_ElementForeachPadFunc)
Gst.Callbacks.mk_ElementForeachPadFunc (Maybe (Ptr (FunPtr C_ElementForeachPadFunc))
-> ElementForeachPadFunc_WithClosures -> C_ElementForeachPadFunc
Gst.Callbacks.wrap_ElementForeachPadFunc Maybe (Ptr (FunPtr C_ElementForeachPadFunc))
forall a. Maybe a
Nothing (ElementForeachPadFunc -> ElementForeachPadFunc_WithClosures
Gst.Callbacks.drop_closures_ElementForeachPadFunc ElementForeachPadFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr Element -> FunPtr C_ElementForeachPadFunc -> Ptr () -> IO CInt
gst_element_foreach_sink_pad Ptr Element
element' FunPtr C_ElementForeachPadFunc
func' Ptr ()
forall a. Ptr a
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ElementForeachPadFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ElementForeachPadFunc
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementForeachSinkPadMethodInfo
instance (signature ~ (Gst.Callbacks.ElementForeachPadFunc -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementForeachSinkPadMethodInfo a signature where
overloadedMethod = elementForeachSinkPad
instance O.OverloadedMethodInfo ElementForeachSinkPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementForeachSinkPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementForeachSinkPad"
})
#endif
foreign import ccall "gst_element_foreach_src_pad" gst_element_foreach_src_pad ::
Ptr Element ->
FunPtr Gst.Callbacks.C_ElementForeachPadFunc ->
Ptr () ->
IO CInt
elementForeachSrcPad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Callbacks.ElementForeachPadFunc
-> m Bool
elementForeachSrcPad :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> ElementForeachPadFunc -> m Bool
elementForeachSrcPad a
element ElementForeachPadFunc
func = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
FunPtr C_ElementForeachPadFunc
func' <- C_ElementForeachPadFunc -> IO (FunPtr C_ElementForeachPadFunc)
Gst.Callbacks.mk_ElementForeachPadFunc (Maybe (Ptr (FunPtr C_ElementForeachPadFunc))
-> ElementForeachPadFunc_WithClosures -> C_ElementForeachPadFunc
Gst.Callbacks.wrap_ElementForeachPadFunc Maybe (Ptr (FunPtr C_ElementForeachPadFunc))
forall a. Maybe a
Nothing (ElementForeachPadFunc -> ElementForeachPadFunc_WithClosures
Gst.Callbacks.drop_closures_ElementForeachPadFunc ElementForeachPadFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr Element -> FunPtr C_ElementForeachPadFunc -> Ptr () -> IO CInt
gst_element_foreach_src_pad Ptr Element
element' FunPtr C_ElementForeachPadFunc
func' Ptr ()
forall a. Ptr a
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_ElementForeachPadFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_ElementForeachPadFunc
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementForeachSrcPadMethodInfo
instance (signature ~ (Gst.Callbacks.ElementForeachPadFunc -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementForeachSrcPadMethodInfo a signature where
overloadedMethod = elementForeachSrcPad
instance O.OverloadedMethodInfo ElementForeachSrcPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementForeachSrcPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementForeachSrcPad"
})
#endif
foreign import ccall "gst_element_get_base_time" gst_element_get_base_time ::
Ptr Element ->
IO Word64
elementGetBaseTime ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Word64
elementGetBaseTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Word64
elementGetBaseTime a
element = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Word64
result <- Ptr Element -> IO Word64
gst_element_get_base_time Ptr Element
element'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data ElementGetBaseTimeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetBaseTimeMethodInfo a signature where
overloadedMethod = elementGetBaseTime
instance O.OverloadedMethodInfo ElementGetBaseTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetBaseTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetBaseTime"
})
#endif
foreign import ccall "gst_element_get_bus" gst_element_get_bus ::
Ptr Element ->
IO (Ptr Gst.Bus.Bus)
elementGetBus ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m (Maybe Gst.Bus.Bus)
elementGetBus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m (Maybe Bus)
elementGetBus a
element = IO (Maybe Bus) -> m (Maybe Bus)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Bus) -> m (Maybe Bus))
-> IO (Maybe Bus) -> m (Maybe Bus)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Bus
result <- Ptr Element -> IO (Ptr Bus)
gst_element_get_bus Ptr Element
element'
Maybe Bus
maybeResult <- Ptr Bus -> (Ptr Bus -> IO Bus) -> IO (Maybe Bus)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Bus
result ((Ptr Bus -> IO Bus) -> IO (Maybe Bus))
-> (Ptr Bus -> IO Bus) -> IO (Maybe Bus)
forall a b. (a -> b) -> a -> b
$ \Ptr Bus
result' -> do
Bus
result'' <- ((ManagedPtr Bus -> Bus) -> Ptr Bus -> IO Bus
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Bus -> Bus
Gst.Bus.Bus) Ptr Bus
result'
Bus -> IO Bus
forall (m :: * -> *) a. Monad m => a -> m a
return Bus
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Maybe Bus -> IO (Maybe Bus)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Bus
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetBusMethodInfo
instance (signature ~ (m (Maybe Gst.Bus.Bus)), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetBusMethodInfo a signature where
overloadedMethod = elementGetBus
instance O.OverloadedMethodInfo ElementGetBusMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetBus",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetBus"
})
#endif
foreign import ccall "gst_element_get_clock" gst_element_get_clock ::
Ptr Element ->
IO (Ptr Gst.Clock.Clock)
elementGetClock ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m (Maybe Gst.Clock.Clock)
elementGetClock :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m (Maybe Clock)
elementGetClock a
element = IO (Maybe Clock) -> m (Maybe Clock)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Clock) -> m (Maybe Clock))
-> IO (Maybe Clock) -> m (Maybe Clock)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Clock
result <- Ptr Element -> IO (Ptr Clock)
gst_element_get_clock Ptr Element
element'
Maybe Clock
maybeResult <- Ptr Clock -> (Ptr Clock -> IO Clock) -> IO (Maybe Clock)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Clock
result ((Ptr Clock -> IO Clock) -> IO (Maybe Clock))
-> (Ptr Clock -> IO Clock) -> IO (Maybe Clock)
forall a b. (a -> b) -> a -> b
$ \Ptr Clock
result' -> do
Clock
result'' <- ((ManagedPtr Clock -> Clock) -> Ptr Clock -> IO Clock
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Clock -> Clock
Gst.Clock.Clock) Ptr Clock
result'
Clock -> IO Clock
forall (m :: * -> *) a. Monad m => a -> m a
return Clock
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Maybe Clock -> IO (Maybe Clock)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Clock
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetClockMethodInfo
instance (signature ~ (m (Maybe Gst.Clock.Clock)), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetClockMethodInfo a signature where
overloadedMethod = elementGetClock
instance O.OverloadedMethodInfo ElementGetClockMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetClock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetClock"
})
#endif
foreign import ccall "gst_element_get_compatible_pad" gst_element_get_compatible_pad ::
Ptr Element ->
Ptr Gst.Pad.Pad ->
Ptr Gst.Caps.Caps ->
IO (Ptr Gst.Pad.Pad)
elementGetCompatiblePad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, Gst.Pad.IsPad b) =>
a
-> b
-> Maybe (Gst.Caps.Caps)
-> m (Maybe Gst.Pad.Pad)
elementGetCompatiblePad :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsPad b) =>
a -> b -> Maybe Caps -> m (Maybe Pad)
elementGetCompatiblePad a
element b
pad Maybe Caps
caps = IO (Maybe Pad) -> m (Maybe Pad)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pad) -> m (Maybe Pad))
-> IO (Maybe Pad) -> m (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Pad
pad' <- b -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
pad
Ptr Caps
maybeCaps <- case Maybe Caps
caps of
Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just Caps
jCaps -> do
Ptr Caps
jCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jCaps
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jCaps'
Ptr Pad
result <- Ptr Element -> Ptr Pad -> Ptr Caps -> IO (Ptr Pad)
gst_element_get_compatible_pad Ptr Element
element' Ptr Pad
pad' Ptr Caps
maybeCaps
Maybe Pad
maybeResult <- Ptr Pad -> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pad
result ((Ptr Pad -> IO Pad) -> IO (Maybe Pad))
-> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ \Ptr Pad
result' -> do
Pad
result'' <- ((ManagedPtr Pad -> Pad) -> Ptr Pad -> IO Pad
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pad -> Pad
Gst.Pad.Pad) Ptr Pad
result'
Pad -> IO Pad
forall (m :: * -> *) a. Monad m => a -> m a
return Pad
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
pad
Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
caps Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe Pad -> IO (Maybe Pad)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pad
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetCompatiblePadMethodInfo
instance (signature ~ (b -> Maybe (Gst.Caps.Caps) -> m (Maybe Gst.Pad.Pad)), MonadIO m, IsElement a, Gst.Pad.IsPad b) => O.OverloadedMethod ElementGetCompatiblePadMethodInfo a signature where
overloadedMethod = elementGetCompatiblePad
instance O.OverloadedMethodInfo ElementGetCompatiblePadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetCompatiblePad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetCompatiblePad"
})
#endif
foreign import ccall "gst_element_get_compatible_pad_template" gst_element_get_compatible_pad_template ::
Ptr Element ->
Ptr Gst.PadTemplate.PadTemplate ->
IO (Ptr Gst.PadTemplate.PadTemplate)
elementGetCompatiblePadTemplate ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, Gst.PadTemplate.IsPadTemplate b) =>
a
-> b
-> m (Maybe Gst.PadTemplate.PadTemplate)
elementGetCompatiblePadTemplate :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsPadTemplate b) =>
a -> b -> m (Maybe PadTemplate)
elementGetCompatiblePadTemplate a
element b
compattempl = IO (Maybe PadTemplate) -> m (Maybe PadTemplate)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe PadTemplate) -> m (Maybe PadTemplate))
-> IO (Maybe PadTemplate) -> m (Maybe PadTemplate)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr PadTemplate
compattempl' <- b -> IO (Ptr PadTemplate)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
compattempl
Ptr PadTemplate
result <- Ptr Element -> Ptr PadTemplate -> IO (Ptr PadTemplate)
gst_element_get_compatible_pad_template Ptr Element
element' Ptr PadTemplate
compattempl'
Maybe PadTemplate
maybeResult <- Ptr PadTemplate
-> (Ptr PadTemplate -> IO PadTemplate) -> IO (Maybe PadTemplate)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr PadTemplate
result ((Ptr PadTemplate -> IO PadTemplate) -> IO (Maybe PadTemplate))
-> (Ptr PadTemplate -> IO PadTemplate) -> IO (Maybe PadTemplate)
forall a b. (a -> b) -> a -> b
$ \Ptr PadTemplate
result' -> do
PadTemplate
result'' <- ((ManagedPtr PadTemplate -> PadTemplate)
-> Ptr PadTemplate -> IO PadTemplate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PadTemplate -> PadTemplate
Gst.PadTemplate.PadTemplate) Ptr PadTemplate
result'
PadTemplate -> IO PadTemplate
forall (m :: * -> *) a. Monad m => a -> m a
return PadTemplate
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
compattempl
Maybe PadTemplate -> IO (Maybe PadTemplate)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PadTemplate
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetCompatiblePadTemplateMethodInfo
instance (signature ~ (b -> m (Maybe Gst.PadTemplate.PadTemplate)), MonadIO m, IsElement a, Gst.PadTemplate.IsPadTemplate b) => O.OverloadedMethod ElementGetCompatiblePadTemplateMethodInfo a signature where
overloadedMethod = elementGetCompatiblePadTemplate
instance O.OverloadedMethodInfo ElementGetCompatiblePadTemplateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetCompatiblePadTemplate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetCompatiblePadTemplate"
})
#endif
foreign import ccall "gst_element_get_context" gst_element_get_context ::
Ptr Element ->
CString ->
IO (Ptr Gst.Context.Context)
elementGetContext ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> T.Text
-> m (Maybe Gst.Context.Context)
elementGetContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Text -> m (Maybe Context)
elementGetContext a
element Text
contextType = IO (Maybe Context) -> m (Maybe Context)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Context) -> m (Maybe Context))
-> IO (Maybe Context) -> m (Maybe Context)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
contextType' <- Text -> IO (Ptr CChar)
textToCString Text
contextType
Ptr Context
result <- Ptr Element -> Ptr CChar -> IO (Ptr Context)
gst_element_get_context Ptr Element
element' Ptr CChar
contextType'
Maybe Context
maybeResult <- Ptr Context -> (Ptr Context -> IO Context) -> IO (Maybe Context)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Context
result ((Ptr Context -> IO Context) -> IO (Maybe Context))
-> (Ptr Context -> IO Context) -> IO (Maybe Context)
forall a b. (a -> b) -> a -> b
$ \Ptr Context
result' -> do
Context
result'' <- ((ManagedPtr Context -> Context) -> Ptr Context -> IO Context
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Context -> Context
Gst.Context.Context) Ptr Context
result'
Context -> IO Context
forall (m :: * -> *) a. Monad m => a -> m a
return Context
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
contextType'
Maybe Context -> IO (Maybe Context)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Context
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetContextMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gst.Context.Context)), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetContextMethodInfo a signature where
overloadedMethod = elementGetContext
instance O.OverloadedMethodInfo ElementGetContextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetContext",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetContext"
})
#endif
foreign import ccall "gst_element_get_context_unlocked" gst_element_get_context_unlocked ::
Ptr Element ->
CString ->
IO (Ptr Gst.Context.Context)
elementGetContextUnlocked ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> T.Text
-> m (Maybe Gst.Context.Context)
elementGetContextUnlocked :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Text -> m (Maybe Context)
elementGetContextUnlocked a
element Text
contextType = IO (Maybe Context) -> m (Maybe Context)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Context) -> m (Maybe Context))
-> IO (Maybe Context) -> m (Maybe Context)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
contextType' <- Text -> IO (Ptr CChar)
textToCString Text
contextType
Ptr Context
result <- Ptr Element -> Ptr CChar -> IO (Ptr Context)
gst_element_get_context_unlocked Ptr Element
element' Ptr CChar
contextType'
Maybe Context
maybeResult <- Ptr Context -> (Ptr Context -> IO Context) -> IO (Maybe Context)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Context
result ((Ptr Context -> IO Context) -> IO (Maybe Context))
-> (Ptr Context -> IO Context) -> IO (Maybe Context)
forall a b. (a -> b) -> a -> b
$ \Ptr Context
result' -> do
Context
result'' <- ((ManagedPtr Context -> Context) -> Ptr Context -> IO Context
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Context -> Context
Gst.Context.Context) Ptr Context
result'
Context -> IO Context
forall (m :: * -> *) a. Monad m => a -> m a
return Context
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
contextType'
Maybe Context -> IO (Maybe Context)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Context
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetContextUnlockedMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gst.Context.Context)), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetContextUnlockedMethodInfo a signature where
overloadedMethod = elementGetContextUnlocked
instance O.OverloadedMethodInfo ElementGetContextUnlockedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetContextUnlocked",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetContextUnlocked"
})
#endif
foreign import ccall "gst_element_get_contexts" gst_element_get_contexts ::
Ptr Element ->
IO (Ptr (GList (Ptr Gst.Context.Context)))
elementGetContexts ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m [Gst.Context.Context]
elementGetContexts :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m [Context]
elementGetContexts a
element = IO [Context] -> m [Context]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Context] -> m [Context]) -> IO [Context] -> m [Context]
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr (GList (Ptr Context))
result <- Ptr Element -> IO (Ptr (GList (Ptr Context)))
gst_element_get_contexts Ptr Element
element'
[Ptr Context]
result' <- Ptr (GList (Ptr Context)) -> IO [Ptr Context]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Context))
result
[Context]
result'' <- (Ptr Context -> IO Context) -> [Ptr Context] -> IO [Context]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Context -> Context) -> Ptr Context -> IO Context
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Context -> Context
Gst.Context.Context) [Ptr Context]
result'
Ptr (GList (Ptr Context)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Context))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
[Context] -> IO [Context]
forall (m :: * -> *) a. Monad m => a -> m a
return [Context]
result''
#if defined(ENABLE_OVERLOADING)
data ElementGetContextsMethodInfo
instance (signature ~ (m [Gst.Context.Context]), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetContextsMethodInfo a signature where
overloadedMethod = elementGetContexts
instance O.OverloadedMethodInfo ElementGetContextsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetContexts",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetContexts"
})
#endif
foreign import ccall "gst_element_get_current_clock_time" gst_element_get_current_clock_time ::
Ptr Element ->
IO Word64
elementGetCurrentClockTime ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Word64
elementGetCurrentClockTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Word64
elementGetCurrentClockTime a
element = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Word64
result <- Ptr Element -> IO Word64
gst_element_get_current_clock_time Ptr Element
element'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data ElementGetCurrentClockTimeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetCurrentClockTimeMethodInfo a signature where
overloadedMethod = elementGetCurrentClockTime
instance O.OverloadedMethodInfo ElementGetCurrentClockTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetCurrentClockTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetCurrentClockTime"
})
#endif
foreign import ccall "gst_element_get_current_running_time" gst_element_get_current_running_time ::
Ptr Element ->
IO Word64
elementGetCurrentRunningTime ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Word64
elementGetCurrentRunningTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Word64
elementGetCurrentRunningTime a
element = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Word64
result <- Ptr Element -> IO Word64
gst_element_get_current_running_time Ptr Element
element'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data ElementGetCurrentRunningTimeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetCurrentRunningTimeMethodInfo a signature where
overloadedMethod = elementGetCurrentRunningTime
instance O.OverloadedMethodInfo ElementGetCurrentRunningTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetCurrentRunningTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetCurrentRunningTime"
})
#endif
foreign import ccall "gst_element_get_factory" gst_element_get_factory ::
Ptr Element ->
IO (Ptr Gst.ElementFactory.ElementFactory)
elementGetFactory ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m (Maybe Gst.ElementFactory.ElementFactory)
elementGetFactory :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m (Maybe ElementFactory)
elementGetFactory a
element = IO (Maybe ElementFactory) -> m (Maybe ElementFactory)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ElementFactory) -> m (Maybe ElementFactory))
-> IO (Maybe ElementFactory) -> m (Maybe ElementFactory)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr ElementFactory
result <- Ptr Element -> IO (Ptr ElementFactory)
gst_element_get_factory Ptr Element
element'
Maybe ElementFactory
maybeResult <- Ptr ElementFactory
-> (Ptr ElementFactory -> IO ElementFactory)
-> IO (Maybe ElementFactory)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ElementFactory
result ((Ptr ElementFactory -> IO ElementFactory)
-> IO (Maybe ElementFactory))
-> (Ptr ElementFactory -> IO ElementFactory)
-> IO (Maybe ElementFactory)
forall a b. (a -> b) -> a -> b
$ \Ptr ElementFactory
result' -> do
ElementFactory
result'' <- ((ManagedPtr ElementFactory -> ElementFactory)
-> Ptr ElementFactory -> IO ElementFactory
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ElementFactory -> ElementFactory
Gst.ElementFactory.ElementFactory) Ptr ElementFactory
result'
ElementFactory -> IO ElementFactory
forall (m :: * -> *) a. Monad m => a -> m a
return ElementFactory
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Maybe ElementFactory -> IO (Maybe ElementFactory)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ElementFactory
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetFactoryMethodInfo
instance (signature ~ (m (Maybe Gst.ElementFactory.ElementFactory)), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetFactoryMethodInfo a signature where
overloadedMethod = elementGetFactory
instance O.OverloadedMethodInfo ElementGetFactoryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetFactory",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetFactory"
})
#endif
foreign import ccall "gst_element_get_metadata" gst_element_get_metadata ::
Ptr Element ->
CString ->
IO CString
elementGetMetadata ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> T.Text
-> m T.Text
elementGetMetadata :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Text -> m Text
elementGetMetadata a
element Text
key = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
key' <- Text -> IO (Ptr CChar)
textToCString Text
key
Ptr CChar
result <- Ptr Element -> Ptr CChar -> IO (Ptr CChar)
gst_element_get_metadata Ptr Element
element' Ptr CChar
key'
Text -> Ptr CChar -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"elementGetMetadata" Ptr CChar
result
Text
result' <- HasCallStack => Ptr CChar -> IO Text
Ptr CChar -> IO Text
cstringToText Ptr CChar
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
key'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data ElementGetMetadataMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetMetadataMethodInfo a signature where
overloadedMethod = elementGetMetadata
instance O.OverloadedMethodInfo ElementGetMetadataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetMetadata",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetMetadata"
})
#endif
foreign import ccall "gst_element_get_pad_template" gst_element_get_pad_template ::
Ptr Element ->
CString ->
IO (Ptr Gst.PadTemplate.PadTemplate)
elementGetPadTemplate ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> T.Text
-> m (Maybe Gst.PadTemplate.PadTemplate)
elementGetPadTemplate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Text -> m (Maybe PadTemplate)
elementGetPadTemplate a
element Text
name = IO (Maybe PadTemplate) -> m (Maybe PadTemplate)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe PadTemplate) -> m (Maybe PadTemplate))
-> IO (Maybe PadTemplate) -> m (Maybe PadTemplate)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
name' <- Text -> IO (Ptr CChar)
textToCString Text
name
Ptr PadTemplate
result <- Ptr Element -> Ptr CChar -> IO (Ptr PadTemplate)
gst_element_get_pad_template Ptr Element
element' Ptr CChar
name'
Maybe PadTemplate
maybeResult <- Ptr PadTemplate
-> (Ptr PadTemplate -> IO PadTemplate) -> IO (Maybe PadTemplate)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr PadTemplate
result ((Ptr PadTemplate -> IO PadTemplate) -> IO (Maybe PadTemplate))
-> (Ptr PadTemplate -> IO PadTemplate) -> IO (Maybe PadTemplate)
forall a b. (a -> b) -> a -> b
$ \Ptr PadTemplate
result' -> do
PadTemplate
result'' <- ((ManagedPtr PadTemplate -> PadTemplate)
-> Ptr PadTemplate -> IO PadTemplate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PadTemplate -> PadTemplate
Gst.PadTemplate.PadTemplate) Ptr PadTemplate
result'
PadTemplate -> IO PadTemplate
forall (m :: * -> *) a. Monad m => a -> m a
return PadTemplate
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
name'
Maybe PadTemplate -> IO (Maybe PadTemplate)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PadTemplate
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetPadTemplateMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gst.PadTemplate.PadTemplate)), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetPadTemplateMethodInfo a signature where
overloadedMethod = elementGetPadTemplate
instance O.OverloadedMethodInfo ElementGetPadTemplateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetPadTemplate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetPadTemplate"
})
#endif
foreign import ccall "gst_element_get_pad_template_list" gst_element_get_pad_template_list ::
Ptr Element ->
IO (Ptr (GList (Ptr Gst.PadTemplate.PadTemplate)))
elementGetPadTemplateList ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m [Gst.PadTemplate.PadTemplate]
elementGetPadTemplateList :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m [PadTemplate]
elementGetPadTemplateList a
element = IO [PadTemplate] -> m [PadTemplate]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [PadTemplate] -> m [PadTemplate])
-> IO [PadTemplate] -> m [PadTemplate]
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr (GList (Ptr PadTemplate))
result <- Ptr Element -> IO (Ptr (GList (Ptr PadTemplate)))
gst_element_get_pad_template_list Ptr Element
element'
[Ptr PadTemplate]
result' <- Ptr (GList (Ptr PadTemplate)) -> IO [Ptr PadTemplate]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr PadTemplate))
result
[PadTemplate]
result'' <- (Ptr PadTemplate -> IO PadTemplate)
-> [Ptr PadTemplate] -> IO [PadTemplate]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr PadTemplate -> PadTemplate)
-> Ptr PadTemplate -> IO PadTemplate
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PadTemplate -> PadTemplate
Gst.PadTemplate.PadTemplate) [Ptr PadTemplate]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
[PadTemplate] -> IO [PadTemplate]
forall (m :: * -> *) a. Monad m => a -> m a
return [PadTemplate]
result''
#if defined(ENABLE_OVERLOADING)
data ElementGetPadTemplateListMethodInfo
instance (signature ~ (m [Gst.PadTemplate.PadTemplate]), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetPadTemplateListMethodInfo a signature where
overloadedMethod = elementGetPadTemplateList
instance O.OverloadedMethodInfo ElementGetPadTemplateListMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetPadTemplateList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetPadTemplateList"
})
#endif
foreign import ccall "gst_element_get_request_pad" gst_element_get_request_pad ::
Ptr Element ->
CString ->
IO (Ptr Gst.Pad.Pad)
{-# DEPRECATED elementGetRequestPad ["(Since version 1.20)","Prefer using 'GI.Gst.Objects.Element.elementRequestPadSimple' which","provides the exact same functionality."] #-}
elementGetRequestPad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> T.Text
-> m (Maybe Gst.Pad.Pad)
elementGetRequestPad :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Text -> m (Maybe Pad)
elementGetRequestPad a
element Text
name = IO (Maybe Pad) -> m (Maybe Pad)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pad) -> m (Maybe Pad))
-> IO (Maybe Pad) -> m (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
name' <- Text -> IO (Ptr CChar)
textToCString Text
name
Ptr Pad
result <- Ptr Element -> Ptr CChar -> IO (Ptr Pad)
gst_element_get_request_pad Ptr Element
element' Ptr CChar
name'
Maybe Pad
maybeResult <- Ptr Pad -> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pad
result ((Ptr Pad -> IO Pad) -> IO (Maybe Pad))
-> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ \Ptr Pad
result' -> do
Pad
result'' <- ((ManagedPtr Pad -> Pad) -> Ptr Pad -> IO Pad
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pad -> Pad
Gst.Pad.Pad) Ptr Pad
result'
Pad -> IO Pad
forall (m :: * -> *) a. Monad m => a -> m a
return Pad
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
name'
Maybe Pad -> IO (Maybe Pad)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pad
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetRequestPadMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gst.Pad.Pad)), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetRequestPadMethodInfo a signature where
overloadedMethod = elementGetRequestPad
instance O.OverloadedMethodInfo ElementGetRequestPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetRequestPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetRequestPad"
})
#endif
foreign import ccall "gst_element_get_start_time" gst_element_get_start_time ::
Ptr Element ->
IO Word64
elementGetStartTime ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Word64
elementGetStartTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Word64
elementGetStartTime a
element = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Word64
result <- Ptr Element -> IO Word64
gst_element_get_start_time Ptr Element
element'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data ElementGetStartTimeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetStartTimeMethodInfo a signature where
overloadedMethod = elementGetStartTime
instance O.OverloadedMethodInfo ElementGetStartTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetStartTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetStartTime"
})
#endif
foreign import ccall "gst_element_get_state" gst_element_get_state ::
Ptr Element ->
Ptr CUInt ->
Ptr CUInt ->
Word64 ->
IO CUInt
elementGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Word64
-> m ((Gst.Enums.StateChangeReturn, Gst.Enums.State, Gst.Enums.State))
elementGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Word64 -> m (StateChangeReturn, State, State)
elementGetState a
element Word64
timeout = IO (StateChangeReturn, State, State)
-> m (StateChangeReturn, State, State)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (StateChangeReturn, State, State)
-> m (StateChangeReturn, State, State))
-> IO (StateChangeReturn, State, State)
-> m (StateChangeReturn, State, State)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CUInt
state <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr CUInt
pending <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CUInt
result <- Ptr Element -> Ptr CUInt -> Ptr CUInt -> Word64 -> IO CUInt
gst_element_get_state Ptr Element
element' Ptr CUInt
state Ptr CUInt
pending Word64
timeout
let result' :: StateChangeReturn
result' = (Int -> StateChangeReturn
forall a. Enum a => Int -> a
toEnum (Int -> StateChangeReturn)
-> (CUInt -> Int) -> CUInt -> StateChangeReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
CUInt
state' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
state
let state'' :: State
state'' = (Int -> State
forall a. Enum a => Int -> a
toEnum (Int -> State) -> (CUInt -> Int) -> CUInt -> State
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
state'
CUInt
pending' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
pending
let pending'' :: State
pending'' = (Int -> State
forall a. Enum a => Int -> a
toEnum (Int -> State) -> (CUInt -> Int) -> CUInt -> State
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
pending'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
state
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
pending
(StateChangeReturn, State, State)
-> IO (StateChangeReturn, State, State)
forall (m :: * -> *) a. Monad m => a -> m a
return (StateChangeReturn
result', State
state'', State
pending'')
#if defined(ENABLE_OVERLOADING)
data ElementGetStateMethodInfo
instance (signature ~ (Word64 -> m ((Gst.Enums.StateChangeReturn, Gst.Enums.State, Gst.Enums.State))), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetStateMethodInfo a signature where
overloadedMethod = elementGetState
instance O.OverloadedMethodInfo ElementGetStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetState"
})
#endif
foreign import ccall "gst_element_get_static_pad" gst_element_get_static_pad ::
Ptr Element ->
CString ->
IO (Ptr Gst.Pad.Pad)
elementGetStaticPad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> T.Text
-> m (Maybe Gst.Pad.Pad)
elementGetStaticPad :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Text -> m (Maybe Pad)
elementGetStaticPad a
element Text
name = IO (Maybe Pad) -> m (Maybe Pad)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pad) -> m (Maybe Pad))
-> IO (Maybe Pad) -> m (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
name' <- Text -> IO (Ptr CChar)
textToCString Text
name
Ptr Pad
result <- Ptr Element -> Ptr CChar -> IO (Ptr Pad)
gst_element_get_static_pad Ptr Element
element' Ptr CChar
name'
Maybe Pad
maybeResult <- Ptr Pad -> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pad
result ((Ptr Pad -> IO Pad) -> IO (Maybe Pad))
-> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ \Ptr Pad
result' -> do
Pad
result'' <- ((ManagedPtr Pad -> Pad) -> Ptr Pad -> IO Pad
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pad -> Pad
Gst.Pad.Pad) Ptr Pad
result'
Pad -> IO Pad
forall (m :: * -> *) a. Monad m => a -> m a
return Pad
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
name'
Maybe Pad -> IO (Maybe Pad)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pad
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementGetStaticPadMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gst.Pad.Pad)), MonadIO m, IsElement a) => O.OverloadedMethod ElementGetStaticPadMethodInfo a signature where
overloadedMethod = elementGetStaticPad
instance O.OverloadedMethodInfo ElementGetStaticPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementGetStaticPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementGetStaticPad"
})
#endif
foreign import ccall "gst_element_is_locked_state" gst_element_is_locked_state ::
Ptr Element ->
IO CInt
elementIsLockedState ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Bool
elementIsLockedState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Bool
elementIsLockedState a
element = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
CInt
result <- Ptr Element -> IO CInt
gst_element_is_locked_state Ptr Element
element'
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
element
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementIsLockedStateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementIsLockedStateMethodInfo a signature where
overloadedMethod = elementIsLockedState
instance O.OverloadedMethodInfo ElementIsLockedStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementIsLockedState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementIsLockedState"
})
#endif
foreign import ccall "gst_element_iterate_pads" gst_element_iterate_pads ::
Ptr Element ->
IO (Ptr Gst.Iterator.Iterator)
elementIteratePads ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Gst.Iterator.Iterator
elementIteratePads :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Iterator
elementIteratePads a
element = IO Iterator -> m Iterator
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Iterator -> m Iterator) -> IO Iterator -> m Iterator
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Iterator
result <- Ptr Element -> IO (Ptr Iterator)
gst_element_iterate_pads Ptr Element
element'
Text -> Ptr Iterator -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"elementIteratePads" Ptr Iterator
result
Iterator
result' <- ((ManagedPtr Iterator -> Iterator) -> Ptr Iterator -> IO Iterator
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Iterator -> Iterator
Gst.Iterator.Iterator) Ptr Iterator
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Iterator -> IO Iterator
forall (m :: * -> *) a. Monad m => a -> m a
return Iterator
result'
#if defined(ENABLE_OVERLOADING)
data ElementIteratePadsMethodInfo
instance (signature ~ (m Gst.Iterator.Iterator), MonadIO m, IsElement a) => O.OverloadedMethod ElementIteratePadsMethodInfo a signature where
overloadedMethod = elementIteratePads
instance O.OverloadedMethodInfo ElementIteratePadsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementIteratePads",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementIteratePads"
})
#endif
foreign import ccall "gst_element_iterate_sink_pads" gst_element_iterate_sink_pads ::
Ptr Element ->
IO (Ptr Gst.Iterator.Iterator)
elementIterateSinkPads ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Gst.Iterator.Iterator
elementIterateSinkPads :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Iterator
elementIterateSinkPads a
element = IO Iterator -> m Iterator
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Iterator -> m Iterator) -> IO Iterator -> m Iterator
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Iterator
result <- Ptr Element -> IO (Ptr Iterator)
gst_element_iterate_sink_pads Ptr Element
element'
Text -> Ptr Iterator -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"elementIterateSinkPads" Ptr Iterator
result
Iterator
result' <- ((ManagedPtr Iterator -> Iterator) -> Ptr Iterator -> IO Iterator
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Iterator -> Iterator
Gst.Iterator.Iterator) Ptr Iterator
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Iterator -> IO Iterator
forall (m :: * -> *) a. Monad m => a -> m a
return Iterator
result'
#if defined(ENABLE_OVERLOADING)
data ElementIterateSinkPadsMethodInfo
instance (signature ~ (m Gst.Iterator.Iterator), MonadIO m, IsElement a) => O.OverloadedMethod ElementIterateSinkPadsMethodInfo a signature where
overloadedMethod = elementIterateSinkPads
instance O.OverloadedMethodInfo ElementIterateSinkPadsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementIterateSinkPads",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementIterateSinkPads"
})
#endif
foreign import ccall "gst_element_iterate_src_pads" gst_element_iterate_src_pads ::
Ptr Element ->
IO (Ptr Gst.Iterator.Iterator)
elementIterateSrcPads ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Gst.Iterator.Iterator
elementIterateSrcPads :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Iterator
elementIterateSrcPads a
element = IO Iterator -> m Iterator
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Iterator -> m Iterator) -> IO Iterator -> m Iterator
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Iterator
result <- Ptr Element -> IO (Ptr Iterator)
gst_element_iterate_src_pads Ptr Element
element'
Text -> Ptr Iterator -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"elementIterateSrcPads" Ptr Iterator
result
Iterator
result' <- ((ManagedPtr Iterator -> Iterator) -> Ptr Iterator -> IO Iterator
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Iterator -> Iterator
Gst.Iterator.Iterator) Ptr Iterator
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Iterator -> IO Iterator
forall (m :: * -> *) a. Monad m => a -> m a
return Iterator
result'
#if defined(ENABLE_OVERLOADING)
data ElementIterateSrcPadsMethodInfo
instance (signature ~ (m Gst.Iterator.Iterator), MonadIO m, IsElement a) => O.OverloadedMethod ElementIterateSrcPadsMethodInfo a signature where
overloadedMethod = elementIterateSrcPads
instance O.OverloadedMethodInfo ElementIterateSrcPadsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementIterateSrcPads",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementIterateSrcPads"
})
#endif
foreign import ccall "gst_element_link" gst_element_link ::
Ptr Element ->
Ptr Element ->
IO CInt
elementLink ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a
-> b
-> m Bool
elementLink :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a -> b -> m Bool
elementLink a
src b
dest = 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 Element
src' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
src
Ptr Element
dest' <- b -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dest
CInt
result <- Ptr Element -> Ptr Element -> IO CInt
gst_element_link Ptr Element
src' Ptr Element
dest'
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
src
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dest
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementLinkMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsElement a, IsElement b) => O.OverloadedMethod ElementLinkMethodInfo a signature where
overloadedMethod = elementLink
instance O.OverloadedMethodInfo ElementLinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementLink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementLink"
})
#endif
foreign import ccall "gst_element_link_filtered" gst_element_link_filtered ::
Ptr Element ->
Ptr Element ->
Ptr Gst.Caps.Caps ->
IO CInt
elementLinkFiltered ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a
-> b
-> Maybe (Gst.Caps.Caps)
-> m Bool
elementLinkFiltered :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a -> b -> Maybe Caps -> m Bool
elementLinkFiltered a
src b
dest Maybe Caps
filter = 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 Element
src' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
src
Ptr Element
dest' <- b -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dest
Ptr Caps
maybeFilter <- case Maybe Caps
filter of
Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just Caps
jFilter -> do
Ptr Caps
jFilter' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jFilter
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jFilter'
CInt
result <- Ptr Element -> Ptr Element -> Ptr Caps -> IO CInt
gst_element_link_filtered Ptr Element
src' Ptr Element
dest' Ptr Caps
maybeFilter
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
src
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dest
Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
filter Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementLinkFilteredMethodInfo
instance (signature ~ (b -> Maybe (Gst.Caps.Caps) -> m Bool), MonadIO m, IsElement a, IsElement b) => O.OverloadedMethod ElementLinkFilteredMethodInfo a signature where
overloadedMethod = elementLinkFiltered
instance O.OverloadedMethodInfo ElementLinkFilteredMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementLinkFiltered",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementLinkFiltered"
})
#endif
foreign import ccall "gst_element_link_pads" gst_element_link_pads ::
Ptr Element ->
CString ->
Ptr Element ->
CString ->
IO CInt
elementLinkPads ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a
-> Maybe (T.Text)
-> b
-> Maybe (T.Text)
-> m Bool
elementLinkPads :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a -> Maybe Text -> b -> Maybe Text -> m Bool
elementLinkPads a
src Maybe Text
srcpadname b
dest Maybe Text
destpadname = 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 Element
src' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
src
Ptr CChar
maybeSrcpadname <- case Maybe Text
srcpadname of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jSrcpadname -> do
Ptr CChar
jSrcpadname' <- Text -> IO (Ptr CChar)
textToCString Text
jSrcpadname
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jSrcpadname'
Ptr Element
dest' <- b -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dest
Ptr CChar
maybeDestpadname <- case Maybe Text
destpadname of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jDestpadname -> do
Ptr CChar
jDestpadname' <- Text -> IO (Ptr CChar)
textToCString Text
jDestpadname
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jDestpadname'
CInt
result <- Ptr Element -> Ptr CChar -> Ptr Element -> Ptr CChar -> IO CInt
gst_element_link_pads Ptr Element
src' Ptr CChar
maybeSrcpadname Ptr Element
dest' Ptr CChar
maybeDestpadname
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
src
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dest
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeSrcpadname
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeDestpadname
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementLinkPadsMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> Maybe (T.Text) -> m Bool), MonadIO m, IsElement a, IsElement b) => O.OverloadedMethod ElementLinkPadsMethodInfo a signature where
overloadedMethod = elementLinkPads
instance O.OverloadedMethodInfo ElementLinkPadsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementLinkPads",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementLinkPads"
})
#endif
foreign import ccall "gst_element_link_pads_filtered" gst_element_link_pads_filtered ::
Ptr Element ->
CString ->
Ptr Element ->
CString ->
Ptr Gst.Caps.Caps ->
IO CInt
elementLinkPadsFiltered ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a
-> Maybe (T.Text)
-> b
-> Maybe (T.Text)
-> Maybe (Gst.Caps.Caps)
-> m Bool
elementLinkPadsFiltered :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a -> Maybe Text -> b -> Maybe Text -> Maybe Caps -> m Bool
elementLinkPadsFiltered a
src Maybe Text
srcpadname b
dest Maybe Text
destpadname Maybe Caps
filter = 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 Element
src' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
src
Ptr CChar
maybeSrcpadname <- case Maybe Text
srcpadname of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jSrcpadname -> do
Ptr CChar
jSrcpadname' <- Text -> IO (Ptr CChar)
textToCString Text
jSrcpadname
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jSrcpadname'
Ptr Element
dest' <- b -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dest
Ptr CChar
maybeDestpadname <- case Maybe Text
destpadname of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jDestpadname -> do
Ptr CChar
jDestpadname' <- Text -> IO (Ptr CChar)
textToCString Text
jDestpadname
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jDestpadname'
Ptr Caps
maybeFilter <- case Maybe Caps
filter of
Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just Caps
jFilter -> do
Ptr Caps
jFilter' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jFilter
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jFilter'
CInt
result <- Ptr Element
-> Ptr CChar -> Ptr Element -> Ptr CChar -> Ptr Caps -> IO CInt
gst_element_link_pads_filtered Ptr Element
src' Ptr CChar
maybeSrcpadname Ptr Element
dest' Ptr CChar
maybeDestpadname Ptr Caps
maybeFilter
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
src
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dest
Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
filter Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeSrcpadname
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeDestpadname
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementLinkPadsFilteredMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> Maybe (T.Text) -> Maybe (Gst.Caps.Caps) -> m Bool), MonadIO m, IsElement a, IsElement b) => O.OverloadedMethod ElementLinkPadsFilteredMethodInfo a signature where
overloadedMethod = elementLinkPadsFiltered
instance O.OverloadedMethodInfo ElementLinkPadsFilteredMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementLinkPadsFiltered",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementLinkPadsFiltered"
})
#endif
foreign import ccall "gst_element_link_pads_full" gst_element_link_pads_full ::
Ptr Element ->
CString ->
Ptr Element ->
CString ->
CUInt ->
IO CInt
elementLinkPadsFull ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a
-> Maybe (T.Text)
-> b
-> Maybe (T.Text)
-> [Gst.Flags.PadLinkCheck]
-> m Bool
elementLinkPadsFull :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a -> Maybe Text -> b -> Maybe Text -> [PadLinkCheck] -> m Bool
elementLinkPadsFull a
src Maybe Text
srcpadname b
dest Maybe Text
destpadname [PadLinkCheck]
flags = 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 Element
src' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
src
Ptr CChar
maybeSrcpadname <- case Maybe Text
srcpadname of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jSrcpadname -> do
Ptr CChar
jSrcpadname' <- Text -> IO (Ptr CChar)
textToCString Text
jSrcpadname
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jSrcpadname'
Ptr Element
dest' <- b -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dest
Ptr CChar
maybeDestpadname <- case Maybe Text
destpadname of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jDestpadname -> do
Ptr CChar
jDestpadname' <- Text -> IO (Ptr CChar)
textToCString Text
jDestpadname
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jDestpadname'
let flags' :: CUInt
flags' = [PadLinkCheck] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [PadLinkCheck]
flags
CInt
result <- Ptr Element
-> Ptr CChar -> Ptr Element -> Ptr CChar -> CUInt -> IO CInt
gst_element_link_pads_full Ptr Element
src' Ptr CChar
maybeSrcpadname Ptr Element
dest' Ptr CChar
maybeDestpadname CUInt
flags'
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
src
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dest
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeSrcpadname
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeDestpadname
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementLinkPadsFullMethodInfo
instance (signature ~ (Maybe (T.Text) -> b -> Maybe (T.Text) -> [Gst.Flags.PadLinkCheck] -> m Bool), MonadIO m, IsElement a, IsElement b) => O.OverloadedMethod ElementLinkPadsFullMethodInfo a signature where
overloadedMethod = elementLinkPadsFull
instance O.OverloadedMethodInfo ElementLinkPadsFullMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementLinkPadsFull",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementLinkPadsFull"
})
#endif
foreign import ccall "gst_element_lost_state" gst_element_lost_state ::
Ptr Element ->
IO ()
elementLostState ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m ()
elementLostState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m ()
elementLostState a
element = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Element -> IO ()
gst_element_lost_state Ptr Element
element'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementLostStateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementLostStateMethodInfo a signature where
overloadedMethod = elementLostState
instance O.OverloadedMethodInfo ElementLostStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementLostState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementLostState"
})
#endif
foreign import ccall "gst_element_message_full" gst_element_message_full ::
Ptr Element ->
CUInt ->
Word32 ->
Int32 ->
CString ->
CString ->
CString ->
CString ->
Int32 ->
IO ()
elementMessageFull ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> [Gst.Flags.MessageType]
-> Word32
-> Int32
-> Maybe (T.Text)
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> Int32
-> m ()
elementMessageFull :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a
-> [MessageType]
-> Word32
-> Int32
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Int32
-> m ()
elementMessageFull a
element [MessageType]
type_ Word32
domain Int32
code Maybe Text
text Maybe Text
debug Text
file Text
function Int32
line = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let type_' :: CUInt
type_' = [MessageType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [MessageType]
type_
Ptr CChar
maybeText <- case Maybe Text
text of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jText -> do
Ptr CChar
jText' <- Text -> IO (Ptr CChar)
textToCString Text
jText
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jText'
Ptr CChar
maybeDebug <- case Maybe Text
debug of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jDebug -> do
Ptr CChar
jDebug' <- Text -> IO (Ptr CChar)
textToCString Text
jDebug
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jDebug'
Ptr CChar
file' <- Text -> IO (Ptr CChar)
textToCString Text
file
Ptr CChar
function' <- Text -> IO (Ptr CChar)
textToCString Text
function
Ptr Element
-> CUInt
-> Word32
-> Int32
-> Ptr CChar
-> Ptr CChar
-> Ptr CChar
-> Ptr CChar
-> Int32
-> IO ()
gst_element_message_full Ptr Element
element' CUInt
type_' Word32
domain Int32
code Ptr CChar
maybeText Ptr CChar
maybeDebug Ptr CChar
file' Ptr CChar
function' Int32
line
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
file'
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
function'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementMessageFullMethodInfo
instance (signature ~ ([Gst.Flags.MessageType] -> Word32 -> Int32 -> Maybe (T.Text) -> Maybe (T.Text) -> T.Text -> T.Text -> Int32 -> m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementMessageFullMethodInfo a signature where
overloadedMethod = elementMessageFull
instance O.OverloadedMethodInfo ElementMessageFullMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementMessageFull",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementMessageFull"
})
#endif
foreign import ccall "gst_element_message_full_with_details" gst_element_message_full_with_details ::
Ptr Element ->
CUInt ->
Word32 ->
Int32 ->
CString ->
CString ->
CString ->
CString ->
Int32 ->
Ptr Gst.Structure.Structure ->
IO ()
elementMessageFullWithDetails ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> [Gst.Flags.MessageType]
-> Word32
-> Int32
-> Maybe (T.Text)
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> Int32
-> Gst.Structure.Structure
-> m ()
elementMessageFullWithDetails :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a
-> [MessageType]
-> Word32
-> Int32
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Int32
-> Structure
-> m ()
elementMessageFullWithDetails a
element [MessageType]
type_ Word32
domain Int32
code Maybe Text
text Maybe Text
debug Text
file Text
function Int32
line Structure
structure = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let type_' :: CUInt
type_' = [MessageType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [MessageType]
type_
Ptr CChar
maybeText <- case Maybe Text
text of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jText -> do
Ptr CChar
jText' <- Text -> IO (Ptr CChar)
textToCString Text
jText
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jText'
Ptr CChar
maybeDebug <- case Maybe Text
debug of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jDebug -> do
Ptr CChar
jDebug' <- Text -> IO (Ptr CChar)
textToCString Text
jDebug
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jDebug'
Ptr CChar
file' <- Text -> IO (Ptr CChar)
textToCString Text
file
Ptr CChar
function' <- Text -> IO (Ptr CChar)
textToCString Text
function
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Structure
structure
Ptr Element
-> CUInt
-> Word32
-> Int32
-> Ptr CChar
-> Ptr CChar
-> Ptr CChar
-> Ptr CChar
-> Int32
-> Ptr Structure
-> IO ()
gst_element_message_full_with_details Ptr Element
element' CUInt
type_' Word32
domain Int32
code Ptr CChar
maybeText Ptr CChar
maybeDebug Ptr CChar
file' Ptr CChar
function' Int32
line Ptr Structure
structure'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
file'
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
function'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementMessageFullWithDetailsMethodInfo
instance (signature ~ ([Gst.Flags.MessageType] -> Word32 -> Int32 -> Maybe (T.Text) -> Maybe (T.Text) -> T.Text -> T.Text -> Int32 -> Gst.Structure.Structure -> m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementMessageFullWithDetailsMethodInfo a signature where
overloadedMethod = elementMessageFullWithDetails
instance O.OverloadedMethodInfo ElementMessageFullWithDetailsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementMessageFullWithDetails",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementMessageFullWithDetails"
})
#endif
foreign import ccall "gst_element_no_more_pads" gst_element_no_more_pads ::
Ptr Element ->
IO ()
elementNoMorePads ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m ()
elementNoMorePads :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m ()
elementNoMorePads a
element = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Element -> IO ()
gst_element_no_more_pads Ptr Element
element'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementNoMorePadsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementNoMorePadsMethodInfo a signature where
overloadedMethod = elementNoMorePads
instance O.OverloadedMethodInfo ElementNoMorePadsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementNoMorePads",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementNoMorePads"
})
#endif
foreign import ccall "gst_element_post_message" gst_element_post_message ::
Ptr Element ->
Ptr Gst.Message.Message ->
IO CInt
elementPostMessage ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Message.Message
-> m Bool
elementPostMessage :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Message -> m Bool
elementPostMessage a
element Message
message = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Message
message' <- Message -> IO (Ptr Message)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Message
message
CInt
result <- Ptr Element -> Ptr Message -> IO CInt
gst_element_post_message Ptr Element
element' Ptr Message
message'
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
element
Message -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Message
message
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementPostMessageMethodInfo
instance (signature ~ (Gst.Message.Message -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementPostMessageMethodInfo a signature where
overloadedMethod = elementPostMessage
instance O.OverloadedMethodInfo ElementPostMessageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementPostMessage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementPostMessage"
})
#endif
foreign import ccall "gst_element_provide_clock" gst_element_provide_clock ::
Ptr Element ->
IO (Ptr Gst.Clock.Clock)
elementProvideClock ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m (Maybe Gst.Clock.Clock)
elementProvideClock :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m (Maybe Clock)
elementProvideClock a
element = IO (Maybe Clock) -> m (Maybe Clock)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Clock) -> m (Maybe Clock))
-> IO (Maybe Clock) -> m (Maybe Clock)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Clock
result <- Ptr Element -> IO (Ptr Clock)
gst_element_provide_clock Ptr Element
element'
Maybe Clock
maybeResult <- Ptr Clock -> (Ptr Clock -> IO Clock) -> IO (Maybe Clock)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Clock
result ((Ptr Clock -> IO Clock) -> IO (Maybe Clock))
-> (Ptr Clock -> IO Clock) -> IO (Maybe Clock)
forall a b. (a -> b) -> a -> b
$ \Ptr Clock
result' -> do
Clock
result'' <- ((ManagedPtr Clock -> Clock) -> Ptr Clock -> IO Clock
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Clock -> Clock
Gst.Clock.Clock) Ptr Clock
result'
Clock -> IO Clock
forall (m :: * -> *) a. Monad m => a -> m a
return Clock
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Maybe Clock -> IO (Maybe Clock)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Clock
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementProvideClockMethodInfo
instance (signature ~ (m (Maybe Gst.Clock.Clock)), MonadIO m, IsElement a) => O.OverloadedMethod ElementProvideClockMethodInfo a signature where
overloadedMethod = elementProvideClock
instance O.OverloadedMethodInfo ElementProvideClockMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementProvideClock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementProvideClock"
})
#endif
foreign import ccall "gst_element_query" gst_element_query ::
Ptr Element ->
Ptr Gst.Query.Query ->
IO CInt
elementQuery ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Query.Query
-> m Bool
elementQuery :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Query -> m Bool
elementQuery a
element Query
query = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
CInt
result <- Ptr Element -> Ptr Query -> IO CInt
gst_element_query Ptr Element
element' Ptr Query
query'
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
element
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 ElementQueryMethodInfo
instance (signature ~ (Gst.Query.Query -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementQueryMethodInfo a signature where
overloadedMethod = elementQuery
instance O.OverloadedMethodInfo ElementQueryMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementQuery",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementQuery"
})
#endif
foreign import ccall "gst_element_query_convert" gst_element_query_convert ::
Ptr Element ->
CUInt ->
Int64 ->
CUInt ->
Ptr Int64 ->
IO CInt
elementQueryConvert ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Enums.Format
-> Int64
-> Gst.Enums.Format
-> m ((Bool, Int64))
elementQueryConvert :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Format -> Int64 -> Format -> m (Bool, Int64)
elementQueryConvert a
element Format
srcFormat Int64
srcVal Format
destFormat = IO (Bool, Int64) -> m (Bool, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int64) -> m (Bool, Int64))
-> IO (Bool, Int64) -> m (Bool, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let srcFormat' :: CUInt
srcFormat' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Format -> Int) -> Format -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Format -> Int
forall a. Enum a => a -> Int
fromEnum) Format
srcFormat
let destFormat' :: CUInt
destFormat' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Format -> Int) -> Format -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Format -> Int
forall a. Enum a => a -> Int
fromEnum) Format
destFormat
Ptr Int64
destVal <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
CInt
result <- Ptr Element -> CUInt -> Int64 -> CUInt -> Ptr Int64 -> IO CInt
gst_element_query_convert Ptr Element
element' CUInt
srcFormat' Int64
srcVal CUInt
destFormat' Ptr Int64
destVal
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int64
destVal' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
destVal
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
destVal
(Bool, Int64) -> IO (Bool, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int64
destVal')
#if defined(ENABLE_OVERLOADING)
data ElementQueryConvertMethodInfo
instance (signature ~ (Gst.Enums.Format -> Int64 -> Gst.Enums.Format -> m ((Bool, Int64))), MonadIO m, IsElement a) => O.OverloadedMethod ElementQueryConvertMethodInfo a signature where
overloadedMethod = elementQueryConvert
instance O.OverloadedMethodInfo ElementQueryConvertMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementQueryConvert",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementQueryConvert"
})
#endif
foreign import ccall "gst_element_query_duration" gst_element_query_duration ::
Ptr Element ->
CUInt ->
Ptr Int64 ->
IO CInt
elementQueryDuration ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Enums.Format
-> m ((Bool, Int64))
elementQueryDuration :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Format -> m (Bool, Int64)
elementQueryDuration a
element Format
format = IO (Bool, Int64) -> m (Bool, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int64) -> m (Bool, Int64))
-> IO (Bool, Int64) -> m (Bool, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Format -> Int) -> Format -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Format -> Int
forall a. Enum a => a -> Int
fromEnum) Format
format
Ptr Int64
duration <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
CInt
result <- Ptr Element -> CUInt -> Ptr Int64 -> IO CInt
gst_element_query_duration Ptr Element
element' CUInt
format' Ptr Int64
duration
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int64
duration' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
duration
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
duration
(Bool, Int64) -> IO (Bool, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int64
duration')
#if defined(ENABLE_OVERLOADING)
data ElementQueryDurationMethodInfo
instance (signature ~ (Gst.Enums.Format -> m ((Bool, Int64))), MonadIO m, IsElement a) => O.OverloadedMethod ElementQueryDurationMethodInfo a signature where
overloadedMethod = elementQueryDuration
instance O.OverloadedMethodInfo ElementQueryDurationMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementQueryDuration",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementQueryDuration"
})
#endif
foreign import ccall "gst_element_query_position" gst_element_query_position ::
Ptr Element ->
CUInt ->
Ptr Int64 ->
IO CInt
elementQueryPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Enums.Format
-> m ((Bool, Int64))
elementQueryPosition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Format -> m (Bool, Int64)
elementQueryPosition a
element Format
format = IO (Bool, Int64) -> m (Bool, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int64) -> m (Bool, Int64))
-> IO (Bool, Int64) -> m (Bool, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Format -> Int) -> Format -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Format -> Int
forall a. Enum a => a -> Int
fromEnum) Format
format
Ptr Int64
cur <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
CInt
result <- Ptr Element -> CUInt -> Ptr Int64 -> IO CInt
gst_element_query_position Ptr Element
element' CUInt
format' Ptr Int64
cur
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int64
cur' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
cur
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
cur
(Bool, Int64) -> IO (Bool, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int64
cur')
#if defined(ENABLE_OVERLOADING)
data ElementQueryPositionMethodInfo
instance (signature ~ (Gst.Enums.Format -> m ((Bool, Int64))), MonadIO m, IsElement a) => O.OverloadedMethod ElementQueryPositionMethodInfo a signature where
overloadedMethod = elementQueryPosition
instance O.OverloadedMethodInfo ElementQueryPositionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementQueryPosition",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementQueryPosition"
})
#endif
foreign import ccall "gst_element_release_request_pad" gst_element_release_request_pad ::
Ptr Element ->
Ptr Gst.Pad.Pad ->
IO ()
elementReleaseRequestPad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, Gst.Pad.IsPad b) =>
a
-> b
-> m ()
elementReleaseRequestPad :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsPad b) =>
a -> b -> m ()
elementReleaseRequestPad a
element b
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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Pad
pad' <- b -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
pad
Ptr Element -> Ptr Pad -> IO ()
gst_element_release_request_pad Ptr Element
element' Ptr Pad
pad'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
pad
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementReleaseRequestPadMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsElement a, Gst.Pad.IsPad b) => O.OverloadedMethod ElementReleaseRequestPadMethodInfo a signature where
overloadedMethod = elementReleaseRequestPad
instance O.OverloadedMethodInfo ElementReleaseRequestPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementReleaseRequestPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementReleaseRequestPad"
})
#endif
foreign import ccall "gst_element_remove_pad" gst_element_remove_pad ::
Ptr Element ->
Ptr Gst.Pad.Pad ->
IO CInt
elementRemovePad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, Gst.Pad.IsPad b) =>
a
-> b
-> m Bool
elementRemovePad :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsPad b) =>
a -> b -> m Bool
elementRemovePad a
element 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Pad
pad' <- b -> IO (Ptr Pad)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
pad
CInt
result <- Ptr Element -> Ptr Pad -> IO CInt
gst_element_remove_pad Ptr Element
element' 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
element
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 ElementRemovePadMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsElement a, Gst.Pad.IsPad b) => O.OverloadedMethod ElementRemovePadMethodInfo a signature where
overloadedMethod = elementRemovePad
instance O.OverloadedMethodInfo ElementRemovePadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementRemovePad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementRemovePad"
})
#endif
foreign import ccall "gst_element_remove_property_notify_watch" gst_element_remove_property_notify_watch ::
Ptr Element ->
CULong ->
IO ()
elementRemovePropertyNotifyWatch ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> CULong
-> m ()
elementRemovePropertyNotifyWatch :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> SignalHandlerId -> m ()
elementRemovePropertyNotifyWatch a
element SignalHandlerId
watchId = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Element -> SignalHandlerId -> IO ()
gst_element_remove_property_notify_watch Ptr Element
element' SignalHandlerId
watchId
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementRemovePropertyNotifyWatchMethodInfo
instance (signature ~ (CULong -> m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementRemovePropertyNotifyWatchMethodInfo a signature where
overloadedMethod = elementRemovePropertyNotifyWatch
instance O.OverloadedMethodInfo ElementRemovePropertyNotifyWatchMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementRemovePropertyNotifyWatch",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementRemovePropertyNotifyWatch"
})
#endif
foreign import ccall "gst_element_request_pad" gst_element_request_pad ::
Ptr Element ->
Ptr Gst.PadTemplate.PadTemplate ->
CString ->
Ptr Gst.Caps.Caps ->
IO (Ptr Gst.Pad.Pad)
elementRequestPad ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, Gst.PadTemplate.IsPadTemplate b) =>
a
-> b
-> Maybe (T.Text)
-> Maybe (Gst.Caps.Caps)
-> m (Maybe Gst.Pad.Pad)
elementRequestPad :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsPadTemplate b) =>
a -> b -> Maybe Text -> Maybe Caps -> m (Maybe Pad)
elementRequestPad a
element b
templ Maybe Text
name Maybe Caps
caps = IO (Maybe Pad) -> m (Maybe Pad)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pad) -> m (Maybe Pad))
-> IO (Maybe Pad) -> m (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr PadTemplate
templ' <- b -> IO (Ptr PadTemplate)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
templ
Ptr CChar
maybeName <- case Maybe Text
name of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jName -> do
Ptr CChar
jName' <- Text -> IO (Ptr CChar)
textToCString Text
jName
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jName'
Ptr Caps
maybeCaps <- case Maybe Caps
caps of
Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just Caps
jCaps -> do
Ptr Caps
jCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jCaps
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jCaps'
Ptr Pad
result <- Ptr Element
-> Ptr PadTemplate -> Ptr CChar -> Ptr Caps -> IO (Ptr Pad)
gst_element_request_pad Ptr Element
element' Ptr PadTemplate
templ' Ptr CChar
maybeName Ptr Caps
maybeCaps
Maybe Pad
maybeResult <- Ptr Pad -> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pad
result ((Ptr Pad -> IO Pad) -> IO (Maybe Pad))
-> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ \Ptr Pad
result' -> do
Pad
result'' <- ((ManagedPtr Pad -> Pad) -> Ptr Pad -> IO Pad
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pad -> Pad
Gst.Pad.Pad) Ptr Pad
result'
Pad -> IO Pad
forall (m :: * -> *) a. Monad m => a -> m a
return Pad
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
templ
Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
caps Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeName
Maybe Pad -> IO (Maybe Pad)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pad
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementRequestPadMethodInfo
instance (signature ~ (b -> Maybe (T.Text) -> Maybe (Gst.Caps.Caps) -> m (Maybe Gst.Pad.Pad)), MonadIO m, IsElement a, Gst.PadTemplate.IsPadTemplate b) => O.OverloadedMethod ElementRequestPadMethodInfo a signature where
overloadedMethod = elementRequestPad
instance O.OverloadedMethodInfo ElementRequestPadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementRequestPad",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementRequestPad"
})
#endif
foreign import ccall "gst_element_request_pad_simple" gst_element_request_pad_simple ::
Ptr Element ->
CString ->
IO (Ptr Gst.Pad.Pad)
elementRequestPadSimple ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> T.Text
-> m (Maybe Gst.Pad.Pad)
elementRequestPadSimple :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Text -> m (Maybe Pad)
elementRequestPadSimple a
element Text
name = IO (Maybe Pad) -> m (Maybe Pad)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pad) -> m (Maybe Pad))
-> IO (Maybe Pad) -> m (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr CChar
name' <- Text -> IO (Ptr CChar)
textToCString Text
name
Ptr Pad
result <- Ptr Element -> Ptr CChar -> IO (Ptr Pad)
gst_element_request_pad_simple Ptr Element
element' Ptr CChar
name'
Maybe Pad
maybeResult <- Ptr Pad -> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pad
result ((Ptr Pad -> IO Pad) -> IO (Maybe Pad))
-> (Ptr Pad -> IO Pad) -> IO (Maybe Pad)
forall a b. (a -> b) -> a -> b
$ \Ptr Pad
result' -> do
Pad
result'' <- ((ManagedPtr Pad -> Pad) -> Ptr Pad -> IO Pad
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pad -> Pad
Gst.Pad.Pad) Ptr Pad
result'
Pad -> IO Pad
forall (m :: * -> *) a. Monad m => a -> m a
return Pad
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
name'
Maybe Pad -> IO (Maybe Pad)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pad
maybeResult
#if defined(ENABLE_OVERLOADING)
data ElementRequestPadSimpleMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gst.Pad.Pad)), MonadIO m, IsElement a) => O.OverloadedMethod ElementRequestPadSimpleMethodInfo a signature where
overloadedMethod = elementRequestPadSimple
instance O.OverloadedMethodInfo ElementRequestPadSimpleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementRequestPadSimple",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementRequestPadSimple"
})
#endif
foreign import ccall "gst_element_seek" gst_element_seek ::
Ptr Element ->
CDouble ->
CUInt ->
CUInt ->
CUInt ->
Int64 ->
CUInt ->
Int64 ->
IO CInt
elementSeek ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Double
-> Gst.Enums.Format
-> [Gst.Flags.SeekFlags]
-> Gst.Enums.SeekType
-> Int64
-> Gst.Enums.SeekType
-> Int64
-> m Bool
elementSeek :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a
-> Double
-> Format
-> [SeekFlags]
-> SeekType
-> Int64
-> SeekType
-> Int64
-> m Bool
elementSeek a
element Double
rate Format
format [SeekFlags]
flags SeekType
startType Int64
start SeekType
stopType Int64
stop = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let rate' :: CDouble
rate' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
rate
let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Format -> Int) -> Format -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Format -> Int
forall a. Enum a => a -> Int
fromEnum) Format
format
let flags' :: CUInt
flags' = [SeekFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SeekFlags]
flags
let startType' :: CUInt
startType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SeekType -> Int) -> SeekType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SeekType -> Int
forall a. Enum a => a -> Int
fromEnum) SeekType
startType
let stopType' :: CUInt
stopType' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SeekType -> Int) -> SeekType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SeekType -> Int
forall a. Enum a => a -> Int
fromEnum) SeekType
stopType
CInt
result <- Ptr Element
-> CDouble
-> CUInt
-> CUInt
-> CUInt
-> Int64
-> CUInt
-> Int64
-> IO CInt
gst_element_seek Ptr Element
element' CDouble
rate' CUInt
format' CUInt
flags' CUInt
startType' Int64
start CUInt
stopType' Int64
stop
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
element
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementSeekMethodInfo
instance (signature ~ (Double -> Gst.Enums.Format -> [Gst.Flags.SeekFlags] -> Gst.Enums.SeekType -> Int64 -> Gst.Enums.SeekType -> Int64 -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementSeekMethodInfo a signature where
overloadedMethod = elementSeek
instance O.OverloadedMethodInfo ElementSeekMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSeek",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSeek"
})
#endif
foreign import ccall "gst_element_seek_simple" gst_element_seek_simple ::
Ptr Element ->
CUInt ->
CUInt ->
Int64 ->
IO CInt
elementSeekSimple ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Enums.Format
-> [Gst.Flags.SeekFlags]
-> Int64
-> m Bool
elementSeekSimple :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Format -> [SeekFlags] -> Int64 -> m Bool
elementSeekSimple a
element Format
format [SeekFlags]
seekFlags Int64
seekPos = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Format -> Int) -> Format -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Format -> Int
forall a. Enum a => a -> Int
fromEnum) Format
format
let seekFlags' :: CUInt
seekFlags' = [SeekFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SeekFlags]
seekFlags
CInt
result <- Ptr Element -> CUInt -> CUInt -> Int64 -> IO CInt
gst_element_seek_simple Ptr Element
element' CUInt
format' CUInt
seekFlags' Int64
seekPos
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
element
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementSeekSimpleMethodInfo
instance (signature ~ (Gst.Enums.Format -> [Gst.Flags.SeekFlags] -> Int64 -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementSeekSimpleMethodInfo a signature where
overloadedMethod = elementSeekSimple
instance O.OverloadedMethodInfo ElementSeekSimpleMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSeekSimple",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSeekSimple"
})
#endif
foreign import ccall "gst_element_send_event" gst_element_send_event ::
Ptr Element ->
Ptr Gst.Event.Event ->
IO CInt
elementSendEvent ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Event.Event
-> m Bool
elementSendEvent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Event -> m Bool
elementSendEvent a
element 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Event
event
CInt
result <- Ptr Element -> Ptr Event -> IO CInt
gst_element_send_event Ptr Element
element' 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
element
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 ElementSendEventMethodInfo
instance (signature ~ (Gst.Event.Event -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementSendEventMethodInfo a signature where
overloadedMethod = elementSendEvent
instance O.OverloadedMethodInfo ElementSendEventMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSendEvent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSendEvent"
})
#endif
foreign import ccall "gst_element_set_base_time" gst_element_set_base_time ::
Ptr Element ->
Word64 ->
IO ()
elementSetBaseTime ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Word64
-> m ()
elementSetBaseTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Word64 -> m ()
elementSetBaseTime a
element Word64
time = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Element -> Word64 -> IO ()
gst_element_set_base_time Ptr Element
element' Word64
time
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementSetBaseTimeMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementSetBaseTimeMethodInfo a signature where
overloadedMethod = elementSetBaseTime
instance O.OverloadedMethodInfo ElementSetBaseTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSetBaseTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSetBaseTime"
})
#endif
foreign import ccall "gst_element_set_bus" gst_element_set_bus ::
Ptr Element ->
Ptr Gst.Bus.Bus ->
IO ()
elementSetBus ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, Gst.Bus.IsBus b) =>
a
-> Maybe (b)
-> m ()
elementSetBus :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsBus b) =>
a -> Maybe b -> m ()
elementSetBus a
element Maybe b
bus = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Bus
maybeBus <- case Maybe b
bus of
Maybe b
Nothing -> Ptr Bus -> IO (Ptr Bus)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Bus
forall a. Ptr a
nullPtr
Just b
jBus -> do
Ptr Bus
jBus' <- b -> IO (Ptr Bus)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jBus
Ptr Bus -> IO (Ptr Bus)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Bus
jBus'
Ptr Element -> Ptr Bus -> IO ()
gst_element_set_bus Ptr Element
element' Ptr Bus
maybeBus
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
bus b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementSetBusMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsElement a, Gst.Bus.IsBus b) => O.OverloadedMethod ElementSetBusMethodInfo a signature where
overloadedMethod = elementSetBus
instance O.OverloadedMethodInfo ElementSetBusMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSetBus",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSetBus"
})
#endif
foreign import ccall "gst_element_set_clock" gst_element_set_clock ::
Ptr Element ->
Ptr Gst.Clock.Clock ->
IO CInt
elementSetClock ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, Gst.Clock.IsClock b) =>
a
-> Maybe (b)
-> m Bool
elementSetClock :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsClock b) =>
a -> Maybe b -> m Bool
elementSetClock a
element Maybe b
clock = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Clock
maybeClock <- case Maybe b
clock of
Maybe b
Nothing -> Ptr Clock -> IO (Ptr Clock)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Clock
forall a. Ptr a
nullPtr
Just b
jClock -> do
Ptr Clock
jClock' <- b -> IO (Ptr Clock)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jClock
Ptr Clock -> IO (Ptr Clock)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Clock
jClock'
CInt
result <- Ptr Element -> Ptr Clock -> IO CInt
gst_element_set_clock Ptr Element
element' Ptr Clock
maybeClock
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
element
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
clock b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementSetClockMethodInfo
instance (signature ~ (Maybe (b) -> m Bool), MonadIO m, IsElement a, Gst.Clock.IsClock b) => O.OverloadedMethod ElementSetClockMethodInfo a signature where
overloadedMethod = elementSetClock
instance O.OverloadedMethodInfo ElementSetClockMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSetClock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSetClock"
})
#endif
foreign import ccall "gst_element_set_context" gst_element_set_context ::
Ptr Element ->
Ptr Gst.Context.Context ->
IO ()
elementSetContext ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Context.Context
-> m ()
elementSetContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Context -> m ()
elementSetContext a
element Context
context = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Context
context' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
context
Ptr Element -> Ptr Context -> IO ()
gst_element_set_context Ptr Element
element' Ptr Context
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementSetContextMethodInfo
instance (signature ~ (Gst.Context.Context -> m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementSetContextMethodInfo a signature where
overloadedMethod = elementSetContext
instance O.OverloadedMethodInfo ElementSetContextMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSetContext",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSetContext"
})
#endif
foreign import ccall "gst_element_set_locked_state" gst_element_set_locked_state ::
Ptr Element ->
CInt ->
IO CInt
elementSetLockedState ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Bool
-> m Bool
elementSetLockedState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Bool -> m Bool
elementSetLockedState a
element Bool
lockedState = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let lockedState' :: CInt
lockedState' = (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
lockedState
CInt
result <- Ptr Element -> CInt -> IO CInt
gst_element_set_locked_state Ptr Element
element' CInt
lockedState'
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
element
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementSetLockedStateMethodInfo
instance (signature ~ (Bool -> m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementSetLockedStateMethodInfo a signature where
overloadedMethod = elementSetLockedState
instance O.OverloadedMethodInfo ElementSetLockedStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSetLockedState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSetLockedState"
})
#endif
foreign import ccall "gst_element_set_start_time" gst_element_set_start_time ::
Ptr Element ->
Word64 ->
IO ()
elementSetStartTime ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Word64
-> m ()
elementSetStartTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> Word64 -> m ()
elementSetStartTime a
element Word64
time = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
Ptr Element -> Word64 -> IO ()
gst_element_set_start_time Ptr Element
element' Word64
time
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementSetStartTimeMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsElement a) => O.OverloadedMethod ElementSetStartTimeMethodInfo a signature where
overloadedMethod = elementSetStartTime
instance O.OverloadedMethodInfo ElementSetStartTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSetStartTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSetStartTime"
})
#endif
foreign import ccall "gst_element_set_state" gst_element_set_state ::
Ptr Element ->
CUInt ->
IO CUInt
elementSetState ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> Gst.Enums.State
-> m Gst.Enums.StateChangeReturn
elementSetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> State -> m StateChangeReturn
elementSetState a
element State
state = IO StateChangeReturn -> m StateChangeReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StateChangeReturn -> m StateChangeReturn)
-> IO StateChangeReturn -> m StateChangeReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (State -> Int) -> State -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. State -> Int
forall a. Enum a => a -> Int
fromEnum) State
state
CUInt
result <- Ptr Element -> CUInt -> IO CUInt
gst_element_set_state Ptr Element
element' CUInt
state'
let result' :: StateChangeReturn
result' = (Int -> StateChangeReturn
forall a. Enum a => Int -> a
toEnum (Int -> StateChangeReturn)
-> (CUInt -> Int) -> CUInt -> StateChangeReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
element
StateChangeReturn -> IO StateChangeReturn
forall (m :: * -> *) a. Monad m => a -> m a
return StateChangeReturn
result'
#if defined(ENABLE_OVERLOADING)
data ElementSetStateMethodInfo
instance (signature ~ (Gst.Enums.State -> m Gst.Enums.StateChangeReturn), MonadIO m, IsElement a) => O.OverloadedMethod ElementSetStateMethodInfo a signature where
overloadedMethod = elementSetState
instance O.OverloadedMethodInfo ElementSetStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSetState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSetState"
})
#endif
foreign import ccall "gst_element_sync_state_with_parent" gst_element_sync_state_with_parent ::
Ptr Element ->
IO CInt
elementSyncStateWithParent ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a) =>
a
-> m Bool
elementSyncStateWithParent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsElement a) =>
a -> m Bool
elementSyncStateWithParent a
element = 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 Element
element' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
element
CInt
result <- Ptr Element -> IO CInt
gst_element_sync_state_with_parent Ptr Element
element'
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
element
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ElementSyncStateWithParentMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsElement a) => O.OverloadedMethod ElementSyncStateWithParentMethodInfo a signature where
overloadedMethod = elementSyncStateWithParent
instance O.OverloadedMethodInfo ElementSyncStateWithParentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementSyncStateWithParent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementSyncStateWithParent"
})
#endif
foreign import ccall "gst_element_unlink" gst_element_unlink ::
Ptr Element ->
Ptr Element ->
IO ()
elementUnlink ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a
-> b
-> m ()
elementUnlink :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a -> b -> m ()
elementUnlink a
src b
dest = 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 Element
src' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
src
Ptr Element
dest' <- b -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dest
Ptr Element -> Ptr Element -> IO ()
gst_element_unlink Ptr Element
src' Ptr Element
dest'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
src
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dest
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementUnlinkMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsElement a, IsElement b) => O.OverloadedMethod ElementUnlinkMethodInfo a signature where
overloadedMethod = elementUnlink
instance O.OverloadedMethodInfo ElementUnlinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementUnlink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementUnlink"
})
#endif
foreign import ccall "gst_element_unlink_pads" gst_element_unlink_pads ::
Ptr Element ->
CString ->
Ptr Element ->
CString ->
IO ()
elementUnlinkPads ::
(B.CallStack.HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a
-> T.Text
-> b
-> T.Text
-> m ()
elementUnlinkPads :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsElement a, IsElement b) =>
a -> Text -> b -> Text -> m ()
elementUnlinkPads a
src Text
srcpadname b
dest Text
destpadname = 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 Element
src' <- a -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
src
Ptr CChar
srcpadname' <- Text -> IO (Ptr CChar)
textToCString Text
srcpadname
Ptr Element
dest' <- b -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
dest
Ptr CChar
destpadname' <- Text -> IO (Ptr CChar)
textToCString Text
destpadname
Ptr Element -> Ptr CChar -> Ptr Element -> Ptr CChar -> IO ()
gst_element_unlink_pads Ptr Element
src' Ptr CChar
srcpadname' Ptr Element
dest' Ptr CChar
destpadname'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
src
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
dest
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
srcpadname'
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
destpadname'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ElementUnlinkPadsMethodInfo
instance (signature ~ (T.Text -> b -> T.Text -> m ()), MonadIO m, IsElement a, IsElement b) => O.OverloadedMethod ElementUnlinkPadsMethodInfo a signature where
overloadedMethod = elementUnlinkPads
instance O.OverloadedMethodInfo ElementUnlinkPadsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Objects.Element.elementUnlinkPads",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Objects-Element.html#v:elementUnlinkPads"
})
#endif
foreign import ccall "gst_element_make_from_uri" gst_element_make_from_uri ::
CUInt ->
CString ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr Element)
elementMakeFromUri ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.URIType
-> T.Text
-> Maybe (T.Text)
-> m Element
elementMakeFromUri :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
URIType -> Text -> Maybe Text -> m Element
elementMakeFromUri URIType
type_ Text
uri Maybe Text
elementname = IO Element -> m Element
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Element -> m Element) -> IO Element -> m Element
forall a b. (a -> b) -> a -> b
$ do
let type_' :: CUInt
type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (URIType -> Int) -> URIType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. URIType -> Int
forall a. Enum a => a -> Int
fromEnum) URIType
type_
Ptr CChar
uri' <- Text -> IO (Ptr CChar)
textToCString Text
uri
Ptr CChar
maybeElementname <- case Maybe Text
elementname of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jElementname -> do
Ptr CChar
jElementname' <- Text -> IO (Ptr CChar)
textToCString Text
jElementname
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jElementname'
IO Element -> IO () -> IO Element
forall a b. IO a -> IO b -> IO a
onException (do
Ptr Element
result <- (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element))
-> (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element)
forall a b. (a -> b) -> a -> b
$ CUInt
-> Ptr CChar -> Ptr CChar -> Ptr (Ptr GError) -> IO (Ptr Element)
gst_element_make_from_uri CUInt
type_' Ptr CChar
uri' Ptr CChar
maybeElementname
Text -> Ptr Element -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"elementMakeFromUri" Ptr Element
result
Element
result' <- ((ManagedPtr Element -> Element) -> Ptr Element -> IO Element
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Element -> Element
Element) Ptr Element
result
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
uri'
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeElementname
Element -> IO Element
forall (m :: * -> *) a. Monad m => a -> m a
return Element
result'
) (do
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
uri'
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeElementname
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_element_register" gst_element_register ::
Ptr Gst.Plugin.Plugin ->
CString ->
Word32 ->
CGType ->
IO CInt
elementRegister ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Plugin.IsPlugin a) =>
Maybe (a)
-> T.Text
-> Word32
-> GType
-> m Bool
elementRegister :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPlugin a) =>
Maybe a -> Text -> Word32 -> GType -> m Bool
elementRegister Maybe a
plugin Text
name Word32
rank GType
type_ = 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 Plugin
maybePlugin <- case Maybe a
plugin of
Maybe a
Nothing -> Ptr Plugin -> IO (Ptr Plugin)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Plugin
forall a. Ptr a
nullPtr
Just a
jPlugin -> do
Ptr Plugin
jPlugin' <- a -> IO (Ptr Plugin)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jPlugin
Ptr Plugin -> IO (Ptr Plugin)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Plugin
jPlugin'
Ptr CChar
name' <- Text -> IO (Ptr CChar)
textToCString Text
name
let type_' :: Word64
type_' = GType -> Word64
gtypeToCGType GType
type_
CInt
result <- Ptr Plugin -> Ptr CChar -> Word32 -> Word64 -> IO CInt
gst_element_register Ptr Plugin
maybePlugin Ptr CChar
name' Word32
rank Word64
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
plugin a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
name'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_element_state_change_return_get_name" gst_element_state_change_return_get_name ::
CUInt ->
IO CString
elementStateChangeReturnGetName ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.StateChangeReturn
-> m T.Text
elementStateChangeReturnGetName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
StateChangeReturn -> m Text
elementStateChangeReturnGetName StateChangeReturn
stateRet = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
let stateRet' :: CUInt
stateRet' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (StateChangeReturn -> Int) -> StateChangeReturn -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateChangeReturn -> Int
forall a. Enum a => a -> Int
fromEnum) StateChangeReturn
stateRet
Ptr CChar
result <- CUInt -> IO (Ptr CChar)
gst_element_state_change_return_get_name CUInt
stateRet'
Text -> Ptr CChar -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"elementStateChangeReturnGetName" Ptr CChar
result
Text
result' <- HasCallStack => Ptr CChar -> IO Text
Ptr CChar -> IO Text
cstringToText Ptr CChar
result
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_element_state_get_name" gst_element_state_get_name ::
CUInt ->
IO CString
elementStateGetName ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.State
-> m T.Text
elementStateGetName :: forall (m :: * -> *). (HasCallStack, MonadIO m) => State -> m Text
elementStateGetName State
state = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
let state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (State -> Int) -> State -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. State -> Int
forall a. Enum a => a -> Int
fromEnum) State
state
Ptr CChar
result <- CUInt -> IO (Ptr CChar)
gst_element_state_get_name CUInt
state'
Text -> Ptr CChar -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"elementStateGetName" Ptr CChar
result
Text
result' <- HasCallStack => Ptr CChar -> IO Text
Ptr CChar -> IO Text
cstringToText Ptr CChar
result
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
#endif