{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- This base class is for filter elements that process data. Elements
-- that are suitable for implementation using t'GI.GstBase.Objects.BaseTransform.BaseTransform' are ones
-- where the size and caps of the output is known entirely from the input
-- caps and buffer sizes. These include elements that directly transform
-- one buffer into another, modify the contents of a buffer in-place, as
-- well as elements that collate multiple input buffers into one output buffer,
-- or that expand one input buffer into multiple output buffers. See below
-- for more concrete use cases.
-- 
-- It provides for:
-- 
-- * one sinkpad and one srcpad
-- * Possible formats on sink and source pad implemented
--   with custom transform_caps function. By default uses
--   same format on sink and source.
-- 
-- * Handles state changes
-- * Does flushing
-- * Push mode
-- * Pull mode if the sub-class transform can operate on arbitrary data
-- 
-- = Use Cases
-- 
-- == Passthrough mode
-- 
--   * Element has no interest in modifying the buffer. It may want to inspect it,
--     in which case the element should have a transform_ip function. If there
--     is no transform_ip function in passthrough mode, the buffer is pushed
--     intact.
-- 
--   * The t'GI.GstBase.Structs.BaseTransformClass.BaseTransformClass'.@/passthrough_on_same_caps/@ variable
--     will automatically set\/unset passthrough based on whether the
--     element negotiates the same caps on both pads.
-- 
--   * t'GI.GstBase.Structs.BaseTransformClass.BaseTransformClass'.@/passthrough_on_same_caps/@ on an element that
--     doesn\'t implement a transform_caps function is useful for elements that
--     only inspect data (such as level)
-- 
--   * Example elements
-- 
--     * Level
--     * Videoscale, audioconvert, videoconvert, audioresample in certain modes.
-- 
-- == Modifications in-place - input buffer and output buffer are the same thing.
-- 
-- * The element must implement a transform_ip function.
-- * Output buffer size must \<= input buffer size
-- * If the always_in_place flag is set, non-writable buffers will be copied
--   and passed to the transform_ip function, otherwise a new buffer will be
--   created and the transform function called.
-- 
-- * Incoming writable buffers will be passed to the transform_ip function
--   immediately.
-- * only implementing transform_ip and not transform implies always_in_place = 'P.True'
-- 
--   * Example elements:
--     * Volume
--     * Audioconvert in certain modes (signed\/unsigned conversion)
--     * videoconvert in certain modes (endianness swapping)
-- 
-- == Modifications only to the caps\/metadata of a buffer
-- 
-- * The element does not require writable data, but non-writable buffers
--   should be subbuffered so that the meta-information can be replaced.
-- 
-- * Elements wishing to operate in this mode should replace the
--   prepare_output_buffer method to create subbuffers of the input buffer
--   and set always_in_place to 'P.True'
-- 
-- * Example elements
--   * Capsfilter when setting caps on outgoing buffers that have
--     none.
--   * identity when it is going to re-timestamp buffers by
--     datarate.
-- 
-- == Normal mode
--   * always_in_place flag is not set, or there is no transform_ip function
--   * Element will receive an input buffer and output buffer to operate on.
--   * Output buffer is allocated by calling the prepare_output_buffer function.
--   * Example elements:
--     * Videoscale, videoconvert, audioconvert when doing
--     scaling\/conversions
-- 
-- == Special output buffer allocations
--   * Elements which need to do special allocation of their output buffers
--     beyond allocating output buffers via the negotiated allocator or
--     buffer pool should implement the prepare_output_buffer method.
-- 
--   * Example elements:
--     * efence
-- 
-- = Sub-class settable flags on GstBaseTransform
-- 
-- * passthrough
-- 
--   * Implies that in the current configuration, the sub-class is not interested in modifying the buffers.
--   * Elements which are always in passthrough mode whenever the same caps has been negotiated on both pads can set the class variable passthrough_on_same_caps to have this behaviour automatically.
-- 
-- * always_in_place
--   * Determines whether a non-writable buffer will be copied before passing
--     to the transform_ip function.
-- 
--   * Implied 'P.True' if no transform function is implemented.
--   * Implied 'P.False' if ONLY transform function is implemented.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.GstBase.Objects.BaseTransform
    ( 

-- * Exported types
    BaseTransform(..)                       ,
    IsBaseTransform                         ,
    toBaseTransform                         ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [abortState]("GI.Gst.Objects.Element#g:method:abortState"), [addControlBinding]("GI.Gst.Objects.Object#g:method:addControlBinding"), [addPad]("GI.Gst.Objects.Element#g:method:addPad"), [addPropertyDeepNotifyWatch]("GI.Gst.Objects.Element#g:method:addPropertyDeepNotifyWatch"), [addPropertyNotifyWatch]("GI.Gst.Objects.Element#g:method:addPropertyNotifyWatch"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [callAsync]("GI.Gst.Objects.Element#g:method:callAsync"), [changeState]("GI.Gst.Objects.Element#g:method:changeState"), [continueState]("GI.Gst.Objects.Element#g:method:continueState"), [createAllPads]("GI.Gst.Objects.Element#g:method:createAllPads"), [defaultError]("GI.Gst.Objects.Object#g:method:defaultError"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [foreachPad]("GI.Gst.Objects.Element#g:method:foreachPad"), [foreachSinkPad]("GI.Gst.Objects.Element#g:method:foreachSinkPad"), [foreachSrcPad]("GI.Gst.Objects.Element#g:method:foreachSrcPad"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [hasActiveControlBindings]("GI.Gst.Objects.Object#g:method:hasActiveControlBindings"), [hasAncestor]("GI.Gst.Objects.Object#g:method:hasAncestor"), [hasAsAncestor]("GI.Gst.Objects.Object#g:method:hasAsAncestor"), [hasAsParent]("GI.Gst.Objects.Object#g:method:hasAsParent"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isInPlace]("GI.GstBase.Objects.BaseTransform#g:method:isInPlace"), [isLockedState]("GI.Gst.Objects.Element#g:method:isLockedState"), [isPassthrough]("GI.GstBase.Objects.BaseTransform#g:method:isPassthrough"), [isQosEnabled]("GI.GstBase.Objects.BaseTransform#g:method:isQosEnabled"), [iteratePads]("GI.Gst.Objects.Element#g:method:iteratePads"), [iterateSinkPads]("GI.Gst.Objects.Element#g:method:iterateSinkPads"), [iterateSrcPads]("GI.Gst.Objects.Element#g:method:iterateSrcPads"), [link]("GI.Gst.Objects.Element#g:method:link"), [linkFiltered]("GI.Gst.Objects.Element#g:method:linkFiltered"), [linkPads]("GI.Gst.Objects.Element#g:method:linkPads"), [linkPadsFiltered]("GI.Gst.Objects.Element#g:method:linkPadsFiltered"), [linkPadsFull]("GI.Gst.Objects.Element#g:method:linkPadsFull"), [lostState]("GI.Gst.Objects.Element#g:method:lostState"), [messageFull]("GI.Gst.Objects.Element#g:method:messageFull"), [messageFullWithDetails]("GI.Gst.Objects.Element#g:method:messageFullWithDetails"), [noMorePads]("GI.Gst.Objects.Element#g:method:noMorePads"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [postMessage]("GI.Gst.Objects.Element#g:method:postMessage"), [provideClock]("GI.Gst.Objects.Element#g:method:provideClock"), [query]("GI.Gst.Objects.Element#g:method:query"), [queryConvert]("GI.Gst.Objects.Element#g:method:queryConvert"), [queryDuration]("GI.Gst.Objects.Element#g:method:queryDuration"), [queryPosition]("GI.Gst.Objects.Element#g:method:queryPosition"), [reconfigure]("GI.GstBase.Objects.BaseTransform#g:method:reconfigure"), [reconfigureSink]("GI.GstBase.Objects.BaseTransform#g:method:reconfigureSink"), [reconfigureSrc]("GI.GstBase.Objects.BaseTransform#g:method:reconfigureSrc"), [ref]("GI.Gst.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [releaseRequestPad]("GI.Gst.Objects.Element#g:method:releaseRequestPad"), [removeControlBinding]("GI.Gst.Objects.Object#g:method:removeControlBinding"), [removePad]("GI.Gst.Objects.Element#g:method:removePad"), [removePropertyNotifyWatch]("GI.Gst.Objects.Element#g:method:removePropertyNotifyWatch"), [requestPad]("GI.Gst.Objects.Element#g:method:requestPad"), [requestPadSimple]("GI.Gst.Objects.Element#g:method:requestPadSimple"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [seek]("GI.Gst.Objects.Element#g:method:seek"), [seekSimple]("GI.Gst.Objects.Element#g:method:seekSimple"), [sendEvent]("GI.Gst.Objects.Element#g:method:sendEvent"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [suggestNextSync]("GI.Gst.Objects.Object#g:method:suggestNextSync"), [syncStateWithParent]("GI.Gst.Objects.Element#g:method:syncStateWithParent"), [syncValues]("GI.Gst.Objects.Object#g:method:syncValues"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unlink]("GI.Gst.Objects.Element#g:method:unlink"), [unlinkPads]("GI.Gst.Objects.Element#g:method:unlinkPads"), [unparent]("GI.Gst.Objects.Object#g:method:unparent"), [unref]("GI.Gst.Objects.Object#g:method:unref"), [updateQos]("GI.GstBase.Objects.BaseTransform#g:method:updateQos"), [updateSrcCaps]("GI.GstBase.Objects.BaseTransform#g:method:updateSrcCaps"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAllocator]("GI.GstBase.Objects.BaseTransform#g:method:getAllocator"), [getBaseTime]("GI.Gst.Objects.Element#g:method:getBaseTime"), [getBufferPool]("GI.GstBase.Objects.BaseTransform#g:method:getBufferPool"), [getBus]("GI.Gst.Objects.Element#g:method:getBus"), [getClock]("GI.Gst.Objects.Element#g:method:getClock"), [getCompatiblePad]("GI.Gst.Objects.Element#g:method:getCompatiblePad"), [getCompatiblePadTemplate]("GI.Gst.Objects.Element#g:method:getCompatiblePadTemplate"), [getContext]("GI.Gst.Objects.Element#g:method:getContext"), [getContextUnlocked]("GI.Gst.Objects.Element#g:method:getContextUnlocked"), [getContexts]("GI.Gst.Objects.Element#g:method:getContexts"), [getControlBinding]("GI.Gst.Objects.Object#g:method:getControlBinding"), [getControlRate]("GI.Gst.Objects.Object#g:method:getControlRate"), [getCurrentClockTime]("GI.Gst.Objects.Element#g:method:getCurrentClockTime"), [getCurrentRunningTime]("GI.Gst.Objects.Element#g:method:getCurrentRunningTime"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getFactory]("GI.Gst.Objects.Element#g:method:getFactory"), [getGValueArray]("GI.Gst.Objects.Object#g:method:getGValueArray"), [getMetadata]("GI.Gst.Objects.Element#g:method:getMetadata"), [getName]("GI.Gst.Objects.Object#g:method:getName"), [getPadTemplate]("GI.Gst.Objects.Element#g:method:getPadTemplate"), [getPadTemplateList]("GI.Gst.Objects.Element#g:method:getPadTemplateList"), [getParent]("GI.Gst.Objects.Object#g:method:getParent"), [getPathString]("GI.Gst.Objects.Object#g:method:getPathString"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRequestPad]("GI.Gst.Objects.Element#g:method:getRequestPad"), [getStartTime]("GI.Gst.Objects.Element#g:method:getStartTime"), [getState]("GI.Gst.Objects.Element#g:method:getState"), [getStaticPad]("GI.Gst.Objects.Element#g:method:getStaticPad"), [getValue]("GI.Gst.Objects.Object#g:method:getValue").
-- 
-- ==== Setters
-- [setBaseTime]("GI.Gst.Objects.Element#g:method:setBaseTime"), [setBus]("GI.Gst.Objects.Element#g:method:setBus"), [setClock]("GI.Gst.Objects.Element#g:method:setClock"), [setContext]("GI.Gst.Objects.Element#g:method:setContext"), [setControlBindingDisabled]("GI.Gst.Objects.Object#g:method:setControlBindingDisabled"), [setControlBindingsDisabled]("GI.Gst.Objects.Object#g:method:setControlBindingsDisabled"), [setControlRate]("GI.Gst.Objects.Object#g:method:setControlRate"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setGapAware]("GI.GstBase.Objects.BaseTransform#g:method:setGapAware"), [setInPlace]("GI.GstBase.Objects.BaseTransform#g:method:setInPlace"), [setLockedState]("GI.Gst.Objects.Element#g:method:setLockedState"), [setName]("GI.Gst.Objects.Object#g:method:setName"), [setParent]("GI.Gst.Objects.Object#g:method:setParent"), [setPassthrough]("GI.GstBase.Objects.BaseTransform#g:method:setPassthrough"), [setPreferPassthrough]("GI.GstBase.Objects.BaseTransform#g:method:setPreferPassthrough"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setQosEnabled]("GI.GstBase.Objects.BaseTransform#g:method:setQosEnabled"), [setStartTime]("GI.Gst.Objects.Element#g:method:setStartTime"), [setState]("GI.Gst.Objects.Element#g:method:setState").

#if defined(ENABLE_OVERLOADING)
    ResolveBaseTransformMethod              ,
#endif

-- ** getAllocator #method:getAllocator#

#if defined(ENABLE_OVERLOADING)
    BaseTransformGetAllocatorMethodInfo     ,
#endif
    baseTransformGetAllocator               ,


-- ** getBufferPool #method:getBufferPool#

#if defined(ENABLE_OVERLOADING)
    BaseTransformGetBufferPoolMethodInfo    ,
#endif
    baseTransformGetBufferPool              ,


-- ** isInPlace #method:isInPlace#

#if defined(ENABLE_OVERLOADING)
    BaseTransformIsInPlaceMethodInfo        ,
#endif
    baseTransformIsInPlace                  ,


-- ** isPassthrough #method:isPassthrough#

#if defined(ENABLE_OVERLOADING)
    BaseTransformIsPassthroughMethodInfo    ,
#endif
    baseTransformIsPassthrough              ,


-- ** isQosEnabled #method:isQosEnabled#

#if defined(ENABLE_OVERLOADING)
    BaseTransformIsQosEnabledMethodInfo     ,
#endif
    baseTransformIsQosEnabled               ,


-- ** reconfigure #method:reconfigure#

#if defined(ENABLE_OVERLOADING)
    BaseTransformReconfigureMethodInfo      ,
#endif
    baseTransformReconfigure                ,


-- ** reconfigureSink #method:reconfigureSink#

#if defined(ENABLE_OVERLOADING)
    BaseTransformReconfigureSinkMethodInfo  ,
#endif
    baseTransformReconfigureSink            ,


-- ** reconfigureSrc #method:reconfigureSrc#

#if defined(ENABLE_OVERLOADING)
    BaseTransformReconfigureSrcMethodInfo   ,
#endif
    baseTransformReconfigureSrc             ,


-- ** setGapAware #method:setGapAware#

#if defined(ENABLE_OVERLOADING)
    BaseTransformSetGapAwareMethodInfo      ,
#endif
    baseTransformSetGapAware                ,


-- ** setInPlace #method:setInPlace#

#if defined(ENABLE_OVERLOADING)
    BaseTransformSetInPlaceMethodInfo       ,
#endif
    baseTransformSetInPlace                 ,


-- ** setPassthrough #method:setPassthrough#

#if defined(ENABLE_OVERLOADING)
    BaseTransformSetPassthroughMethodInfo   ,
#endif
    baseTransformSetPassthrough             ,


-- ** setPreferPassthrough #method:setPreferPassthrough#

#if defined(ENABLE_OVERLOADING)
    BaseTransformSetPreferPassthroughMethodInfo,
#endif
    baseTransformSetPreferPassthrough       ,


-- ** setQosEnabled #method:setQosEnabled#

#if defined(ENABLE_OVERLOADING)
    BaseTransformSetQosEnabledMethodInfo    ,
#endif
    baseTransformSetQosEnabled              ,


-- ** updateQos #method:updateQos#

#if defined(ENABLE_OVERLOADING)
    BaseTransformUpdateQosMethodInfo        ,
#endif
    baseTransformUpdateQos                  ,


-- ** updateSrcCaps #method:updateSrcCaps#

#if defined(ENABLE_OVERLOADING)
    BaseTransformUpdateSrcCapsMethodInfo    ,
#endif
    baseTransformUpdateSrcCaps              ,




 -- * Properties


-- ** qos #attr:qos#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    BaseTransformQosPropertyInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseTransformQos                        ,
#endif
    constructBaseTransformQos               ,
    getBaseTransformQos                     ,
    setBaseTransformQos                     ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gst.Objects.Allocator as Gst.Allocator
import qualified GI.Gst.Objects.BufferPool as Gst.BufferPool
import qualified GI.Gst.Objects.Element as Gst.Element
import qualified GI.Gst.Objects.Object as Gst.Object
import qualified GI.Gst.Structs.AllocationParams as Gst.AllocationParams
import qualified GI.Gst.Structs.Caps as Gst.Caps

-- | Memory-managed wrapper type.
newtype BaseTransform = BaseTransform (SP.ManagedPtr BaseTransform)
    deriving (BaseTransform -> BaseTransform -> Bool
(BaseTransform -> BaseTransform -> Bool)
-> (BaseTransform -> BaseTransform -> Bool) -> Eq BaseTransform
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BaseTransform -> BaseTransform -> Bool
$c/= :: BaseTransform -> BaseTransform -> Bool
== :: BaseTransform -> BaseTransform -> Bool
$c== :: BaseTransform -> BaseTransform -> Bool
Eq)

instance SP.ManagedPtrNewtype BaseTransform where
    toManagedPtr :: BaseTransform -> ManagedPtr BaseTransform
toManagedPtr (BaseTransform ManagedPtr BaseTransform
p) = ManagedPtr BaseTransform
p

foreign import ccall "gst_base_transform_get_type"
    c_gst_base_transform_get_type :: IO B.Types.GType

instance B.Types.TypedObject BaseTransform where
    glibType :: IO GType
glibType = IO GType
c_gst_base_transform_get_type

instance B.Types.GObject BaseTransform

-- | Type class for types which can be safely cast to `BaseTransform`, for instance with `toBaseTransform`.
class (SP.GObject o, O.IsDescendantOf BaseTransform o) => IsBaseTransform o
instance (SP.GObject o, O.IsDescendantOf BaseTransform o) => IsBaseTransform o

instance O.HasParentTypes BaseTransform
type instance O.ParentTypes BaseTransform = '[Gst.Element.Element, Gst.Object.Object, GObject.Object.Object]

-- | Cast to `BaseTransform`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toBaseTransform :: (MIO.MonadIO m, IsBaseTransform o) => o -> m BaseTransform
toBaseTransform :: forall (m :: * -> *) o.
(MonadIO m, IsBaseTransform o) =>
o -> m BaseTransform
toBaseTransform = IO BaseTransform -> m BaseTransform
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO BaseTransform -> m BaseTransform)
-> (o -> IO BaseTransform) -> o -> m BaseTransform
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr BaseTransform -> BaseTransform)
-> o -> IO BaseTransform
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr BaseTransform -> BaseTransform
BaseTransform

-- | Convert 'BaseTransform' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe BaseTransform) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_base_transform_get_type
    gvalueSet_ :: Ptr GValue -> Maybe BaseTransform -> IO ()
gvalueSet_ Ptr GValue
gv Maybe BaseTransform
P.Nothing = Ptr GValue -> Ptr BaseTransform -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr BaseTransform
forall a. Ptr a
FP.nullPtr :: FP.Ptr BaseTransform)
    gvalueSet_ Ptr GValue
gv (P.Just BaseTransform
obj) = BaseTransform -> (Ptr BaseTransform -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BaseTransform
obj (Ptr GValue -> Ptr BaseTransform -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe BaseTransform)
gvalueGet_ Ptr GValue
gv = do
        Ptr BaseTransform
ptr <- Ptr GValue -> IO (Ptr BaseTransform)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr BaseTransform)
        if Ptr BaseTransform
ptr Ptr BaseTransform -> Ptr BaseTransform -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr BaseTransform
forall a. Ptr a
FP.nullPtr
        then BaseTransform -> Maybe BaseTransform
forall a. a -> Maybe a
P.Just (BaseTransform -> Maybe BaseTransform)
-> IO BaseTransform -> IO (Maybe BaseTransform)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr BaseTransform -> BaseTransform)
-> Ptr BaseTransform -> IO BaseTransform
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr BaseTransform -> BaseTransform
BaseTransform Ptr BaseTransform
ptr
        else Maybe BaseTransform -> IO (Maybe BaseTransform)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BaseTransform
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveBaseTransformMethod (t :: Symbol) (o :: *) :: * where
    ResolveBaseTransformMethod "abortState" o = Gst.Element.ElementAbortStateMethodInfo
    ResolveBaseTransformMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
    ResolveBaseTransformMethod "addPad" o = Gst.Element.ElementAddPadMethodInfo
    ResolveBaseTransformMethod "addPropertyDeepNotifyWatch" o = Gst.Element.ElementAddPropertyDeepNotifyWatchMethodInfo
    ResolveBaseTransformMethod "addPropertyNotifyWatch" o = Gst.Element.ElementAddPropertyNotifyWatchMethodInfo
    ResolveBaseTransformMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveBaseTransformMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveBaseTransformMethod "callAsync" o = Gst.Element.ElementCallAsyncMethodInfo
    ResolveBaseTransformMethod "changeState" o = Gst.Element.ElementChangeStateMethodInfo
    ResolveBaseTransformMethod "continueState" o = Gst.Element.ElementContinueStateMethodInfo
    ResolveBaseTransformMethod "createAllPads" o = Gst.Element.ElementCreateAllPadsMethodInfo
    ResolveBaseTransformMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
    ResolveBaseTransformMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveBaseTransformMethod "foreachPad" o = Gst.Element.ElementForeachPadMethodInfo
    ResolveBaseTransformMethod "foreachSinkPad" o = Gst.Element.ElementForeachSinkPadMethodInfo
    ResolveBaseTransformMethod "foreachSrcPad" o = Gst.Element.ElementForeachSrcPadMethodInfo
    ResolveBaseTransformMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveBaseTransformMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveBaseTransformMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
    ResolveBaseTransformMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
    ResolveBaseTransformMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
    ResolveBaseTransformMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
    ResolveBaseTransformMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveBaseTransformMethod "isInPlace" o = BaseTransformIsInPlaceMethodInfo
    ResolveBaseTransformMethod "isLockedState" o = Gst.Element.ElementIsLockedStateMethodInfo
    ResolveBaseTransformMethod "isPassthrough" o = BaseTransformIsPassthroughMethodInfo
    ResolveBaseTransformMethod "isQosEnabled" o = BaseTransformIsQosEnabledMethodInfo
    ResolveBaseTransformMethod "iteratePads" o = Gst.Element.ElementIteratePadsMethodInfo
    ResolveBaseTransformMethod "iterateSinkPads" o = Gst.Element.ElementIterateSinkPadsMethodInfo
    ResolveBaseTransformMethod "iterateSrcPads" o = Gst.Element.ElementIterateSrcPadsMethodInfo
    ResolveBaseTransformMethod "link" o = Gst.Element.ElementLinkMethodInfo
    ResolveBaseTransformMethod "linkFiltered" o = Gst.Element.ElementLinkFilteredMethodInfo
    ResolveBaseTransformMethod "linkPads" o = Gst.Element.ElementLinkPadsMethodInfo
    ResolveBaseTransformMethod "linkPadsFiltered" o = Gst.Element.ElementLinkPadsFilteredMethodInfo
    ResolveBaseTransformMethod "linkPadsFull" o = Gst.Element.ElementLinkPadsFullMethodInfo
    ResolveBaseTransformMethod "lostState" o = Gst.Element.ElementLostStateMethodInfo
    ResolveBaseTransformMethod "messageFull" o = Gst.Element.ElementMessageFullMethodInfo
    ResolveBaseTransformMethod "messageFullWithDetails" o = Gst.Element.ElementMessageFullWithDetailsMethodInfo
    ResolveBaseTransformMethod "noMorePads" o = Gst.Element.ElementNoMorePadsMethodInfo
    ResolveBaseTransformMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveBaseTransformMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveBaseTransformMethod "postMessage" o = Gst.Element.ElementPostMessageMethodInfo
    ResolveBaseTransformMethod "provideClock" o = Gst.Element.ElementProvideClockMethodInfo
    ResolveBaseTransformMethod "query" o = Gst.Element.ElementQueryMethodInfo
    ResolveBaseTransformMethod "queryConvert" o = Gst.Element.ElementQueryConvertMethodInfo
    ResolveBaseTransformMethod "queryDuration" o = Gst.Element.ElementQueryDurationMethodInfo
    ResolveBaseTransformMethod "queryPosition" o = Gst.Element.ElementQueryPositionMethodInfo
    ResolveBaseTransformMethod "reconfigure" o = BaseTransformReconfigureMethodInfo
    ResolveBaseTransformMethod "reconfigureSink" o = BaseTransformReconfigureSinkMethodInfo
    ResolveBaseTransformMethod "reconfigureSrc" o = BaseTransformReconfigureSrcMethodInfo
    ResolveBaseTransformMethod "ref" o = Gst.Object.ObjectRefMethodInfo
    ResolveBaseTransformMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveBaseTransformMethod "releaseRequestPad" o = Gst.Element.ElementReleaseRequestPadMethodInfo
    ResolveBaseTransformMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
    ResolveBaseTransformMethod "removePad" o = Gst.Element.ElementRemovePadMethodInfo
    ResolveBaseTransformMethod "removePropertyNotifyWatch" o = Gst.Element.ElementRemovePropertyNotifyWatchMethodInfo
    ResolveBaseTransformMethod "requestPad" o = Gst.Element.ElementRequestPadMethodInfo
    ResolveBaseTransformMethod "requestPadSimple" o = Gst.Element.ElementRequestPadSimpleMethodInfo
    ResolveBaseTransformMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveBaseTransformMethod "seek" o = Gst.Element.ElementSeekMethodInfo
    ResolveBaseTransformMethod "seekSimple" o = Gst.Element.ElementSeekSimpleMethodInfo
    ResolveBaseTransformMethod "sendEvent" o = Gst.Element.ElementSendEventMethodInfo
    ResolveBaseTransformMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveBaseTransformMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveBaseTransformMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
    ResolveBaseTransformMethod "syncStateWithParent" o = Gst.Element.ElementSyncStateWithParentMethodInfo
    ResolveBaseTransformMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
    ResolveBaseTransformMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveBaseTransformMethod "unlink" o = Gst.Element.ElementUnlinkMethodInfo
    ResolveBaseTransformMethod "unlinkPads" o = Gst.Element.ElementUnlinkPadsMethodInfo
    ResolveBaseTransformMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
    ResolveBaseTransformMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
    ResolveBaseTransformMethod "updateQos" o = BaseTransformUpdateQosMethodInfo
    ResolveBaseTransformMethod "updateSrcCaps" o = BaseTransformUpdateSrcCapsMethodInfo
    ResolveBaseTransformMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveBaseTransformMethod "getAllocator" o = BaseTransformGetAllocatorMethodInfo
    ResolveBaseTransformMethod "getBaseTime" o = Gst.Element.ElementGetBaseTimeMethodInfo
    ResolveBaseTransformMethod "getBufferPool" o = BaseTransformGetBufferPoolMethodInfo
    ResolveBaseTransformMethod "getBus" o = Gst.Element.ElementGetBusMethodInfo
    ResolveBaseTransformMethod "getClock" o = Gst.Element.ElementGetClockMethodInfo
    ResolveBaseTransformMethod "getCompatiblePad" o = Gst.Element.ElementGetCompatiblePadMethodInfo
    ResolveBaseTransformMethod "getCompatiblePadTemplate" o = Gst.Element.ElementGetCompatiblePadTemplateMethodInfo
    ResolveBaseTransformMethod "getContext" o = Gst.Element.ElementGetContextMethodInfo
    ResolveBaseTransformMethod "getContextUnlocked" o = Gst.Element.ElementGetContextUnlockedMethodInfo
    ResolveBaseTransformMethod "getContexts" o = Gst.Element.ElementGetContextsMethodInfo
    ResolveBaseTransformMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
    ResolveBaseTransformMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
    ResolveBaseTransformMethod "getCurrentClockTime" o = Gst.Element.ElementGetCurrentClockTimeMethodInfo
    ResolveBaseTransformMethod "getCurrentRunningTime" o = Gst.Element.ElementGetCurrentRunningTimeMethodInfo
    ResolveBaseTransformMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveBaseTransformMethod "getFactory" o = Gst.Element.ElementGetFactoryMethodInfo
    ResolveBaseTransformMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
    ResolveBaseTransformMethod "getMetadata" o = Gst.Element.ElementGetMetadataMethodInfo
    ResolveBaseTransformMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
    ResolveBaseTransformMethod "getPadTemplate" o = Gst.Element.ElementGetPadTemplateMethodInfo
    ResolveBaseTransformMethod "getPadTemplateList" o = Gst.Element.ElementGetPadTemplateListMethodInfo
    ResolveBaseTransformMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
    ResolveBaseTransformMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
    ResolveBaseTransformMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveBaseTransformMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveBaseTransformMethod "getRequestPad" o = Gst.Element.ElementGetRequestPadMethodInfo
    ResolveBaseTransformMethod "getStartTime" o = Gst.Element.ElementGetStartTimeMethodInfo
    ResolveBaseTransformMethod "getState" o = Gst.Element.ElementGetStateMethodInfo
    ResolveBaseTransformMethod "getStaticPad" o = Gst.Element.ElementGetStaticPadMethodInfo
    ResolveBaseTransformMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
    ResolveBaseTransformMethod "setBaseTime" o = Gst.Element.ElementSetBaseTimeMethodInfo
    ResolveBaseTransformMethod "setBus" o = Gst.Element.ElementSetBusMethodInfo
    ResolveBaseTransformMethod "setClock" o = Gst.Element.ElementSetClockMethodInfo
    ResolveBaseTransformMethod "setContext" o = Gst.Element.ElementSetContextMethodInfo
    ResolveBaseTransformMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
    ResolveBaseTransformMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
    ResolveBaseTransformMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
    ResolveBaseTransformMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveBaseTransformMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveBaseTransformMethod "setGapAware" o = BaseTransformSetGapAwareMethodInfo
    ResolveBaseTransformMethod "setInPlace" o = BaseTransformSetInPlaceMethodInfo
    ResolveBaseTransformMethod "setLockedState" o = Gst.Element.ElementSetLockedStateMethodInfo
    ResolveBaseTransformMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
    ResolveBaseTransformMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
    ResolveBaseTransformMethod "setPassthrough" o = BaseTransformSetPassthroughMethodInfo
    ResolveBaseTransformMethod "setPreferPassthrough" o = BaseTransformSetPreferPassthroughMethodInfo
    ResolveBaseTransformMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveBaseTransformMethod "setQosEnabled" o = BaseTransformSetQosEnabledMethodInfo
    ResolveBaseTransformMethod "setStartTime" o = Gst.Element.ElementSetStartTimeMethodInfo
    ResolveBaseTransformMethod "setState" o = Gst.Element.ElementSetStateMethodInfo
    ResolveBaseTransformMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveBaseTransformMethod t BaseTransform, O.OverloadedMethod info BaseTransform p) => OL.IsLabel t (BaseTransform -> 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 ~ ResolveBaseTransformMethod t BaseTransform, O.OverloadedMethod info BaseTransform p, R.HasField t BaseTransform p) => R.HasField t BaseTransform p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveBaseTransformMethod t BaseTransform, O.OverloadedMethodInfo info BaseTransform) => OL.IsLabel t (O.MethodProxy info BaseTransform) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- VVV Prop "qos"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@qos@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseTransform #qos
