{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- 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
-- ** Overloaded methods #method:Overloaded methods#

#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               ,


-- ** 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.GObject.Objects.Object as GObject.Object
import 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

-- | Convert 'BaseTransform' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue BaseTransform where
    toGValue :: BaseTransform -> IO GValue
toGValue BaseTransform
o = do
        GType
gtype <- IO GType
c_gst_base_transform_get_type
        BaseTransform -> (Ptr BaseTransform -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BaseTransform
o (GType
-> (GValue -> Ptr BaseTransform -> IO ())
-> Ptr BaseTransform
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr BaseTransform -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO BaseTransform
fromGValue GValue
gv = do
        Ptr BaseTransform
ptr <- GValue -> IO (Ptr BaseTransform)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr BaseTransform)
        (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
        
    

-- | 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 :: (MonadIO m, IsBaseTransform o) => o -> m BaseTransform
toBaseTransform :: o -> m BaseTransform
toBaseTransform = IO BaseTransform -> m BaseTransform
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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'
unsafeCastTo ManagedPtr BaseTransform -> BaseTransform
BaseTransform

#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 "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 "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 "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.MethodInfo 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

#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 :: o -> m Bool
getBaseTransformQos o
obj = 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
$ 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 :: o -> Bool -> m ()
setBaseTransformQos o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ 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 :: 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
$ 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
#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 = False
--           , 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\n#GstAllocationParams of @allocator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferEverything
--           }
--       ]
-- 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 to know the memory /@allocator@/
-- used by the base class and its /@params@/.
-- 
-- Unref the /@allocator@/ after use it.
baseTransformGetAllocator ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseTransform a) =>
    a
    -- ^ /@trans@/: a t'GI.GstBase.Objects.BaseTransform.BaseTransform'
    -> m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))
baseTransformGetAllocator :: a -> m (Allocator, AllocationParams)
baseTransformGetAllocator a
trans = IO (Allocator, AllocationParams) -> m (Allocator, AllocationParams)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Allocator, AllocationParams)
 -> m (Allocator, AllocationParams))
-> IO (Allocator, AllocationParams)
-> m (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
    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'
    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
    (Allocator, AllocationParams) -> IO (Allocator, AllocationParams)
forall (m :: * -> *) a. Monad m => a -> m a
return (Allocator
allocator'', AllocationParams
params')

#if defined(ENABLE_OVERLOADING)
data BaseTransformGetAllocatorMethodInfo
instance (signature ~ (m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))), MonadIO m, IsBaseTransform a) => O.MethodInfo BaseTransformGetAllocatorMethodInfo a signature where
    overloadedMethod = 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 Gst.BufferPool.BufferPool
    -- ^ __Returns:__ the instance of the t'GI.Gst.Objects.BufferPool.BufferPool' used
    -- by /@trans@/; free it after use it
baseTransformGetBufferPool :: a -> m BufferPool
baseTransformGetBufferPool a
trans = IO BufferPool -> m BufferPool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BufferPool -> m BufferPool) -> IO BufferPool -> m 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'
    Text -> Ptr BufferPool -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"baseTransformGetBufferPool" Ptr BufferPool
result
    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
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
trans
    BufferPool -> IO BufferPool
forall (m :: * -> *) a. Monad m => a -> m a
return BufferPool
result'

#if defined(ENABLE_OVERLOADING)
data BaseTransformGetBufferPoolMethodInfo
instance (signature ~ (m Gst.BufferPool.BufferPool), MonadIO m, IsBaseTransform a) => O.MethodInfo BaseTransformGetBufferPoolMethodInfo a signature where
    overloadedMethod = 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' is the transform is configured in in_place mode.
    -- 
    -- MT safe.
baseTransformIsInPlace :: 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.MethodInfo BaseTransformIsInPlaceMethodInfo a signature where
    overloadedMethod = 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' is the transform is configured in passthrough mode.
    -- 
    -- MT safe.
baseTransformIsPassthrough :: 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.MethodInfo BaseTransformIsPassthroughMethodInfo a signature where
    overloadedMethod = 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 :: 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.MethodInfo BaseTransformIsQosEnabledMethodInfo a signature where
    overloadedMethod = baseTransformIsQosEnabled

#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 :: 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.MethodInfo BaseTransformReconfigureSinkMethodInfo a signature where
    overloadedMethod = 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 :: 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.MethodInfo BaseTransformReconfigureSrcMethodInfo a signature where
    overloadedMethod = 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 :: 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.MethodInfo BaseTransformSetGapAwareMethodInfo a signature where
    overloadedMethod = 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 :: 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.MethodInfo BaseTransformSetInPlaceMethodInfo a signature where
    overloadedMethod = 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 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 :: 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.MethodInfo BaseTransformSetPassthroughMethodInfo a signature where
    overloadedMethod = 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 :: 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.MethodInfo BaseTransformSetPreferPassthroughMethodInfo a signature where
    overloadedMethod = 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 :: 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.MethodInfo BaseTransformSetQosEnabledMethodInfo a signature where
    overloadedMethod = 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 :: 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.MethodInfo BaseTransformUpdateQosMethodInfo a signature where
    overloadedMethod = 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 send 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 send downstream 'P.False' otherwise
baseTransformUpdateSrcCaps :: 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.MethodInfo BaseTransformUpdateSrcCapsMethodInfo a signature where
    overloadedMethod = baseTransformUpdateSrcCaps

#endif