-- @
getBaseTransformQos :: (MonadIO m, IsBaseTransform o) => o -> m Bool
getBaseTransformQos :: forall (m :: * -> *) o.
(MonadIO m, IsBaseTransform o) =>
o -> m Bool
getBaseTransformQos o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"qos"

-- | Set the value of the “@qos@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseTransform [ #qos 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseTransformQos :: (MonadIO m, IsBaseTransform o) => o -> Bool -> m ()
setBaseTransformQos :: forall (m :: * -> *) o.
(MonadIO m, IsBaseTransform o) =>
o -> Bool -> m ()
setBaseTransformQos o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"qos" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@qos@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseTransformQos :: (IsBaseTransform o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructBaseTransformQos :: forall o (m :: * -> *).
(IsBaseTransform o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructBaseTransformQos Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"qos" Bool
val

#if defined(ENABLE_OVERLOADING)
data BaseTransformQosPropertyInfo
instance AttrInfo BaseTransformQosPropertyInfo where
    type AttrAllowedOps BaseTransformQosPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseTransformQosPropertyInfo = IsBaseTransform
    type AttrSetTypeConstraint BaseTransformQosPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint BaseTransformQosPropertyInfo = (~) Bool
    type AttrTransferType BaseTransformQosPropertyInfo = Bool
    type AttrGetType BaseTransformQosPropertyInfo = Bool
    type AttrLabel BaseTransformQosPropertyInfo = "qos"
    type AttrOrigin BaseTransformQosPropertyInfo = BaseTransform
    attrGet = getBaseTransformQos
    attrSet = setBaseTransformQos
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseTransformQos
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.qos"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#g:attr:qos"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BaseTransform
type instance O.AttributeList BaseTransform = BaseTransformAttributeList
type BaseTransformAttributeList = ('[ '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("qos", BaseTransformQosPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
baseTransformQos :: AttrLabelProxy "qos"
baseTransformQos = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList BaseTransform = BaseTransformSignalList
type BaseTransformSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("noMorePads", Gst.Element.ElementNoMorePadsSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("padAdded", Gst.Element.ElementPadAddedSignalInfo), '("padRemoved", Gst.Element.ElementPadRemovedSignalInfo)] :: [(Symbol, *)])

#endif

-- method BaseTransform::get_allocator
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "allocator"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "Allocator" }
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GstAllocator\nused"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "params"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "AllocationParams" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GstAllocationParams of @allocator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_get_allocator" gst_base_transform_get_allocator :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    Ptr (Ptr Gst.Allocator.Allocator) ->    -- allocator : TInterface (Name {namespace = "Gst", name = "Allocator"})
    Ptr Gst.AllocationParams.AllocationParams -> -- params : TInterface (Name {namespace = "Gst", name = "AllocationParams"})
    IO ()

-- | Lets t'GI.GstBase.Objects.BaseTransform.BaseTransform' sub-classes know the memory /@allocator@/
-- used by the base class and its /@params@/.
-- 
-- Unref the /@allocator@/ after use.
baseTransformGetAllocator ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> m ((Maybe Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))
baseTransformGetAllocator :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> m (Maybe Allocator, AllocationParams)
baseTransformGetAllocator a
trans = IO (Maybe Allocator, AllocationParams)
-> m (Maybe Allocator, AllocationParams)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Allocator, AllocationParams)
 -> m (Maybe Allocator, AllocationParams))
-> IO (Maybe Allocator, AllocationParams)
-> m (Maybe Allocator, AllocationParams)
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    Ptr (Ptr Allocator)
allocator <- IO (Ptr (Ptr Allocator))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Allocator.Allocator))
    Ptr AllocationParams
params <- Int -> IO (Ptr AllocationParams)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
64 :: IO (Ptr Gst.AllocationParams.AllocationParams)
    Ptr BaseTransform
-> Ptr (Ptr Allocator) -> Ptr AllocationParams -> IO ()
gst_base_transform_get_allocator Ptr BaseTransform
trans' Ptr (Ptr Allocator)
allocator Ptr AllocationParams
params
    Ptr Allocator
allocator' <- Ptr (Ptr Allocator) -> IO (Ptr Allocator)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Allocator)
allocator
    Maybe Allocator
maybeAllocator' <- Ptr Allocator
-> (Ptr Allocator -> IO Allocator) -> IO (Maybe Allocator)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Allocator
allocator' ((Ptr Allocator -> IO Allocator) -> IO (Maybe Allocator))
-> (Ptr Allocator -> IO Allocator) -> IO (Maybe Allocator)
forall a b. (a -> b) -> a -> b
$ \Ptr Allocator
allocator'' -> do
        Allocator
allocator''' <- ((ManagedPtr Allocator -> Allocator)
-> Ptr Allocator -> IO Allocator
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Allocator -> Allocator
Gst.Allocator.Allocator) Ptr Allocator
allocator''
        Allocator -> IO Allocator
forall (m :: * -> *) a. Monad m => a -> m a
return Allocator
allocator'''
    AllocationParams
params' <- ((ManagedPtr AllocationParams -> AllocationParams)
-> Ptr AllocationParams -> IO AllocationParams
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr AllocationParams -> AllocationParams
Gst.AllocationParams.AllocationParams) Ptr AllocationParams
params
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    Ptr (Ptr Allocator) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Allocator)
allocator
    (Maybe Allocator, AllocationParams)
-> IO (Maybe Allocator, AllocationParams)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Allocator
maybeAllocator', AllocationParams
params')

#if defined(ENABLE_OVERLOADING)
data BaseTransformGetAllocatorMethodInfo
instance (signature ~ (m ((Maybe Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformGetAllocatorMethodInfo a signature where
    overloadedMethod = baseTransformGetAllocator

instance O.OverloadedMethodInfo BaseTransformGetAllocatorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformGetAllocator",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformGetAllocator"
        })


#endif

-- method BaseTransform::get_buffer_pool
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "BufferPool" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_get_buffer_pool" gst_base_transform_get_buffer_pool :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    IO (Ptr Gst.BufferPool.BufferPool)

-- | /No description available in the introspection data./
baseTransformGetBufferPool ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> m (Maybe Gst.BufferPool.BufferPool)
    -- ^ __Returns:__ the instance of the t'GI.Gst.Objects.BufferPool.BufferPool' used
    -- by /@trans@/; free it after use
baseTransformGetBufferPool :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> m (Maybe BufferPool)
baseTransformGetBufferPool a
trans = IO (Maybe BufferPool) -> m (Maybe BufferPool)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BufferPool) -> m (Maybe BufferPool))
-> IO (Maybe BufferPool) -> m (Maybe BufferPool)
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    Ptr BufferPool
result <- Ptr BaseTransform -> IO (Ptr BufferPool)
gst_base_transform_get_buffer_pool Ptr BaseTransform
trans'
    Maybe BufferPool
maybeResult <- Ptr BufferPool
-> (Ptr BufferPool -> IO BufferPool) -> IO (Maybe BufferPool)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr BufferPool
result ((Ptr BufferPool -> IO BufferPool) -> IO (Maybe BufferPool))
-> (Ptr BufferPool -> IO BufferPool) -> IO (Maybe BufferPool)
forall a b. (a -> b) -> a -> b
$ \Ptr BufferPool
result' -> do
        BufferPool
result'' <- ((ManagedPtr BufferPool -> BufferPool)
-> Ptr BufferPool -> IO BufferPool
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BufferPool -> BufferPool
Gst.BufferPool.BufferPool) Ptr BufferPool
result'
        BufferPool -> IO BufferPool
forall (m :: * -> *) a. Monad m => a -> m a
return BufferPool
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    Maybe BufferPool -> IO (Maybe BufferPool)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BufferPool
maybeResult

#if defined(ENABLE_OVERLOADING)
data BaseTransformGetBufferPoolMethodInfo
instance (signature ~ (m (Maybe Gst.BufferPool.BufferPool)), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformGetBufferPoolMethodInfo a signature where
    overloadedMethod = baseTransformGetBufferPool

instance O.OverloadedMethodInfo BaseTransformGetBufferPoolMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformGetBufferPool",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformGetBufferPool"
        })


#endif

-- method BaseTransform::is_in_place
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GstBaseTransform to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_is_in_place" gst_base_transform_is_in_place :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    IO CInt

-- | See if /@trans@/ is configured as a in_place transform.
baseTransformIsInPlace ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: the t'GI.GstBase.Objects.BaseTransform.BaseTransform' to query
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the transform is configured in in_place mode.
    -- 
    -- MT safe.
baseTransformIsInPlace :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> m Bool
baseTransformIsInPlace a
trans = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    CInt
result <- Ptr BaseTransform -> IO CInt
gst_base_transform_is_in_place Ptr BaseTransform
trans'
    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
trans
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseTransformIsInPlaceMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformIsInPlaceMethodInfo a signature where
    overloadedMethod = baseTransformIsInPlace

instance O.OverloadedMethodInfo BaseTransformIsInPlaceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformIsInPlace",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformIsInPlace"
        })


#endif

-- method BaseTransform::is_passthrough
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GstBaseTransform to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_is_passthrough" gst_base_transform_is_passthrough :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    IO CInt

-- | See if /@trans@/ is configured as a passthrough transform.
baseTransformIsPassthrough ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: the t'GI.GstBase.Objects.BaseTransform.BaseTransform' to query
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the transform is configured in passthrough mode.
    -- 
    -- MT safe.
baseTransformIsPassthrough :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> m Bool
baseTransformIsPassthrough a
trans = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    CInt
result <- Ptr BaseTransform -> IO CInt
gst_base_transform_is_passthrough Ptr BaseTransform
trans'
    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
trans
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseTransformIsPassthroughMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformIsPassthroughMethodInfo a signature where
    overloadedMethod = baseTransformIsPassthrough

instance O.OverloadedMethodInfo BaseTransformIsPassthroughMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformIsPassthrough",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformIsPassthrough"
        })


#endif

-- method BaseTransform::is_qos_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_is_qos_enabled" gst_base_transform_is_qos_enabled :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    IO CInt

-- | Queries if the transform will handle QoS.
baseTransformIsQosEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if QoS is enabled.
    -- 
    -- MT safe.
baseTransformIsQosEnabled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> m Bool
baseTransformIsQosEnabled a
trans = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    CInt
result <- Ptr BaseTransform -> IO CInt
gst_base_transform_is_qos_enabled Ptr BaseTransform
trans'
    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
trans
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseTransformIsQosEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformIsQosEnabledMethodInfo a signature where
    overloadedMethod = baseTransformIsQosEnabled

instance O.OverloadedMethodInfo BaseTransformIsQosEnabledMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformIsQosEnabled",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformIsQosEnabled"
        })


#endif

-- method BaseTransform::reconfigure
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GstBaseTransform to set"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_reconfigure" gst_base_transform_reconfigure :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    IO CInt

-- | Negotiates src pad caps with downstream elements if the source pad is
-- marked as needing reconfiguring. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in
-- any case. But marks it again if negotiation fails.
-- 
-- Do not call this in the t'GI.GstBase.Structs.BaseTransformClass.BaseTransformClass'::@/transform/@ or
-- t'GI.GstBase.Structs.BaseTransformClass.BaseTransformClass'::@/transform_ip/@ vmethod. Call this in
-- t'GI.GstBase.Structs.BaseTransformClass.BaseTransformClass'::@/submit_input_buffer/@,
-- t'GI.GstBase.Structs.BaseTransformClass.BaseTransformClass'::@/prepare_output_buffer/@ or in
-- t'GI.GstBase.Structs.BaseTransformClass.BaseTransformClass'::@/generate_output/@ _before_ any output buffer is
-- allocated.
-- 
-- It will be default be called when handling an ALLOCATION query or at the
-- very beginning of the default t'GI.GstBase.Structs.BaseTransformClass.BaseTransformClass'::@/submit_input_buffer/@
-- implementation.
-- 
-- /Since: 1.18/
baseTransformReconfigure ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: the t'GI.GstBase.Objects.BaseTransform.BaseTransform' to set
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the negotiation succeeded, else 'P.False'.
baseTransformReconfigure :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> m Bool
baseTransformReconfigure a
trans = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    CInt
result <- Ptr BaseTransform -> IO CInt
gst_base_transform_reconfigure Ptr BaseTransform
trans'
    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
trans
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseTransformReconfigureMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformReconfigureMethodInfo a signature where
    overloadedMethod = baseTransformReconfigure

instance O.OverloadedMethodInfo BaseTransformReconfigureMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformReconfigure",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformReconfigure"
        })


#endif

-- method BaseTransform::reconfigure_sink
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_reconfigure_sink" gst_base_transform_reconfigure_sink :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    IO ()

-- | Instructs /@trans@/ to request renegotiation upstream. This function is
-- typically called after properties on the transform were set that
-- influence the input format.
baseTransformReconfigureSink ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> m ()
baseTransformReconfigureSink :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> m ()
baseTransformReconfigureSink a
trans = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    Ptr BaseTransform -> IO ()
gst_base_transform_reconfigure_sink Ptr BaseTransform
trans'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseTransformReconfigureSinkMethodInfo
instance (signature ~ (m ()), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformReconfigureSinkMethodInfo a signature where
    overloadedMethod = baseTransformReconfigureSink

instance O.OverloadedMethodInfo BaseTransformReconfigureSinkMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformReconfigureSink",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformReconfigureSink"
        })


#endif

-- method BaseTransform::reconfigure_src
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_reconfigure_src" gst_base_transform_reconfigure_src :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    IO ()

-- | Instructs /@trans@/ to renegotiate a new downstream transform on the next
-- buffer. This function is typically called after properties on the transform
-- were set that influence the output format.
baseTransformReconfigureSrc ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> m ()
baseTransformReconfigureSrc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> m ()
baseTransformReconfigureSrc a
trans = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    Ptr BaseTransform -> IO ()
gst_base_transform_reconfigure_src Ptr BaseTransform
trans'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseTransformReconfigureSrcMethodInfo
instance (signature ~ (m ()), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformReconfigureSrcMethodInfo a signature where
    overloadedMethod = baseTransformReconfigureSrc

instance O.OverloadedMethodInfo BaseTransformReconfigureSrcMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformReconfigureSrc",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformReconfigureSrc"
        })


#endif

-- method BaseTransform::set_gap_aware
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "gap_aware"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "New state" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_set_gap_aware" gst_base_transform_set_gap_aware :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    CInt ->                                 -- gap_aware : TBasicType TBoolean
    IO ()

-- | If /@gapAware@/ is 'P.False' (the default), output buffers will have the
-- 'GI.Gst.Flags.BufferFlagsGap' flag unset.
-- 
-- If set to 'P.True', the element must handle output buffers with this flag set
-- correctly, i.e. it can assume that the buffer contains neutral data but must
-- unset the flag if the output is no neutral data.
-- 
-- MT safe.
baseTransformSetGapAware ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> Bool
    -- ^ /@gapAware@/: New state
    -> m ()
baseTransformSetGapAware :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> Bool -> m ()
baseTransformSetGapAware a
trans Bool
gapAware = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    let gapAware' :: CInt
gapAware' = (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
gapAware
    Ptr BaseTransform -> CInt -> IO ()
gst_base_transform_set_gap_aware Ptr BaseTransform
trans' CInt
gapAware'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseTransformSetGapAwareMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformSetGapAwareMethodInfo a signature where
    overloadedMethod = baseTransformSetGapAware

instance O.OverloadedMethodInfo BaseTransformSetGapAwareMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformSetGapAware",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformSetGapAware"
        })


#endif

-- method BaseTransform::set_in_place
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GstBaseTransform to modify"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "in_place"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Boolean value indicating that we would like to operate\non in_place buffers."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_set_in_place" gst_base_transform_set_in_place :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    CInt ->                                 -- in_place : TBasicType TBoolean
    IO ()

-- | Determines whether a non-writable buffer will be copied before passing
-- to the transform_ip function.
-- 
--   * Always 'P.True' if no transform function is implemented.
--   * Always 'P.False' if ONLY transform function is implemented.
-- 
-- MT safe.
baseTransformSetInPlace ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: the t'GI.GstBase.Objects.BaseTransform.BaseTransform' to modify
    -> Bool
    -- ^ /@inPlace@/: Boolean value indicating that we would like to operate
    -- on in_place buffers.
    -> m ()
baseTransformSetInPlace :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> Bool -> m ()
baseTransformSetInPlace a
trans Bool
inPlace = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    let inPlace' :: CInt
inPlace' = (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
inPlace
    Ptr BaseTransform -> CInt -> IO ()
gst_base_transform_set_in_place Ptr BaseTransform
trans' CInt
inPlace'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseTransformSetInPlaceMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformSetInPlaceMethodInfo a signature where
    overloadedMethod = baseTransformSetInPlace

instance O.OverloadedMethodInfo BaseTransformSetInPlaceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformSetInPlace",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformSetInPlace"
        })


#endif

-- method BaseTransform::set_passthrough
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GstBaseTransform to set"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "passthrough"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "boolean indicating passthrough mode."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_set_passthrough" gst_base_transform_set_passthrough :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    CInt ->                                 -- passthrough : TBasicType TBoolean
    IO ()

-- | Set passthrough mode for this filter by default. This is mostly
-- useful for filters that do not care about negotiation.
-- 
-- Always 'P.True' for filters which don\'t implement either a transform
-- or transform_ip or generate_output method.
-- 
-- MT safe.
baseTransformSetPassthrough ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: the t'GI.GstBase.Objects.BaseTransform.BaseTransform' to set
    -> Bool
    -- ^ /@passthrough@/: boolean indicating passthrough mode.
    -> m ()
baseTransformSetPassthrough :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> Bool -> m ()
baseTransformSetPassthrough a
trans Bool
passthrough = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    let passthrough' :: CInt
passthrough' = (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
passthrough
    Ptr BaseTransform -> CInt -> IO ()
gst_base_transform_set_passthrough Ptr BaseTransform
trans' CInt
passthrough'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseTransformSetPassthroughMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformSetPassthroughMethodInfo a signature where
    overloadedMethod = baseTransformSetPassthrough

instance O.OverloadedMethodInfo BaseTransformSetPassthroughMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformSetPassthrough",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformSetPassthrough"
        })


#endif

-- method BaseTransform::set_prefer_passthrough
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "prefer_passthrough"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "New state" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_set_prefer_passthrough" gst_base_transform_set_prefer_passthrough :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    CInt ->                                 -- prefer_passthrough : TBasicType TBoolean
    IO ()

-- | If /@preferPassthrough@/ is 'P.True' (the default), /@trans@/ will check and
-- prefer passthrough caps from the list of caps returned by the
-- transform_caps vmethod.
-- 
-- If set to 'P.False', the element must order the caps returned from the
-- transform_caps function in such a way that the preferred format is
-- first in the list. This can be interesting for transforms that can do
-- passthrough transforms but prefer to do something else, like a
-- capsfilter.
-- 
-- MT safe.
-- 
-- /Since: 1.0.1/
baseTransformSetPreferPassthrough ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> Bool
    -- ^ /@preferPassthrough@/: New state
    -> m ()
baseTransformSetPreferPassthrough :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> Bool -> m ()
baseTransformSetPreferPassthrough a
trans Bool
preferPassthrough = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    let preferPassthrough' :: CInt
preferPassthrough' = (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
preferPassthrough
    Ptr BaseTransform -> CInt -> IO ()
gst_base_transform_set_prefer_passthrough Ptr BaseTransform
trans' CInt
preferPassthrough'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseTransformSetPreferPassthroughMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformSetPreferPassthroughMethodInfo a signature where
    overloadedMethod = baseTransformSetPreferPassthrough

instance O.OverloadedMethodInfo BaseTransformSetPreferPassthroughMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformSetPreferPassthrough",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformSetPreferPassthrough"
        })


#endif

-- method BaseTransform::set_qos_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "enabled"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "new state" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_set_qos_enabled" gst_base_transform_set_qos_enabled :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()

-- | Enable or disable QoS handling in the transform.
-- 
-- MT safe.
baseTransformSetQosEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> Bool
    -- ^ /@enabled@/: new state
    -> m ()
baseTransformSetQosEnabled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> Bool -> m ()
baseTransformSetQosEnabled a
trans Bool
enabled = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    let enabled' :: CInt
enabled' = (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
enabled
    Ptr BaseTransform -> CInt -> IO ()
gst_base_transform_set_qos_enabled Ptr BaseTransform
trans' CInt
enabled'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseTransformSetQosEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformSetQosEnabledMethodInfo a signature where
    overloadedMethod = baseTransformSetQosEnabled

instance O.OverloadedMethodInfo BaseTransformSetQosEnabledMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformSetQosEnabled",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformSetQosEnabled"
        })


#endif

-- method BaseTransform::update_qos
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "proportion"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the proportion" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "diff"
--           , argType = TBasicType TInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the diff against the clock"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "timestamp"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the timestamp of the buffer generating the QoS expressed in\nrunning_time."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_update_qos" gst_base_transform_update_qos :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    CDouble ->                              -- proportion : TBasicType TDouble
    Int64 ->                                -- diff : TBasicType TInt64
    Word64 ->                               -- timestamp : TBasicType TUInt64
    IO ()

-- | Set the QoS parameters in the transform. This function is called internally
-- when a QOS event is received but subclasses can provide custom information
-- when needed.
-- 
-- MT safe.
baseTransformUpdateQos ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> Double
    -- ^ /@proportion@/: the proportion
    -> Int64
    -- ^ /@diff@/: the diff against the clock
    -> Word64
    -- ^ /@timestamp@/: the timestamp of the buffer generating the QoS expressed in
    -- running_time.
    -> m ()
baseTransformUpdateQos :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> Double -> Int64 -> Word64 -> m ()
baseTransformUpdateQos a
trans Double
proportion Int64
diff Word64
timestamp = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    let proportion' :: CDouble
proportion' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
proportion
    Ptr BaseTransform -> CDouble -> Int64 -> Word64 -> IO ()
gst_base_transform_update_qos Ptr BaseTransform
trans' CDouble
proportion' Int64
diff Word64
timestamp
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseTransformUpdateQosMethodInfo
instance (signature ~ (Double -> Int64 -> Word64 -> m ()), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformUpdateQosMethodInfo a signature where
    overloadedMethod = baseTransformUpdateQos

instance O.OverloadedMethodInfo BaseTransformUpdateQosMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformUpdateQos",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformUpdateQos"
        })


#endif

-- method BaseTransform::update_src_caps
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "trans"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseTransform" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseTransform"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "updated_caps"
--           , argType = TInterface Name { namespace = "Gst" , name = "Caps" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "An updated version of the srcpad caps to be pushed\ndownstream"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_transform_update_src_caps" gst_base_transform_update_src_caps :: 
    Ptr BaseTransform ->                    -- trans : TInterface (Name {namespace = "GstBase", name = "BaseTransform"})
    Ptr Gst.Caps.Caps ->                    -- updated_caps : TInterface (Name {namespace = "Gst", name = "Caps"})
    IO CInt

-- | Updates the srcpad caps and sends the caps downstream. This function
-- can be used by subclasses when they have already negotiated their caps
-- but found a change in them (or computed new information). This way,
-- they can notify downstream about that change without losing any
-- buffer.
-- 
-- /Since: 1.6/
baseTransformUpdateSrcCaps ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> Gst.Caps.Caps
    -- ^ /@updatedCaps@/: An updated version of the srcpad caps to be pushed
    -- downstream
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the caps could be sent downstream 'P.False' otherwise
baseTransformUpdateSrcCaps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseTransform a) =>
a -> Caps -> m Bool
baseTransformUpdateSrcCaps a
trans Caps
updatedCaps = 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 BaseTransform
trans' <- a -> IO (Ptr BaseTransform)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
trans
    Ptr Caps
updatedCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
updatedCaps
    CInt
result <- Ptr BaseTransform -> Ptr Caps -> IO CInt
gst_base_transform_update_src_caps Ptr BaseTransform
trans' Ptr Caps
updatedCaps'
    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
trans
    Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
updatedCaps
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseTransformUpdateSrcCapsMethodInfo
instance (signature ~ (Gst.Caps.Caps -> m Bool), MonadIO m, IsBaseTransform a) => O.OverloadedMethod BaseTransformUpdateSrcCapsMethodInfo a signature where
    overloadedMethod = baseTransformUpdateSrcCaps

instance O.OverloadedMethodInfo BaseTransformUpdateSrcCapsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstBase.Objects.BaseTransform.baseTransformUpdateSrcCaps",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstbase-1.0.25/docs/GI-GstBase-Objects-BaseTransform.html#v:baseTransformUpdateSrcCaps"
        })


#endif