{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- t'GI.GstBase.Objects.BaseSink.BaseSink' is the base class for sink elements in GStreamer, such as
-- xvimagesink or filesink. It is a layer on top of t'GI.Gst.Objects.Element.Element' that provides a
-- simplified interface to plugin writers. t'GI.GstBase.Objects.BaseSink.BaseSink' handles many details
-- for you, for example: preroll, clock synchronization, state changes,
-- activation in push or pull mode, and queries.
-- 
-- In most cases, when writing sink elements, there is no need to implement
-- class methods from t'GI.Gst.Objects.Element.Element' or to set functions on pads, because the
-- t'GI.GstBase.Objects.BaseSink.BaseSink' infrastructure should be sufficient.
-- 
-- t'GI.GstBase.Objects.BaseSink.BaseSink' provides support for exactly one sink pad, which should be
-- named \"sink\". A sink implementation (subclass of t'GI.GstBase.Objects.BaseSink.BaseSink') should
-- install a pad template in its class_init function, like so:
-- 
-- === /C code/
-- >
-- >static void
-- >my_element_class_init (GstMyElementClass *klass)
-- >{
-- >  GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
-- >
-- >  // sinktemplate should be a #GstStaticPadTemplate with direction
-- >  // %GST_PAD_SINK and name "sink"
-- >  gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate);
-- >
-- >  gst_element_class_set_static_metadata (gstelement_class,
-- >      "Sink name",
-- >      "Sink",
-- >      "My Sink element",
-- >      "The author <my.sink@my.email>");
-- >}
-- 
-- 
-- t'GI.GstBase.Objects.BaseSink.BaseSink' will handle the prerolling correctly. This means that it will
-- return 'GI.Gst.Enums.StateChangeReturnAsync' from a state change to PAUSED until the first
-- buffer arrives in this element. The base class will call the
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/preroll/@() vmethod with this preroll buffer and will then
-- commit the state change to the next asynchronously pending state.
-- 
-- When the element is set to PLAYING, t'GI.GstBase.Objects.BaseSink.BaseSink' will synchronise on the
-- clock using the times returned from t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/get_times/@(). If this
-- function returns 'GI.Gst.Constants.CLOCK_TIME_NONE' for the start time, no synchronisation
-- will be done. Synchronisation can be disabled entirely by setting the object
-- t'GI.GstBase.Objects.BaseSink.BaseSink':@/sync/@ property to 'P.False'.
-- 
-- After synchronisation the virtual method t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() will be
-- called. Subclasses should minimally implement this method.
-- 
-- Subclasses that synchronise on the clock in the t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@()
-- method are supported as well. These classes typically receive a buffer in
-- the render method and can then potentially block on the clock while
-- rendering. A typical example is an audiosink.
-- These subclasses can use 'GI.GstBase.Objects.BaseSink.baseSinkWaitPreroll' to perform the
-- blocking wait.
-- 
-- Upon receiving the EOS event in the PLAYING state, t'GI.GstBase.Objects.BaseSink.BaseSink' will wait
-- for the clock to reach the time indicated by the stop time of the last
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/get_times/@() call before posting an EOS message. When the
-- element receives EOS in PAUSED, preroll completes, the event is queued and an
-- EOS message is posted when going to PLAYING.
-- 
-- t'GI.GstBase.Objects.BaseSink.BaseSink' will internally use the 'GI.Gst.Enums.EventTypeSegment' events to schedule
-- synchronisation and clipping of buffers. Buffers that fall completely outside
-- of the current segment are dropped. Buffers that fall partially in the
-- segment are rendered (and prerolled). Subclasses should do any subbuffer
-- clipping themselves when needed.
-- 
-- t'GI.GstBase.Objects.BaseSink.BaseSink' will by default report the current playback position in
-- 'GI.Gst.Enums.FormatTime' based on the current clock time and segment information.
-- If no clock has been set on the element, the query will be forwarded
-- upstream.
-- 
-- The t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/set_caps/@() function will be called when the subclass
-- should configure itself to process a specific media type.
-- 
-- The t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/start/@() and t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/stop/@() virtual methods
-- will be called when resources should be allocated. Any
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/preroll/@(), t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() and
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/set_caps/@() function will be called between the
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/start/@() and t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/stop/@() calls.
-- 
-- The t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/event/@() virtual method will be called when an event is
-- received by t'GI.GstBase.Objects.BaseSink.BaseSink'. Normally this method should only be overridden by
-- very specific elements (such as file sinks) which need to handle the
-- newsegment event specially.
-- 
-- The t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/unlock/@() method is called when the elements should
-- unblock any blocking operations they perform in the
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method. This is mostly useful when the
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method performs a blocking write on a file
-- descriptor, for example.
-- 
-- The t'GI.GstBase.Objects.BaseSink.BaseSink':@/max-lateness/@ property affects how the sink deals with
-- buffers that arrive too late in the sink. A buffer arrives too late in the
-- sink when the presentation time (as a combination of the last segment, buffer
-- timestamp and element base_time) plus the duration is before the current
-- time of the clock.
-- If the frame is later than max-lateness, the sink will drop the buffer
-- without calling the render method.
-- This feature is disabled if sync is disabled, the
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/get_times/@() method does not return a valid start time or
-- max-lateness is set to -1 (the default).
-- Subclasses can use 'GI.GstBase.Objects.BaseSink.baseSinkSetMaxLateness' to configure the
-- max-lateness value.
-- 
-- The t'GI.GstBase.Objects.BaseSink.BaseSink':@/qos/@ property will enable the quality-of-service features of
-- the basesink which gather statistics about the real-time performance of the
-- clock synchronisation. For each buffer received in the sink, statistics are
-- gathered and a QOS event is sent upstream with these numbers. This
-- information can then be used by upstream elements to reduce their processing
-- rate, for example.
-- 
-- The t'GI.GstBase.Objects.BaseSink.BaseSink':@/async/@ property can be used to instruct the sink to never
-- perform an ASYNC state change. This feature is mostly usable when dealing
-- with non-synchronized streams or sparse streams.

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

module GI.GstBase.Objects.BaseSink
    ( 

-- * Exported types
    BaseSink(..)                            ,
    IsBaseSink                              ,
    toBaseSink                              ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveBaseSinkMethod                   ,
#endif


-- ** doPreroll #method:doPreroll#

#if defined(ENABLE_OVERLOADING)
    BaseSinkDoPrerollMethodInfo             ,
#endif
    baseSinkDoPreroll                       ,


-- ** getBlocksize #method:getBlocksize#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetBlocksizeMethodInfo          ,
#endif
    baseSinkGetBlocksize                    ,


-- ** getDropOutOfSegment #method:getDropOutOfSegment#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetDropOutOfSegmentMethodInfo   ,
#endif
    baseSinkGetDropOutOfSegment             ,


-- ** getLastSample #method:getLastSample#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetLastSampleMethodInfo         ,
#endif
    baseSinkGetLastSample                   ,


-- ** getLatency #method:getLatency#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetLatencyMethodInfo            ,
#endif
    baseSinkGetLatency                      ,


-- ** getMaxBitrate #method:getMaxBitrate#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetMaxBitrateMethodInfo         ,
#endif
    baseSinkGetMaxBitrate                   ,


-- ** getMaxLateness #method:getMaxLateness#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetMaxLatenessMethodInfo        ,
#endif
    baseSinkGetMaxLateness                  ,


-- ** getProcessingDeadline #method:getProcessingDeadline#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetProcessingDeadlineMethodInfo ,
#endif
    baseSinkGetProcessingDeadline           ,


-- ** getRenderDelay #method:getRenderDelay#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetRenderDelayMethodInfo        ,
#endif
    baseSinkGetRenderDelay                  ,


-- ** getSync #method:getSync#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetSyncMethodInfo               ,
#endif
    baseSinkGetSync                         ,


-- ** getThrottleTime #method:getThrottleTime#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetThrottleTimeMethodInfo       ,
#endif
    baseSinkGetThrottleTime                 ,


-- ** getTsOffset #method:getTsOffset#

#if defined(ENABLE_OVERLOADING)
    BaseSinkGetTsOffsetMethodInfo           ,
#endif
    baseSinkGetTsOffset                     ,


-- ** isAsyncEnabled #method:isAsyncEnabled#

#if defined(ENABLE_OVERLOADING)
    BaseSinkIsAsyncEnabledMethodInfo        ,
#endif
    baseSinkIsAsyncEnabled                  ,


-- ** isLastSampleEnabled #method:isLastSampleEnabled#

#if defined(ENABLE_OVERLOADING)
    BaseSinkIsLastSampleEnabledMethodInfo   ,
#endif
    baseSinkIsLastSampleEnabled             ,


-- ** isQosEnabled #method:isQosEnabled#

#if defined(ENABLE_OVERLOADING)
    BaseSinkIsQosEnabledMethodInfo          ,
#endif
    baseSinkIsQosEnabled                    ,


-- ** queryLatency #method:queryLatency#

#if defined(ENABLE_OVERLOADING)
    BaseSinkQueryLatencyMethodInfo          ,
#endif
    baseSinkQueryLatency                    ,


-- ** setAsyncEnabled #method:setAsyncEnabled#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetAsyncEnabledMethodInfo       ,
#endif
    baseSinkSetAsyncEnabled                 ,


-- ** setBlocksize #method:setBlocksize#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetBlocksizeMethodInfo          ,
#endif
    baseSinkSetBlocksize                    ,


-- ** setDropOutOfSegment #method:setDropOutOfSegment#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetDropOutOfSegmentMethodInfo   ,
#endif
    baseSinkSetDropOutOfSegment             ,


-- ** setLastSampleEnabled #method:setLastSampleEnabled#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetLastSampleEnabledMethodInfo  ,
#endif
    baseSinkSetLastSampleEnabled            ,


-- ** setMaxBitrate #method:setMaxBitrate#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetMaxBitrateMethodInfo         ,
#endif
    baseSinkSetMaxBitrate                   ,


-- ** setMaxLateness #method:setMaxLateness#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetMaxLatenessMethodInfo        ,
#endif
    baseSinkSetMaxLateness                  ,


-- ** setProcessingDeadline #method:setProcessingDeadline#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetProcessingDeadlineMethodInfo ,
#endif
    baseSinkSetProcessingDeadline           ,


-- ** setQosEnabled #method:setQosEnabled#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetQosEnabledMethodInfo         ,
#endif
    baseSinkSetQosEnabled                   ,


-- ** setRenderDelay #method:setRenderDelay#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetRenderDelayMethodInfo        ,
#endif
    baseSinkSetRenderDelay                  ,


-- ** setSync #method:setSync#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetSyncMethodInfo               ,
#endif
    baseSinkSetSync                         ,


-- ** setThrottleTime #method:setThrottleTime#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetThrottleTimeMethodInfo       ,
#endif
    baseSinkSetThrottleTime                 ,


-- ** setTsOffset #method:setTsOffset#

#if defined(ENABLE_OVERLOADING)
    BaseSinkSetTsOffsetMethodInfo           ,
#endif
    baseSinkSetTsOffset                     ,


-- ** wait #method:wait#

#if defined(ENABLE_OVERLOADING)
    BaseSinkWaitMethodInfo                  ,
#endif
    baseSinkWait                            ,


-- ** waitClock #method:waitClock#

#if defined(ENABLE_OVERLOADING)
    BaseSinkWaitClockMethodInfo             ,
#endif
    baseSinkWaitClock                       ,


-- ** waitPreroll #method:waitPreroll#

#if defined(ENABLE_OVERLOADING)
    BaseSinkWaitPrerollMethodInfo           ,
#endif
    baseSinkWaitPreroll                     ,




 -- * Properties
-- ** async #attr:async#
-- | If set to 'P.True', the basesink will perform asynchronous state changes.
-- When set to 'P.False', the sink will not signal the parent when it prerolls.
-- Use this option when dealing with sparse streams or when synchronisation is
-- not required.

#if defined(ENABLE_OVERLOADING)
    BaseSinkAsyncPropertyInfo               ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkAsync                           ,
#endif
    constructBaseSinkAsync                  ,
    getBaseSinkAsync                        ,
    setBaseSinkAsync                        ,


-- ** blocksize #attr:blocksize#
-- | The amount of bytes to pull when operating in pull mode.

#if defined(ENABLE_OVERLOADING)
    BaseSinkBlocksizePropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkBlocksize                       ,
#endif
    constructBaseSinkBlocksize              ,
    getBaseSinkBlocksize                    ,
    setBaseSinkBlocksize                    ,


-- ** enableLastSample #attr:enableLastSample#
-- | Enable the last-sample property. If 'P.False', basesink doesn\'t keep a
-- reference to the last buffer arrived and the last-sample property is always
-- set to 'P.Nothing'. This can be useful if you need buffers to be released as soon
-- as possible, eg. if you\'re using a buffer pool.

#if defined(ENABLE_OVERLOADING)
    BaseSinkEnableLastSamplePropertyInfo    ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkEnableLastSample                ,
#endif
    constructBaseSinkEnableLastSample       ,
    getBaseSinkEnableLastSample             ,
    setBaseSinkEnableLastSample             ,


-- ** lastSample #attr:lastSample#
-- | The last buffer that arrived in the sink and was used for preroll or for
-- rendering. This property can be used to generate thumbnails. This property
-- can be 'P.Nothing' when the sink has not yet received a buffer.

#if defined(ENABLE_OVERLOADING)
    BaseSinkLastSamplePropertyInfo          ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkLastSample                      ,
#endif
    getBaseSinkLastSample                   ,


-- ** maxBitrate #attr:maxBitrate#
-- | Control the maximum amount of bits that will be rendered per second.
-- Setting this property to a value bigger than 0 will make the sink delay
-- rendering of the buffers when it would exceed to max-bitrate.
-- 
-- /Since: 1.2/

#if defined(ENABLE_OVERLOADING)
    BaseSinkMaxBitratePropertyInfo          ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkMaxBitrate                      ,
#endif
    constructBaseSinkMaxBitrate             ,
    getBaseSinkMaxBitrate                   ,
    setBaseSinkMaxBitrate                   ,


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

#if defined(ENABLE_OVERLOADING)
    BaseSinkMaxLatenessPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkMaxLateness                     ,
#endif
    constructBaseSinkMaxLateness            ,
    getBaseSinkMaxLateness                  ,
    setBaseSinkMaxLateness                  ,


-- ** processingDeadline #attr:processingDeadline#
-- | Maximum amount of time (in nanoseconds) that the pipeline can take
-- for processing the buffer. This is added to the latency of live
-- pipelines.
-- 
-- /Since: 1.16/

#if defined(ENABLE_OVERLOADING)
    BaseSinkProcessingDeadlinePropertyInfo  ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkProcessingDeadline              ,
#endif
    constructBaseSinkProcessingDeadline     ,
    getBaseSinkProcessingDeadline           ,
    setBaseSinkProcessingDeadline           ,


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

#if defined(ENABLE_OVERLOADING)
    BaseSinkQosPropertyInfo                 ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkQos                             ,
#endif
    constructBaseSinkQos                    ,
    getBaseSinkQos                          ,
    setBaseSinkQos                          ,


-- ** renderDelay #attr:renderDelay#
-- | The additional delay between synchronisation and actual rendering of the
-- media. This property will add additional latency to the device in order to
-- make other sinks compensate for the delay.

#if defined(ENABLE_OVERLOADING)
    BaseSinkRenderDelayPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkRenderDelay                     ,
#endif
    constructBaseSinkRenderDelay            ,
    getBaseSinkRenderDelay                  ,
    setBaseSinkRenderDelay                  ,


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

#if defined(ENABLE_OVERLOADING)
    BaseSinkSyncPropertyInfo                ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkSync                            ,
#endif
    constructBaseSinkSync                   ,
    getBaseSinkSync                         ,
    setBaseSinkSync                         ,


-- ** throttleTime #attr:throttleTime#
-- | The time to insert between buffers. This property can be used to control
-- the maximum amount of buffers per second to render. Setting this property
-- to a value bigger than 0 will make the sink create THROTTLE QoS events.

#if defined(ENABLE_OVERLOADING)
    BaseSinkThrottleTimePropertyInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkThrottleTime                    ,
#endif
    constructBaseSinkThrottleTime           ,
    getBaseSinkThrottleTime                 ,
    setBaseSinkThrottleTime                 ,


-- ** tsOffset #attr:tsOffset#
-- | Controls the final synchronisation, a negative value will render the buffer
-- earlier while a positive value delays playback. This property can be
-- used to fix synchronisation in bad files.

#if defined(ENABLE_OVERLOADING)
    BaseSinkTsOffsetPropertyInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    baseSinkTsOffset                        ,
#endif
    constructBaseSinkTsOffset               ,
    getBaseSinkTsOffset                     ,
    setBaseSinkTsOffset                     ,




    ) 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.Enums as Gst.Enums
import qualified GI.Gst.Objects.Element as Gst.Element
import qualified GI.Gst.Objects.Object as Gst.Object
import qualified GI.Gst.Structs.MiniObject as Gst.MiniObject
import qualified GI.Gst.Structs.Sample as Gst.Sample

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

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

foreign import ccall "gst_base_sink_get_type"
    c_gst_base_sink_get_type :: IO B.Types.GType

instance B.Types.TypedObject BaseSink where
    glibType :: IO GType
glibType = IO GType
c_gst_base_sink_get_type

instance B.Types.GObject BaseSink

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

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

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

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

#if defined(ENABLE_OVERLOADING)
type family ResolveBaseSinkMethod (t :: Symbol) (o :: *) :: * where
    ResolveBaseSinkMethod "abortState" o = Gst.Element.ElementAbortStateMethodInfo
    ResolveBaseSinkMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
    ResolveBaseSinkMethod "addPad" o = Gst.Element.ElementAddPadMethodInfo
    ResolveBaseSinkMethod "addPropertyDeepNotifyWatch" o = Gst.Element.ElementAddPropertyDeepNotifyWatchMethodInfo
    ResolveBaseSinkMethod "addPropertyNotifyWatch" o = Gst.Element.ElementAddPropertyNotifyWatchMethodInfo
    ResolveBaseSinkMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveBaseSinkMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveBaseSinkMethod "callAsync" o = Gst.Element.ElementCallAsyncMethodInfo
    ResolveBaseSinkMethod "changeState" o = Gst.Element.ElementChangeStateMethodInfo
    ResolveBaseSinkMethod "continueState" o = Gst.Element.ElementContinueStateMethodInfo
    ResolveBaseSinkMethod "createAllPads" o = Gst.Element.ElementCreateAllPadsMethodInfo
    ResolveBaseSinkMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
    ResolveBaseSinkMethod "doPreroll" o = BaseSinkDoPrerollMethodInfo
    ResolveBaseSinkMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveBaseSinkMethod "foreachPad" o = Gst.Element.ElementForeachPadMethodInfo
    ResolveBaseSinkMethod "foreachSinkPad" o = Gst.Element.ElementForeachSinkPadMethodInfo
    ResolveBaseSinkMethod "foreachSrcPad" o = Gst.Element.ElementForeachSrcPadMethodInfo
    ResolveBaseSinkMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveBaseSinkMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveBaseSinkMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
    ResolveBaseSinkMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
    ResolveBaseSinkMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
    ResolveBaseSinkMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
    ResolveBaseSinkMethod "isAsyncEnabled" o = BaseSinkIsAsyncEnabledMethodInfo
    ResolveBaseSinkMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveBaseSinkMethod "isLastSampleEnabled" o = BaseSinkIsLastSampleEnabledMethodInfo
    ResolveBaseSinkMethod "isLockedState" o = Gst.Element.ElementIsLockedStateMethodInfo
    ResolveBaseSinkMethod "isQosEnabled" o = BaseSinkIsQosEnabledMethodInfo
    ResolveBaseSinkMethod "iteratePads" o = Gst.Element.ElementIteratePadsMethodInfo
    ResolveBaseSinkMethod "iterateSinkPads" o = Gst.Element.ElementIterateSinkPadsMethodInfo
    ResolveBaseSinkMethod "iterateSrcPads" o = Gst.Element.ElementIterateSrcPadsMethodInfo
    ResolveBaseSinkMethod "link" o = Gst.Element.ElementLinkMethodInfo
    ResolveBaseSinkMethod "linkFiltered" o = Gst.Element.ElementLinkFilteredMethodInfo
    ResolveBaseSinkMethod "linkPads" o = Gst.Element.ElementLinkPadsMethodInfo
    ResolveBaseSinkMethod "linkPadsFiltered" o = Gst.Element.ElementLinkPadsFilteredMethodInfo
    ResolveBaseSinkMethod "linkPadsFull" o = Gst.Element.ElementLinkPadsFullMethodInfo
    ResolveBaseSinkMethod "lostState" o = Gst.Element.ElementLostStateMethodInfo
    ResolveBaseSinkMethod "messageFull" o = Gst.Element.ElementMessageFullMethodInfo
    ResolveBaseSinkMethod "messageFullWithDetails" o = Gst.Element.ElementMessageFullWithDetailsMethodInfo
    ResolveBaseSinkMethod "noMorePads" o = Gst.Element.ElementNoMorePadsMethodInfo
    ResolveBaseSinkMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveBaseSinkMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveBaseSinkMethod "postMessage" o = Gst.Element.ElementPostMessageMethodInfo
    ResolveBaseSinkMethod "provideClock" o = Gst.Element.ElementProvideClockMethodInfo
    ResolveBaseSinkMethod "query" o = Gst.Element.ElementQueryMethodInfo
    ResolveBaseSinkMethod "queryConvert" o = Gst.Element.ElementQueryConvertMethodInfo
    ResolveBaseSinkMethod "queryDuration" o = Gst.Element.ElementQueryDurationMethodInfo
    ResolveBaseSinkMethod "queryLatency" o = BaseSinkQueryLatencyMethodInfo
    ResolveBaseSinkMethod "queryPosition" o = Gst.Element.ElementQueryPositionMethodInfo
    ResolveBaseSinkMethod "ref" o = Gst.Object.ObjectRefMethodInfo
    ResolveBaseSinkMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveBaseSinkMethod "releaseRequestPad" o = Gst.Element.ElementReleaseRequestPadMethodInfo
    ResolveBaseSinkMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
    ResolveBaseSinkMethod "removePad" o = Gst.Element.ElementRemovePadMethodInfo
    ResolveBaseSinkMethod "removePropertyNotifyWatch" o = Gst.Element.ElementRemovePropertyNotifyWatchMethodInfo
    ResolveBaseSinkMethod "requestPad" o = Gst.Element.ElementRequestPadMethodInfo
    ResolveBaseSinkMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveBaseSinkMethod "seek" o = Gst.Element.ElementSeekMethodInfo
    ResolveBaseSinkMethod "seekSimple" o = Gst.Element.ElementSeekSimpleMethodInfo
    ResolveBaseSinkMethod "sendEvent" o = Gst.Element.ElementSendEventMethodInfo
    ResolveBaseSinkMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveBaseSinkMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveBaseSinkMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
    ResolveBaseSinkMethod "syncStateWithParent" o = Gst.Element.ElementSyncStateWithParentMethodInfo
    ResolveBaseSinkMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
    ResolveBaseSinkMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveBaseSinkMethod "unlink" o = Gst.Element.ElementUnlinkMethodInfo
    ResolveBaseSinkMethod "unlinkPads" o = Gst.Element.ElementUnlinkPadsMethodInfo
    ResolveBaseSinkMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
    ResolveBaseSinkMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
    ResolveBaseSinkMethod "wait" o = BaseSinkWaitMethodInfo
    ResolveBaseSinkMethod "waitClock" o = BaseSinkWaitClockMethodInfo
    ResolveBaseSinkMethod "waitPreroll" o = BaseSinkWaitPrerollMethodInfo
    ResolveBaseSinkMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveBaseSinkMethod "getBaseTime" o = Gst.Element.ElementGetBaseTimeMethodInfo
    ResolveBaseSinkMethod "getBlocksize" o = BaseSinkGetBlocksizeMethodInfo
    ResolveBaseSinkMethod "getBus" o = Gst.Element.ElementGetBusMethodInfo
    ResolveBaseSinkMethod "getClock" o = Gst.Element.ElementGetClockMethodInfo
    ResolveBaseSinkMethod "getCompatiblePad" o = Gst.Element.ElementGetCompatiblePadMethodInfo
    ResolveBaseSinkMethod "getCompatiblePadTemplate" o = Gst.Element.ElementGetCompatiblePadTemplateMethodInfo
    ResolveBaseSinkMethod "getContext" o = Gst.Element.ElementGetContextMethodInfo
    ResolveBaseSinkMethod "getContextUnlocked" o = Gst.Element.ElementGetContextUnlockedMethodInfo
    ResolveBaseSinkMethod "getContexts" o = Gst.Element.ElementGetContextsMethodInfo
    ResolveBaseSinkMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
    ResolveBaseSinkMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
    ResolveBaseSinkMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveBaseSinkMethod "getDropOutOfSegment" o = BaseSinkGetDropOutOfSegmentMethodInfo
    ResolveBaseSinkMethod "getFactory" o = Gst.Element.ElementGetFactoryMethodInfo
    ResolveBaseSinkMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
    ResolveBaseSinkMethod "getLastSample" o = BaseSinkGetLastSampleMethodInfo
    ResolveBaseSinkMethod "getLatency" o = BaseSinkGetLatencyMethodInfo
    ResolveBaseSinkMethod "getMaxBitrate" o = BaseSinkGetMaxBitrateMethodInfo
    ResolveBaseSinkMethod "getMaxLateness" o = BaseSinkGetMaxLatenessMethodInfo
    ResolveBaseSinkMethod "getMetadata" o = Gst.Element.ElementGetMetadataMethodInfo
    ResolveBaseSinkMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
    ResolveBaseSinkMethod "getPadTemplate" o = Gst.Element.ElementGetPadTemplateMethodInfo
    ResolveBaseSinkMethod "getPadTemplateList" o = Gst.Element.ElementGetPadTemplateListMethodInfo
    ResolveBaseSinkMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
    ResolveBaseSinkMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
    ResolveBaseSinkMethod "getProcessingDeadline" o = BaseSinkGetProcessingDeadlineMethodInfo
    ResolveBaseSinkMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveBaseSinkMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveBaseSinkMethod "getRenderDelay" o = BaseSinkGetRenderDelayMethodInfo
    ResolveBaseSinkMethod "getRequestPad" o = Gst.Element.ElementGetRequestPadMethodInfo
    ResolveBaseSinkMethod "getStartTime" o = Gst.Element.ElementGetStartTimeMethodInfo
    ResolveBaseSinkMethod "getState" o = Gst.Element.ElementGetStateMethodInfo
    ResolveBaseSinkMethod "getStaticPad" o = Gst.Element.ElementGetStaticPadMethodInfo
    ResolveBaseSinkMethod "getSync" o = BaseSinkGetSyncMethodInfo
    ResolveBaseSinkMethod "getThrottleTime" o = BaseSinkGetThrottleTimeMethodInfo
    ResolveBaseSinkMethod "getTsOffset" o = BaseSinkGetTsOffsetMethodInfo
    ResolveBaseSinkMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
    ResolveBaseSinkMethod "setAsyncEnabled" o = BaseSinkSetAsyncEnabledMethodInfo
    ResolveBaseSinkMethod "setBaseTime" o = Gst.Element.ElementSetBaseTimeMethodInfo
    ResolveBaseSinkMethod "setBlocksize" o = BaseSinkSetBlocksizeMethodInfo
    ResolveBaseSinkMethod "setBus" o = Gst.Element.ElementSetBusMethodInfo
    ResolveBaseSinkMethod "setClock" o = Gst.Element.ElementSetClockMethodInfo
    ResolveBaseSinkMethod "setContext" o = Gst.Element.ElementSetContextMethodInfo
    ResolveBaseSinkMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
    ResolveBaseSinkMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
    ResolveBaseSinkMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
    ResolveBaseSinkMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveBaseSinkMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveBaseSinkMethod "setDropOutOfSegment" o = BaseSinkSetDropOutOfSegmentMethodInfo
    ResolveBaseSinkMethod "setLastSampleEnabled" o = BaseSinkSetLastSampleEnabledMethodInfo
    ResolveBaseSinkMethod "setLockedState" o = Gst.Element.ElementSetLockedStateMethodInfo
    ResolveBaseSinkMethod "setMaxBitrate" o = BaseSinkSetMaxBitrateMethodInfo
    ResolveBaseSinkMethod "setMaxLateness" o = BaseSinkSetMaxLatenessMethodInfo
    ResolveBaseSinkMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
    ResolveBaseSinkMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
    ResolveBaseSinkMethod "setProcessingDeadline" o = BaseSinkSetProcessingDeadlineMethodInfo
    ResolveBaseSinkMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveBaseSinkMethod "setQosEnabled" o = BaseSinkSetQosEnabledMethodInfo
    ResolveBaseSinkMethod "setRenderDelay" o = BaseSinkSetRenderDelayMethodInfo
    ResolveBaseSinkMethod "setStartTime" o = Gst.Element.ElementSetStartTimeMethodInfo
    ResolveBaseSinkMethod "setState" o = Gst.Element.ElementSetStateMethodInfo
    ResolveBaseSinkMethod "setSync" o = BaseSinkSetSyncMethodInfo
    ResolveBaseSinkMethod "setThrottleTime" o = BaseSinkSetThrottleTimeMethodInfo
    ResolveBaseSinkMethod "setTsOffset" o = BaseSinkSetTsOffsetMethodInfo
    ResolveBaseSinkMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveBaseSinkMethod t BaseSink, O.MethodInfo info BaseSink p) => OL.IsLabel t (BaseSink -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

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

-- | Get the value of the “@async@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #async
-- @
getBaseSinkAsync :: (MonadIO m, IsBaseSink o) => o -> m Bool
getBaseSinkAsync :: o -> m Bool
getBaseSinkAsync 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
"async"

-- | Set the value of the “@async@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #async 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkAsync :: (MonadIO m, IsBaseSink o) => o -> Bool -> m ()
setBaseSinkAsync :: o -> Bool -> m ()
setBaseSinkAsync 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
"async" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@async@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkAsync :: (IsBaseSink o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructBaseSinkAsync :: Bool -> m (GValueConstruct o)
constructBaseSinkAsync 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
"async" Bool
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkAsyncPropertyInfo
instance AttrInfo BaseSinkAsyncPropertyInfo where
    type AttrAllowedOps BaseSinkAsyncPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkAsyncPropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkAsyncPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint BaseSinkAsyncPropertyInfo = (~) Bool
    type AttrTransferType BaseSinkAsyncPropertyInfo = Bool
    type AttrGetType BaseSinkAsyncPropertyInfo = Bool
    type AttrLabel BaseSinkAsyncPropertyInfo = "async"
    type AttrOrigin BaseSinkAsyncPropertyInfo = BaseSink
    attrGet = getBaseSinkAsync
    attrSet = setBaseSinkAsync
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkAsync
    attrClear = undefined
#endif

-- VVV Prop "blocksize"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

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

-- | Set the value of the “@blocksize@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #blocksize 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkBlocksize :: (MonadIO m, IsBaseSink o) => o -> Word32 -> m ()
setBaseSinkBlocksize :: o -> Word32 -> m ()
setBaseSinkBlocksize o
obj Word32
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 -> Word32 -> IO ()
forall a. GObject a => a -> String -> Word32 -> IO ()
B.Properties.setObjectPropertyUInt32 o
obj String
"blocksize" Word32
val

-- | Construct a `GValueConstruct` with valid value for the “@blocksize@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkBlocksize :: (IsBaseSink o, MIO.MonadIO m) => Word32 -> m (GValueConstruct o)
constructBaseSinkBlocksize :: Word32 -> m (GValueConstruct o)
constructBaseSinkBlocksize Word32
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 -> Word32 -> IO (GValueConstruct o)
forall o. String -> Word32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt32 String
"blocksize" Word32
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkBlocksizePropertyInfo
instance AttrInfo BaseSinkBlocksizePropertyInfo where
    type AttrAllowedOps BaseSinkBlocksizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkBlocksizePropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkBlocksizePropertyInfo = (~) Word32
    type AttrTransferTypeConstraint BaseSinkBlocksizePropertyInfo = (~) Word32
    type AttrTransferType BaseSinkBlocksizePropertyInfo = Word32
    type AttrGetType BaseSinkBlocksizePropertyInfo = Word32
    type AttrLabel BaseSinkBlocksizePropertyInfo = "blocksize"
    type AttrOrigin BaseSinkBlocksizePropertyInfo = BaseSink
    attrGet = getBaseSinkBlocksize
    attrSet = setBaseSinkBlocksize
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkBlocksize
    attrClear = undefined
#endif

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

-- | Get the value of the “@enable-last-sample@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #enableLastSample
-- @
getBaseSinkEnableLastSample :: (MonadIO m, IsBaseSink o) => o -> m Bool
getBaseSinkEnableLastSample :: o -> m Bool
getBaseSinkEnableLastSample 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
"enable-last-sample"

-- | Set the value of the “@enable-last-sample@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #enableLastSample 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkEnableLastSample :: (MonadIO m, IsBaseSink o) => o -> Bool -> m ()
setBaseSinkEnableLastSample :: o -> Bool -> m ()
setBaseSinkEnableLastSample 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
"enable-last-sample" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@enable-last-sample@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkEnableLastSample :: (IsBaseSink o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructBaseSinkEnableLastSample :: Bool -> m (GValueConstruct o)
constructBaseSinkEnableLastSample 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
"enable-last-sample" Bool
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkEnableLastSamplePropertyInfo
instance AttrInfo BaseSinkEnableLastSamplePropertyInfo where
    type AttrAllowedOps BaseSinkEnableLastSamplePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkEnableLastSamplePropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkEnableLastSamplePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint BaseSinkEnableLastSamplePropertyInfo = (~) Bool
    type AttrTransferType BaseSinkEnableLastSamplePropertyInfo = Bool
    type AttrGetType BaseSinkEnableLastSamplePropertyInfo = Bool
    type AttrLabel BaseSinkEnableLastSamplePropertyInfo = "enable-last-sample"
    type AttrOrigin BaseSinkEnableLastSamplePropertyInfo = BaseSink
    attrGet = getBaseSinkEnableLastSample
    attrSet = setBaseSinkEnableLastSample
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkEnableLastSample
    attrClear = undefined
#endif

-- VVV Prop "last-sample"
   -- Type: TInterface (Name {namespace = "Gst", name = "Sample"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@last-sample@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #lastSample
-- @
getBaseSinkLastSample :: (MonadIO m, IsBaseSink o) => o -> m (Maybe Gst.Sample.Sample)
getBaseSinkLastSample :: o -> m (Maybe Sample)
getBaseSinkLastSample o
obj = IO (Maybe Sample) -> m (Maybe Sample)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Sample) -> m (Maybe Sample))
-> IO (Maybe Sample) -> m (Maybe Sample)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Sample -> Sample) -> IO (Maybe Sample)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"last-sample" ManagedPtr Sample -> Sample
Gst.Sample.Sample

#if defined(ENABLE_OVERLOADING)
data BaseSinkLastSamplePropertyInfo
instance AttrInfo BaseSinkLastSamplePropertyInfo where
    type AttrAllowedOps BaseSinkLastSamplePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint BaseSinkLastSamplePropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkLastSamplePropertyInfo = (~) ()
    type AttrTransferTypeConstraint BaseSinkLastSamplePropertyInfo = (~) ()
    type AttrTransferType BaseSinkLastSamplePropertyInfo = ()
    type AttrGetType BaseSinkLastSamplePropertyInfo = (Maybe Gst.Sample.Sample)
    type AttrLabel BaseSinkLastSamplePropertyInfo = "last-sample"
    type AttrOrigin BaseSinkLastSamplePropertyInfo = BaseSink
    attrGet = getBaseSinkLastSample
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "max-bitrate"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@max-bitrate@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #maxBitrate
-- @
getBaseSinkMaxBitrate :: (MonadIO m, IsBaseSink o) => o -> m Word64
getBaseSinkMaxBitrate :: o -> m Word64
getBaseSinkMaxBitrate o
obj = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word64
forall a. GObject a => a -> String -> IO Word64
B.Properties.getObjectPropertyUInt64 o
obj String
"max-bitrate"

-- | Set the value of the “@max-bitrate@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #maxBitrate 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkMaxBitrate :: (MonadIO m, IsBaseSink o) => o -> Word64 -> m ()
setBaseSinkMaxBitrate :: o -> Word64 -> m ()
setBaseSinkMaxBitrate o
obj Word64
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 -> Word64 -> IO ()
forall a. GObject a => a -> String -> Word64 -> IO ()
B.Properties.setObjectPropertyUInt64 o
obj String
"max-bitrate" Word64
val

-- | Construct a `GValueConstruct` with valid value for the “@max-bitrate@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkMaxBitrate :: (IsBaseSink o, MIO.MonadIO m) => Word64 -> m (GValueConstruct o)
constructBaseSinkMaxBitrate :: Word64 -> m (GValueConstruct o)
constructBaseSinkMaxBitrate Word64
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 -> Word64 -> IO (GValueConstruct o)
forall o. String -> Word64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt64 String
"max-bitrate" Word64
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkMaxBitratePropertyInfo
instance AttrInfo BaseSinkMaxBitratePropertyInfo where
    type AttrAllowedOps BaseSinkMaxBitratePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkMaxBitratePropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkMaxBitratePropertyInfo = (~) Word64
    type AttrTransferTypeConstraint BaseSinkMaxBitratePropertyInfo = (~) Word64
    type AttrTransferType BaseSinkMaxBitratePropertyInfo = Word64
    type AttrGetType BaseSinkMaxBitratePropertyInfo = Word64
    type AttrLabel BaseSinkMaxBitratePropertyInfo = "max-bitrate"
    type AttrOrigin BaseSinkMaxBitratePropertyInfo = BaseSink
    attrGet = getBaseSinkMaxBitrate
    attrSet = setBaseSinkMaxBitrate
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkMaxBitrate
    attrClear = undefined
#endif

-- VVV Prop "max-lateness"
   -- Type: TBasicType TInt64
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@max-lateness@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #maxLateness
-- @
getBaseSinkMaxLateness :: (MonadIO m, IsBaseSink o) => o -> m Int64
getBaseSinkMaxLateness :: o -> m Int64
getBaseSinkMaxLateness o
obj = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int64
forall a. GObject a => a -> String -> IO Int64
B.Properties.getObjectPropertyInt64 o
obj String
"max-lateness"

-- | Set the value of the “@max-lateness@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #maxLateness 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkMaxLateness :: (MonadIO m, IsBaseSink o) => o -> Int64 -> m ()
setBaseSinkMaxLateness :: o -> Int64 -> m ()
setBaseSinkMaxLateness o
obj Int64
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 -> Int64 -> IO ()
forall a. GObject a => a -> String -> Int64 -> IO ()
B.Properties.setObjectPropertyInt64 o
obj String
"max-lateness" Int64
val

-- | Construct a `GValueConstruct` with valid value for the “@max-lateness@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkMaxLateness :: (IsBaseSink o, MIO.MonadIO m) => Int64 -> m (GValueConstruct o)
constructBaseSinkMaxLateness :: Int64 -> m (GValueConstruct o)
constructBaseSinkMaxLateness Int64
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 -> Int64 -> IO (GValueConstruct o)
forall o. String -> Int64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt64 String
"max-lateness" Int64
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkMaxLatenessPropertyInfo
instance AttrInfo BaseSinkMaxLatenessPropertyInfo where
    type AttrAllowedOps BaseSinkMaxLatenessPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkMaxLatenessPropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkMaxLatenessPropertyInfo = (~) Int64
    type AttrTransferTypeConstraint BaseSinkMaxLatenessPropertyInfo = (~) Int64
    type AttrTransferType BaseSinkMaxLatenessPropertyInfo = Int64
    type AttrGetType BaseSinkMaxLatenessPropertyInfo = Int64
    type AttrLabel BaseSinkMaxLatenessPropertyInfo = "max-lateness"
    type AttrOrigin BaseSinkMaxLatenessPropertyInfo = BaseSink
    attrGet = getBaseSinkMaxLateness
    attrSet = setBaseSinkMaxLateness
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkMaxLateness
    attrClear = undefined
#endif

-- VVV Prop "processing-deadline"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@processing-deadline@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #processingDeadline
-- @
getBaseSinkProcessingDeadline :: (MonadIO m, IsBaseSink o) => o -> m Word64
getBaseSinkProcessingDeadline :: o -> m Word64
getBaseSinkProcessingDeadline o
obj = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word64
forall a. GObject a => a -> String -> IO Word64
B.Properties.getObjectPropertyUInt64 o
obj String
"processing-deadline"

-- | Set the value of the “@processing-deadline@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #processingDeadline 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkProcessingDeadline :: (MonadIO m, IsBaseSink o) => o -> Word64 -> m ()
setBaseSinkProcessingDeadline :: o -> Word64 -> m ()
setBaseSinkProcessingDeadline o
obj Word64
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 -> Word64 -> IO ()
forall a. GObject a => a -> String -> Word64 -> IO ()
B.Properties.setObjectPropertyUInt64 o
obj String
"processing-deadline" Word64
val

-- | Construct a `GValueConstruct` with valid value for the “@processing-deadline@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkProcessingDeadline :: (IsBaseSink o, MIO.MonadIO m) => Word64 -> m (GValueConstruct o)
constructBaseSinkProcessingDeadline :: Word64 -> m (GValueConstruct o)
constructBaseSinkProcessingDeadline Word64
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 -> Word64 -> IO (GValueConstruct o)
forall o. String -> Word64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt64 String
"processing-deadline" Word64
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkProcessingDeadlinePropertyInfo
instance AttrInfo BaseSinkProcessingDeadlinePropertyInfo where
    type AttrAllowedOps BaseSinkProcessingDeadlinePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkProcessingDeadlinePropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkProcessingDeadlinePropertyInfo = (~) Word64
    type AttrTransferTypeConstraint BaseSinkProcessingDeadlinePropertyInfo = (~) Word64
    type AttrTransferType BaseSinkProcessingDeadlinePropertyInfo = Word64
    type AttrGetType BaseSinkProcessingDeadlinePropertyInfo = Word64
    type AttrLabel BaseSinkProcessingDeadlinePropertyInfo = "processing-deadline"
    type AttrOrigin BaseSinkProcessingDeadlinePropertyInfo = BaseSink
    attrGet = getBaseSinkProcessingDeadline
    attrSet = setBaseSinkProcessingDeadline
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkProcessingDeadline
    attrClear = undefined
#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' baseSink #qos
-- @
getBaseSinkQos :: (MonadIO m, IsBaseSink o) => o -> m Bool
getBaseSinkQos :: o -> m Bool
getBaseSinkQos 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' baseSink [ #qos 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkQos :: (MonadIO m, IsBaseSink o) => o -> Bool -> m ()
setBaseSinkQos :: o -> Bool -> m ()
setBaseSinkQos 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`.
constructBaseSinkQos :: (IsBaseSink o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructBaseSinkQos :: Bool -> m (GValueConstruct o)
constructBaseSinkQos 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 BaseSinkQosPropertyInfo
instance AttrInfo BaseSinkQosPropertyInfo where
    type AttrAllowedOps BaseSinkQosPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkQosPropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkQosPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint BaseSinkQosPropertyInfo = (~) Bool
    type AttrTransferType BaseSinkQosPropertyInfo = Bool
    type AttrGetType BaseSinkQosPropertyInfo = Bool
    type AttrLabel BaseSinkQosPropertyInfo = "qos"
    type AttrOrigin BaseSinkQosPropertyInfo = BaseSink
    attrGet = getBaseSinkQos
    attrSet = setBaseSinkQos
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkQos
    attrClear = undefined
#endif

-- VVV Prop "render-delay"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@render-delay@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #renderDelay
-- @
getBaseSinkRenderDelay :: (MonadIO m, IsBaseSink o) => o -> m Word64
getBaseSinkRenderDelay :: o -> m Word64
getBaseSinkRenderDelay o
obj = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word64
forall a. GObject a => a -> String -> IO Word64
B.Properties.getObjectPropertyUInt64 o
obj String
"render-delay"

-- | Set the value of the “@render-delay@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #renderDelay 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkRenderDelay :: (MonadIO m, IsBaseSink o) => o -> Word64 -> m ()
setBaseSinkRenderDelay :: o -> Word64 -> m ()
setBaseSinkRenderDelay o
obj Word64
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 -> Word64 -> IO ()
forall a. GObject a => a -> String -> Word64 -> IO ()
B.Properties.setObjectPropertyUInt64 o
obj String
"render-delay" Word64
val

-- | Construct a `GValueConstruct` with valid value for the “@render-delay@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkRenderDelay :: (IsBaseSink o, MIO.MonadIO m) => Word64 -> m (GValueConstruct o)
constructBaseSinkRenderDelay :: Word64 -> m (GValueConstruct o)
constructBaseSinkRenderDelay Word64
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 -> Word64 -> IO (GValueConstruct o)
forall o. String -> Word64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt64 String
"render-delay" Word64
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkRenderDelayPropertyInfo
instance AttrInfo BaseSinkRenderDelayPropertyInfo where
    type AttrAllowedOps BaseSinkRenderDelayPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkRenderDelayPropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkRenderDelayPropertyInfo = (~) Word64
    type AttrTransferTypeConstraint BaseSinkRenderDelayPropertyInfo = (~) Word64
    type AttrTransferType BaseSinkRenderDelayPropertyInfo = Word64
    type AttrGetType BaseSinkRenderDelayPropertyInfo = Word64
    type AttrLabel BaseSinkRenderDelayPropertyInfo = "render-delay"
    type AttrOrigin BaseSinkRenderDelayPropertyInfo = BaseSink
    attrGet = getBaseSinkRenderDelay
    attrSet = setBaseSinkRenderDelay
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkRenderDelay
    attrClear = undefined
#endif

-- VVV Prop "sync"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@sync@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #sync
-- @
getBaseSinkSync :: (MonadIO m, IsBaseSink o) => o -> m Bool
getBaseSinkSync :: o -> m Bool
getBaseSinkSync 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
"sync"

-- | Set the value of the “@sync@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #sync 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkSync :: (MonadIO m, IsBaseSink o) => o -> Bool -> m ()
setBaseSinkSync :: o -> Bool -> m ()
setBaseSinkSync 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
"sync" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@sync@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkSync :: (IsBaseSink o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructBaseSinkSync :: Bool -> m (GValueConstruct o)
constructBaseSinkSync 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
"sync" Bool
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkSyncPropertyInfo
instance AttrInfo BaseSinkSyncPropertyInfo where
    type AttrAllowedOps BaseSinkSyncPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkSyncPropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkSyncPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint BaseSinkSyncPropertyInfo = (~) Bool
    type AttrTransferType BaseSinkSyncPropertyInfo = Bool
    type AttrGetType BaseSinkSyncPropertyInfo = Bool
    type AttrLabel BaseSinkSyncPropertyInfo = "sync"
    type AttrOrigin BaseSinkSyncPropertyInfo = BaseSink
    attrGet = getBaseSinkSync
    attrSet = setBaseSinkSync
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkSync
    attrClear = undefined
#endif

-- VVV Prop "throttle-time"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@throttle-time@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #throttleTime
-- @
getBaseSinkThrottleTime :: (MonadIO m, IsBaseSink o) => o -> m Word64
getBaseSinkThrottleTime :: o -> m Word64
getBaseSinkThrottleTime o
obj = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word64
forall a. GObject a => a -> String -> IO Word64
B.Properties.getObjectPropertyUInt64 o
obj String
"throttle-time"

-- | Set the value of the “@throttle-time@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #throttleTime 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkThrottleTime :: (MonadIO m, IsBaseSink o) => o -> Word64 -> m ()
setBaseSinkThrottleTime :: o -> Word64 -> m ()
setBaseSinkThrottleTime o
obj Word64
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 -> Word64 -> IO ()
forall a. GObject a => a -> String -> Word64 -> IO ()
B.Properties.setObjectPropertyUInt64 o
obj String
"throttle-time" Word64
val

-- | Construct a `GValueConstruct` with valid value for the “@throttle-time@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkThrottleTime :: (IsBaseSink o, MIO.MonadIO m) => Word64 -> m (GValueConstruct o)
constructBaseSinkThrottleTime :: Word64 -> m (GValueConstruct o)
constructBaseSinkThrottleTime Word64
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 -> Word64 -> IO (GValueConstruct o)
forall o. String -> Word64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt64 String
"throttle-time" Word64
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkThrottleTimePropertyInfo
instance AttrInfo BaseSinkThrottleTimePropertyInfo where
    type AttrAllowedOps BaseSinkThrottleTimePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkThrottleTimePropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkThrottleTimePropertyInfo = (~) Word64
    type AttrTransferTypeConstraint BaseSinkThrottleTimePropertyInfo = (~) Word64
    type AttrTransferType BaseSinkThrottleTimePropertyInfo = Word64
    type AttrGetType BaseSinkThrottleTimePropertyInfo = Word64
    type AttrLabel BaseSinkThrottleTimePropertyInfo = "throttle-time"
    type AttrOrigin BaseSinkThrottleTimePropertyInfo = BaseSink
    attrGet = getBaseSinkThrottleTime
    attrSet = setBaseSinkThrottleTime
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkThrottleTime
    attrClear = undefined
#endif

-- VVV Prop "ts-offset"
   -- Type: TBasicType TInt64
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@ts-offset@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' baseSink #tsOffset
-- @
getBaseSinkTsOffset :: (MonadIO m, IsBaseSink o) => o -> m Int64
getBaseSinkTsOffset :: o -> m Int64
getBaseSinkTsOffset o
obj = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int64
forall a. GObject a => a -> String -> IO Int64
B.Properties.getObjectPropertyInt64 o
obj String
"ts-offset"

-- | Set the value of the “@ts-offset@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' baseSink [ #tsOffset 'Data.GI.Base.Attributes.:=' value ]
-- @
setBaseSinkTsOffset :: (MonadIO m, IsBaseSink o) => o -> Int64 -> m ()
setBaseSinkTsOffset :: o -> Int64 -> m ()
setBaseSinkTsOffset o
obj Int64
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 -> Int64 -> IO ()
forall a. GObject a => a -> String -> Int64 -> IO ()
B.Properties.setObjectPropertyInt64 o
obj String
"ts-offset" Int64
val

-- | Construct a `GValueConstruct` with valid value for the “@ts-offset@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructBaseSinkTsOffset :: (IsBaseSink o, MIO.MonadIO m) => Int64 -> m (GValueConstruct o)
constructBaseSinkTsOffset :: Int64 -> m (GValueConstruct o)
constructBaseSinkTsOffset Int64
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 -> Int64 -> IO (GValueConstruct o)
forall o. String -> Int64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt64 String
"ts-offset" Int64
val

#if defined(ENABLE_OVERLOADING)
data BaseSinkTsOffsetPropertyInfo
instance AttrInfo BaseSinkTsOffsetPropertyInfo where
    type AttrAllowedOps BaseSinkTsOffsetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint BaseSinkTsOffsetPropertyInfo = IsBaseSink
    type AttrSetTypeConstraint BaseSinkTsOffsetPropertyInfo = (~) Int64
    type AttrTransferTypeConstraint BaseSinkTsOffsetPropertyInfo = (~) Int64
    type AttrTransferType BaseSinkTsOffsetPropertyInfo = Int64
    type AttrGetType BaseSinkTsOffsetPropertyInfo = Int64
    type AttrLabel BaseSinkTsOffsetPropertyInfo = "ts-offset"
    type AttrOrigin BaseSinkTsOffsetPropertyInfo = BaseSink
    attrGet = getBaseSinkTsOffset
    attrSet = setBaseSinkTsOffset
    attrTransfer _ v = do
        return v
    attrConstruct = constructBaseSinkTsOffset
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BaseSink
type instance O.AttributeList BaseSink = BaseSinkAttributeList
type BaseSinkAttributeList = ('[ '("async", BaseSinkAsyncPropertyInfo), '("blocksize", BaseSinkBlocksizePropertyInfo), '("enableLastSample", BaseSinkEnableLastSamplePropertyInfo), '("lastSample", BaseSinkLastSamplePropertyInfo), '("maxBitrate", BaseSinkMaxBitratePropertyInfo), '("maxLateness", BaseSinkMaxLatenessPropertyInfo), '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("processingDeadline", BaseSinkProcessingDeadlinePropertyInfo), '("qos", BaseSinkQosPropertyInfo), '("renderDelay", BaseSinkRenderDelayPropertyInfo), '("sync", BaseSinkSyncPropertyInfo), '("throttleTime", BaseSinkThrottleTimePropertyInfo), '("tsOffset", BaseSinkTsOffsetPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
baseSinkAsync :: AttrLabelProxy "async"
baseSinkAsync = AttrLabelProxy

baseSinkBlocksize :: AttrLabelProxy "blocksize"
baseSinkBlocksize = AttrLabelProxy

baseSinkEnableLastSample :: AttrLabelProxy "enableLastSample"
baseSinkEnableLastSample = AttrLabelProxy

baseSinkLastSample :: AttrLabelProxy "lastSample"
baseSinkLastSample = AttrLabelProxy

baseSinkMaxBitrate :: AttrLabelProxy "maxBitrate"
baseSinkMaxBitrate = AttrLabelProxy

baseSinkMaxLateness :: AttrLabelProxy "maxLateness"
baseSinkMaxLateness = AttrLabelProxy

baseSinkProcessingDeadline :: AttrLabelProxy "processingDeadline"
baseSinkProcessingDeadline = AttrLabelProxy

baseSinkQos :: AttrLabelProxy "qos"
baseSinkQos = AttrLabelProxy

baseSinkRenderDelay :: AttrLabelProxy "renderDelay"
baseSinkRenderDelay = AttrLabelProxy

baseSinkSync :: AttrLabelProxy "sync"
baseSinkSync = AttrLabelProxy

baseSinkThrottleTime :: AttrLabelProxy "throttleTime"
baseSinkThrottleTime = AttrLabelProxy

baseSinkTsOffset :: AttrLabelProxy "tsOffset"
baseSinkTsOffset = AttrLabelProxy

#endif

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

#endif

-- method BaseSink::do_preroll
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "obj"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "MiniObject" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the mini object that caused the preroll"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "FlowReturn" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_sink_do_preroll" gst_base_sink_do_preroll :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Ptr Gst.MiniObject.MiniObject ->        -- obj : TInterface (Name {namespace = "Gst", name = "MiniObject"})
    IO CInt

-- | If the /@sink@/ spawns its own thread for pulling buffers from upstream it
-- should call this method after it has pulled a buffer. If the element needed
-- to preroll, this function will perform the preroll and will then block
-- until the element state is changed.
-- 
-- This function should be called with the PREROLL_LOCK held.
baseSinkDoPreroll ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Gst.MiniObject.MiniObject
    -- ^ /@obj@/: the mini object that caused the preroll
    -> m Gst.Enums.FlowReturn
    -- ^ __Returns:__ 'GI.Gst.Enums.FlowReturnOk' if the preroll completed and processing can
    -- continue. Any other return value should be returned from the render vmethod.
baseSinkDoPreroll :: a -> MiniObject -> m FlowReturn
baseSinkDoPreroll a
sink MiniObject
obj = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr MiniObject
obj' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
obj
    CInt
result <- Ptr BaseSink -> Ptr MiniObject -> IO CInt
gst_base_sink_do_preroll Ptr BaseSink
sink' Ptr MiniObject
obj'
    let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    MiniObject -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
obj
    FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'

#if defined(ENABLE_OVERLOADING)
data BaseSinkDoPrerollMethodInfo
instance (signature ~ (Gst.MiniObject.MiniObject -> m Gst.Enums.FlowReturn), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkDoPrerollMethodInfo a signature where
    overloadedMethod = baseSinkDoPreroll

#endif

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

foreign import ccall "gst_base_sink_get_blocksize" gst_base_sink_get_blocksize :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO Word32

-- | Get the number of bytes that the sink will pull when it is operating in pull
-- mode.
baseSinkGetBlocksize ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> m Word32
    -- ^ __Returns:__ the number of bytes /@sink@/ will pull in pull mode.
baseSinkGetBlocksize :: a -> m Word32
baseSinkGetBlocksize a
sink = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Word32
result <- Ptr BaseSink -> IO Word32
gst_base_sink_get_blocksize Ptr BaseSink
sink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetBlocksizeMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetBlocksizeMethodInfo a signature where
    overloadedMethod = baseSinkGetBlocksize

#endif

-- method BaseSink::get_drop_out_of_segment
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , 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_sink_get_drop_out_of_segment" gst_base_sink_get_drop_out_of_segment :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO CInt

-- | Checks if /@sink@/ is currently configured to drop buffers which are outside
-- the current segment
-- 
-- /Since: 1.12/
baseSinkGetDropOutOfSegment ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the sink is configured to drop buffers outside the
    -- current segment.
baseSinkGetDropOutOfSegment :: a -> m Bool
baseSinkGetDropOutOfSegment a
sink = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    CInt
result <- Ptr BaseSink -> IO CInt
gst_base_sink_get_drop_out_of_segment Ptr BaseSink
sink'
    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
sink
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetDropOutOfSegmentMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetDropOutOfSegmentMethodInfo a signature where
    overloadedMethod = baseSinkGetDropOutOfSegment

#endif

-- method BaseSink::get_last_sample
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "Sample" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_sink_get_last_sample" gst_base_sink_get_last_sample :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO (Ptr Gst.Sample.Sample)

-- | Get the last sample that arrived in the sink and was used for preroll or for
-- rendering. This property can be used to generate thumbnails.
-- 
-- The t'GI.Gst.Structs.Caps.Caps' on the sample can be used to determine the type of the buffer.
-- 
-- Free-function: gst_sample_unref
baseSinkGetLastSample ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample'. @/gst_sample_unref()/@ after
    --     usage.  This function returns 'P.Nothing' when no buffer has arrived in the
    --     sink yet or when the sink is not in PAUSED or PLAYING.
baseSinkGetLastSample :: a -> m (Maybe Sample)
baseSinkGetLastSample a
sink = IO (Maybe Sample) -> m (Maybe Sample)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Sample) -> m (Maybe Sample))
-> IO (Maybe Sample) -> m (Maybe Sample)
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr Sample
result <- Ptr BaseSink -> IO (Ptr Sample)
gst_base_sink_get_last_sample Ptr BaseSink
sink'
    Maybe Sample
maybeResult <- Ptr Sample -> (Ptr Sample -> IO Sample) -> IO (Maybe Sample)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Sample
result ((Ptr Sample -> IO Sample) -> IO (Maybe Sample))
-> (Ptr Sample -> IO Sample) -> IO (Maybe Sample)
forall a b. (a -> b) -> a -> b
$ \Ptr Sample
result' -> do
        Sample
result'' <- ((ManagedPtr Sample -> Sample) -> Ptr Sample -> IO Sample
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Sample -> Sample
Gst.Sample.Sample) Ptr Sample
result'
        Sample -> IO Sample
forall (m :: * -> *) a. Monad m => a -> m a
return Sample
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Maybe Sample -> IO (Maybe Sample)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Sample
maybeResult

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetLastSampleMethodInfo
instance (signature ~ (m (Maybe Gst.Sample.Sample)), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetLastSampleMethodInfo a signature where
    overloadedMethod = baseSinkGetLastSample

#endif

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

foreign import ccall "gst_base_sink_get_latency" gst_base_sink_get_latency :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO Word64

-- | Get the currently configured latency.
baseSinkGetLatency ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Word64
    -- ^ __Returns:__ The configured latency.
baseSinkGetLatency :: a -> m Word64
baseSinkGetLatency a
sink = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Word64
result <- Ptr BaseSink -> IO Word64
gst_base_sink_get_latency Ptr BaseSink
sink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetLatencyMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetLatencyMethodInfo a signature where
    overloadedMethod = baseSinkGetLatency

#endif

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

foreign import ccall "gst_base_sink_get_max_bitrate" gst_base_sink_get_max_bitrate :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO Word64

-- | Get the maximum amount of bits per second that the sink will render.
-- 
-- /Since: 1.2/
baseSinkGetMaxBitrate ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> m Word64
    -- ^ __Returns:__ the maximum number of bits per second /@sink@/ will render.
baseSinkGetMaxBitrate :: a -> m Word64
baseSinkGetMaxBitrate a
sink = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Word64
result <- Ptr BaseSink -> IO Word64
gst_base_sink_get_max_bitrate Ptr BaseSink
sink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetMaxBitrateMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetMaxBitrateMethodInfo a signature where
    overloadedMethod = baseSinkGetMaxBitrate

#endif

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

foreign import ccall "gst_base_sink_get_max_lateness" gst_base_sink_get_max_lateness :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO Int64

-- | Gets the max lateness value. See 'GI.GstBase.Objects.BaseSink.baseSinkSetMaxLateness' for
-- more details.
baseSinkGetMaxLateness ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Int64
    -- ^ __Returns:__ The maximum time in nanoseconds that a buffer can be late
    -- before it is dropped and not rendered. A value of -1 means an
    -- unlimited time.
baseSinkGetMaxLateness :: a -> m Int64
baseSinkGetMaxLateness a
sink = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Int64
result <- Ptr BaseSink -> IO Int64
gst_base_sink_get_max_lateness Ptr BaseSink
sink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Int64 -> IO Int64
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetMaxLatenessMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetMaxLatenessMethodInfo a signature where
    overloadedMethod = baseSinkGetMaxLateness

#endif

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

foreign import ccall "gst_base_sink_get_processing_deadline" gst_base_sink_get_processing_deadline :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO Word64

-- | Get the processing deadline of /@sink@/. see
-- 'GI.GstBase.Objects.BaseSink.baseSinkSetProcessingDeadline' for more information about
-- the processing deadline.
-- 
-- /Since: 1.16/
baseSinkGetProcessingDeadline ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> m Word64
    -- ^ __Returns:__ the processing deadline
baseSinkGetProcessingDeadline :: a -> m Word64
baseSinkGetProcessingDeadline a
sink = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Word64
result <- Ptr BaseSink -> IO Word64
gst_base_sink_get_processing_deadline Ptr BaseSink
sink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetProcessingDeadlineMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetProcessingDeadlineMethodInfo a signature where
    overloadedMethod = baseSinkGetProcessingDeadline

#endif

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

foreign import ccall "gst_base_sink_get_render_delay" gst_base_sink_get_render_delay :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO Word64

-- | Get the render delay of /@sink@/. see 'GI.GstBase.Objects.BaseSink.baseSinkSetRenderDelay' for more
-- information about the render delay.
baseSinkGetRenderDelay ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> m Word64
    -- ^ __Returns:__ the render delay of /@sink@/.
baseSinkGetRenderDelay :: a -> m Word64
baseSinkGetRenderDelay a
sink = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Word64
result <- Ptr BaseSink -> IO Word64
gst_base_sink_get_render_delay Ptr BaseSink
sink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetRenderDelayMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetRenderDelayMethodInfo a signature where
    overloadedMethod = baseSinkGetRenderDelay

#endif

-- method BaseSink::get_sync
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , 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_sink_get_sync" gst_base_sink_get_sync :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO CInt

-- | Checks if /@sink@/ is currently configured to synchronize against the
-- clock.
baseSinkGetSync ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the sink is configured to synchronize against the clock.
baseSinkGetSync :: a -> m Bool
baseSinkGetSync a
sink = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    CInt
result <- Ptr BaseSink -> IO CInt
gst_base_sink_get_sync Ptr BaseSink
sink'
    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
sink
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetSyncMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetSyncMethodInfo a signature where
    overloadedMethod = baseSinkGetSync

#endif

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

foreign import ccall "gst_base_sink_get_throttle_time" gst_base_sink_get_throttle_time :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO Word64

-- | Get the time that will be inserted between frames to control the
-- maximum buffers per second.
baseSinkGetThrottleTime ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> m Word64
    -- ^ __Returns:__ the number of nanoseconds /@sink@/ will put between frames.
baseSinkGetThrottleTime :: a -> m Word64
baseSinkGetThrottleTime a
sink = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Word64
result <- Ptr BaseSink -> IO Word64
gst_base_sink_get_throttle_time Ptr BaseSink
sink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetThrottleTimeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetThrottleTimeMethodInfo a signature where
    overloadedMethod = baseSinkGetThrottleTime

#endif

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

foreign import ccall "gst_base_sink_get_ts_offset" gst_base_sink_get_ts_offset :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO Int64

-- | Get the synchronisation offset of /@sink@/.
baseSinkGetTsOffset ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Int64
    -- ^ __Returns:__ The synchronisation offset.
baseSinkGetTsOffset :: a -> m Int64
baseSinkGetTsOffset a
sink = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Int64
result <- Ptr BaseSink -> IO Int64
gst_base_sink_get_ts_offset Ptr BaseSink
sink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Int64 -> IO Int64
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result

#if defined(ENABLE_OVERLOADING)
data BaseSinkGetTsOffsetMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetTsOffsetMethodInfo a signature where
    overloadedMethod = baseSinkGetTsOffset

#endif

-- method BaseSink::is_async_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , 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_sink_is_async_enabled" gst_base_sink_is_async_enabled :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO CInt

-- | Checks if /@sink@/ is currently configured to perform asynchronous state
-- changes to PAUSED.
baseSinkIsAsyncEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the sink is configured to perform asynchronous state
    -- changes.
baseSinkIsAsyncEnabled :: a -> m Bool
baseSinkIsAsyncEnabled a
sink = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    CInt
result <- Ptr BaseSink -> IO CInt
gst_base_sink_is_async_enabled Ptr BaseSink
sink'
    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
sink
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseSinkIsAsyncEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkIsAsyncEnabledMethodInfo a signature where
    overloadedMethod = baseSinkIsAsyncEnabled

#endif

-- method BaseSink::is_last_sample_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , 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_sink_is_last_sample_enabled" gst_base_sink_is_last_sample_enabled :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO CInt

-- | Checks if /@sink@/ is currently configured to store the last received sample in
-- the last-sample property.
baseSinkIsLastSampleEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the sink is configured to store the last received sample.
baseSinkIsLastSampleEnabled :: a -> m Bool
baseSinkIsLastSampleEnabled a
sink = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    CInt
result <- Ptr BaseSink -> IO CInt
gst_base_sink_is_last_sample_enabled Ptr BaseSink
sink'
    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
sink
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseSinkIsLastSampleEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkIsLastSampleEnabledMethodInfo a signature where
    overloadedMethod = baseSinkIsLastSampleEnabled

#endif

-- method BaseSink::is_qos_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , 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_sink_is_qos_enabled" gst_base_sink_is_qos_enabled :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO CInt

-- | Checks if /@sink@/ is currently configured to send Quality-of-Service events
-- upstream.
baseSinkIsQosEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the sink is configured to perform Quality-of-Service.
baseSinkIsQosEnabled :: a -> m Bool
baseSinkIsQosEnabled a
sink = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    CInt
result <- Ptr BaseSink -> IO CInt
gst_base_sink_is_qos_enabled Ptr BaseSink
sink'
    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
sink
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data BaseSinkIsQosEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkIsQosEnabledMethodInfo a signature where
    overloadedMethod = baseSinkIsQosEnabled

#endif

-- method BaseSink::query_latency
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "live"
--           , argType = TBasicType TBoolean
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "if the sink is live"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "upstream_live"
--           , argType = TBasicType TBoolean
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "if an upstream element is live"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "min_latency"
--           , argType = TBasicType TUInt64
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the min latency of the upstream elements"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "max_latency"
--           , argType = TBasicType TUInt64
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the max latency of the upstream elements"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_sink_query_latency" gst_base_sink_query_latency :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Ptr CInt ->                             -- live : TBasicType TBoolean
    Ptr CInt ->                             -- upstream_live : TBasicType TBoolean
    Ptr Word64 ->                           -- min_latency : TBasicType TUInt64
    Ptr Word64 ->                           -- max_latency : TBasicType TUInt64
    IO CInt

-- | Query the sink for the latency parameters. The latency will be queried from
-- the upstream elements. /@live@/ will be 'P.True' if /@sink@/ is configured to
-- synchronize against the clock. /@upstreamLive@/ will be 'P.True' if an upstream
-- element is live.
-- 
-- If both /@live@/ and /@upstreamLive@/ are 'P.True', the sink will want to compensate
-- for the latency introduced by the upstream elements by setting the
-- /@minLatency@/ to a strictly positive value.
-- 
-- This function is mostly used by subclasses.
baseSinkQueryLatency ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m ((Bool, Bool, Bool, Word64, Word64))
    -- ^ __Returns:__ 'P.True' if the query succeeded.
baseSinkQueryLatency :: a -> m (Bool, Bool, Bool, Word64, Word64)
baseSinkQueryLatency a
sink = IO (Bool, Bool, Bool, Word64, Word64)
-> m (Bool, Bool, Bool, Word64, Word64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Bool, Bool, Word64, Word64)
 -> m (Bool, Bool, Bool, Word64, Word64))
-> IO (Bool, Bool, Bool, Word64, Word64)
-> m (Bool, Bool, Bool, Word64, Word64)
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr CInt
live <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
    Ptr CInt
upstreamLive <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
    Ptr Word64
minLatency <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
    Ptr Word64
maxLatency <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
    CInt
result <- Ptr BaseSink
-> Ptr CInt -> Ptr CInt -> Ptr Word64 -> Ptr Word64 -> IO CInt
gst_base_sink_query_latency Ptr BaseSink
sink' Ptr CInt
live Ptr CInt
upstreamLive Ptr Word64
minLatency Ptr Word64
maxLatency
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    CInt
live' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
live
    let live'' :: Bool
live'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
live'
    CInt
upstreamLive' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
upstreamLive
    let upstreamLive'' :: Bool
upstreamLive'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
upstreamLive'
    Word64
minLatency' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
minLatency
    Word64
maxLatency' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
maxLatency
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
live
    Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
upstreamLive
    Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
minLatency
    Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
maxLatency
    (Bool, Bool, Bool, Word64, Word64)
-> IO (Bool, Bool, Bool, Word64, Word64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Bool
live'', Bool
upstreamLive'', Word64
minLatency', Word64
maxLatency')

#if defined(ENABLE_OVERLOADING)
data BaseSinkQueryLatencyMethodInfo
instance (signature ~ (m ((Bool, Bool, Bool, Word64, Word64))), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkQueryLatencyMethodInfo a signature where
    overloadedMethod = baseSinkQueryLatency

#endif

-- method BaseSink::set_async_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , 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 "the new async value."
--                 , 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_sink_set_async_enabled" gst_base_sink_set_async_enabled :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()

-- | Configures /@sink@/ to perform all state changes asynchronously. When async is
-- disabled, the sink will immediately go to PAUSED instead of waiting for a
-- preroll buffer. This feature is useful if the sink does not synchronize
-- against the clock or when it is dealing with sparse streams.
baseSinkSetAsyncEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Bool
    -- ^ /@enabled@/: the new async value.
    -> m ()
baseSinkSetAsyncEnabled :: a -> Bool -> m ()
baseSinkSetAsyncEnabled a
sink 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    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 BaseSink -> CInt -> IO ()
gst_base_sink_set_async_enabled Ptr BaseSink
sink' CInt
enabled'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetAsyncEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetAsyncEnabledMethodInfo a signature where
    overloadedMethod = baseSinkSetAsyncEnabled

#endif

-- method BaseSink::set_blocksize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "blocksize"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the blocksize in bytes"
--                 , 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_sink_set_blocksize" gst_base_sink_set_blocksize :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Word32 ->                               -- blocksize : TBasicType TUInt
    IO ()

-- | Set the number of bytes that the sink will pull when it is operating in pull
-- mode.
baseSinkSetBlocksize ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> Word32
    -- ^ /@blocksize@/: the blocksize in bytes
    -> m ()
baseSinkSetBlocksize :: a -> Word32 -> m ()
baseSinkSetBlocksize a
sink Word32
blocksize = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr BaseSink -> Word32 -> IO ()
gst_base_sink_set_blocksize Ptr BaseSink
sink' Word32
blocksize
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetBlocksizeMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetBlocksizeMethodInfo a signature where
    overloadedMethod = baseSinkSetBlocksize

#endif

-- method BaseSink::set_drop_out_of_segment
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drop_out_of_segment"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "drop buffers outside the segment"
--                 , 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_sink_set_drop_out_of_segment" gst_base_sink_set_drop_out_of_segment :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    CInt ->                                 -- drop_out_of_segment : TBasicType TBoolean
    IO ()

-- | Configure /@sink@/ to drop buffers which are outside the current segment
-- 
-- /Since: 1.12/
baseSinkSetDropOutOfSegment ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Bool
    -- ^ /@dropOutOfSegment@/: drop buffers outside the segment
    -> m ()
baseSinkSetDropOutOfSegment :: a -> Bool -> m ()
baseSinkSetDropOutOfSegment a
sink Bool
dropOutOfSegment = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    let dropOutOfSegment' :: CInt
dropOutOfSegment' = (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
dropOutOfSegment
    Ptr BaseSink -> CInt -> IO ()
gst_base_sink_set_drop_out_of_segment Ptr BaseSink
sink' CInt
dropOutOfSegment'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetDropOutOfSegmentMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetDropOutOfSegmentMethodInfo a signature where
    overloadedMethod = baseSinkSetDropOutOfSegment

#endif

-- method BaseSink::set_last_sample_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , 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 "the new enable-last-sample value."
--                 , 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_sink_set_last_sample_enabled" gst_base_sink_set_last_sample_enabled :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()

-- | Configures /@sink@/ to store the last received sample in the last-sample
-- property.
baseSinkSetLastSampleEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Bool
    -- ^ /@enabled@/: the new enable-last-sample value.
    -> m ()
baseSinkSetLastSampleEnabled :: a -> Bool -> m ()
baseSinkSetLastSampleEnabled a
sink 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    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 BaseSink -> CInt -> IO ()
gst_base_sink_set_last_sample_enabled Ptr BaseSink
sink' CInt
enabled'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetLastSampleEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetLastSampleEnabledMethodInfo a signature where
    overloadedMethod = baseSinkSetLastSampleEnabled

#endif

-- method BaseSink::set_max_bitrate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "max_bitrate"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the max_bitrate in bits per second"
--                 , 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_sink_set_max_bitrate" gst_base_sink_set_max_bitrate :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Word64 ->                               -- max_bitrate : TBasicType TUInt64
    IO ()

-- | Set the maximum amount of bits per second that the sink will render.
-- 
-- /Since: 1.2/
baseSinkSetMaxBitrate ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> Word64
    -- ^ /@maxBitrate@/: the max_bitrate in bits per second
    -> m ()
baseSinkSetMaxBitrate :: a -> Word64 -> m ()
baseSinkSetMaxBitrate a
sink Word64
maxBitrate = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr BaseSink -> Word64 -> IO ()
gst_base_sink_set_max_bitrate Ptr BaseSink
sink' Word64
maxBitrate
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetMaxBitrateMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetMaxBitrateMethodInfo a signature where
    overloadedMethod = baseSinkSetMaxBitrate

#endif

-- method BaseSink::set_max_lateness
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "max_lateness"
--           , argType = TBasicType TInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new max lateness value."
--                 , 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_sink_set_max_lateness" gst_base_sink_set_max_lateness :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Int64 ->                                -- max_lateness : TBasicType TInt64
    IO ()

-- | Sets the new max lateness value to /@maxLateness@/. This value is
-- used to decide if a buffer should be dropped or not based on the
-- buffer timestamp and the current clock time. A value of -1 means
-- an unlimited time.
baseSinkSetMaxLateness ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Int64
    -- ^ /@maxLateness@/: the new max lateness value.
    -> m ()
baseSinkSetMaxLateness :: a -> Int64 -> m ()
baseSinkSetMaxLateness a
sink Int64
maxLateness = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr BaseSink -> Int64 -> IO ()
gst_base_sink_set_max_lateness Ptr BaseSink
sink' Int64
maxLateness
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetMaxLatenessMethodInfo
instance (signature ~ (Int64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetMaxLatenessMethodInfo a signature where
    overloadedMethod = baseSinkSetMaxLateness

#endif

-- method BaseSink::set_processing_deadline
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "processing_deadline"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new processing deadline in nanoseconds."
--                 , 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_sink_set_processing_deadline" gst_base_sink_set_processing_deadline :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Word64 ->                               -- processing_deadline : TBasicType TUInt64
    IO ()

-- | Maximum amount of time (in nanoseconds) that the pipeline can take
-- for processing the buffer. This is added to the latency of live
-- pipelines.
-- 
-- This function is usually called by subclasses.
-- 
-- /Since: 1.16/
baseSinkSetProcessingDeadline ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> Word64
    -- ^ /@processingDeadline@/: the new processing deadline in nanoseconds.
    -> m ()
baseSinkSetProcessingDeadline :: a -> Word64 -> m ()
baseSinkSetProcessingDeadline a
sink Word64
processingDeadline = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr BaseSink -> Word64 -> IO ()
gst_base_sink_set_processing_deadline Ptr BaseSink
sink' Word64
processingDeadline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetProcessingDeadlineMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetProcessingDeadlineMethodInfo a signature where
    overloadedMethod = baseSinkSetProcessingDeadline

#endif

-- method BaseSink::set_qos_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , 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 "the new qos value." , 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_sink_set_qos_enabled" gst_base_sink_set_qos_enabled :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()

-- | Configures /@sink@/ to send Quality-of-Service events upstream.
baseSinkSetQosEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Bool
    -- ^ /@enabled@/: the new qos value.
    -> m ()
baseSinkSetQosEnabled :: a -> Bool -> m ()
baseSinkSetQosEnabled a
sink 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    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 BaseSink -> CInt -> IO ()
gst_base_sink_set_qos_enabled Ptr BaseSink
sink' CInt
enabled'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetQosEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetQosEnabledMethodInfo a signature where
    overloadedMethod = baseSinkSetQosEnabled

#endif

-- method BaseSink::set_render_delay
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "delay"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new delay" , 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_sink_set_render_delay" gst_base_sink_set_render_delay :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Word64 ->                               -- delay : TBasicType TUInt64
    IO ()

-- | Set the render delay in /@sink@/ to /@delay@/. The render delay is the time
-- between actual rendering of a buffer and its synchronisation time. Some
-- devices might delay media rendering which can be compensated for with this
-- function.
-- 
-- After calling this function, this sink will report additional latency and
-- other sinks will adjust their latency to delay the rendering of their media.
-- 
-- This function is usually called by subclasses.
baseSinkSetRenderDelay ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> Word64
    -- ^ /@delay@/: the new delay
    -> m ()
baseSinkSetRenderDelay :: a -> Word64 -> m ()
baseSinkSetRenderDelay a
sink Word64
delay = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr BaseSink -> Word64 -> IO ()
gst_base_sink_set_render_delay Ptr BaseSink
sink' Word64
delay
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetRenderDelayMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetRenderDelayMethodInfo a signature where
    overloadedMethod = baseSinkSetRenderDelay

#endif

-- method BaseSink::set_sync
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sync"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new sync value."
--                 , 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_sink_set_sync" gst_base_sink_set_sync :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    CInt ->                                 -- sync : TBasicType TBoolean
    IO ()

-- | Configures /@sink@/ to synchronize on the clock or not. When
-- /@sync@/ is 'P.False', incoming samples will be played as fast as
-- possible. If /@sync@/ is 'P.True', the timestamps of the incoming
-- buffers will be used to schedule the exact render time of its
-- contents.
baseSinkSetSync ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Bool
    -- ^ /@sync@/: the new sync value.
    -> m ()
baseSinkSetSync :: a -> Bool -> m ()
baseSinkSetSync a
sink Bool
sync = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    let sync' :: CInt
sync' = (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
sync
    Ptr BaseSink -> CInt -> IO ()
gst_base_sink_set_sync Ptr BaseSink
sink' CInt
sync'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetSyncMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetSyncMethodInfo a signature where
    overloadedMethod = baseSinkSetSync

#endif

-- method BaseSink::set_throttle_time
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstBaseSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "throttle"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the throttle time in nanoseconds"
--                 , 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_sink_set_throttle_time" gst_base_sink_set_throttle_time :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Word64 ->                               -- throttle : TBasicType TUInt64
    IO ()

-- | Set the time that will be inserted between rendered buffers. This
-- can be used to control the maximum buffers per second that the sink
-- will render.
baseSinkSetThrottleTime ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: a t'GI.GstBase.Objects.BaseSink.BaseSink'
    -> Word64
    -- ^ /@throttle@/: the throttle time in nanoseconds
    -> m ()
baseSinkSetThrottleTime :: a -> Word64 -> m ()
baseSinkSetThrottleTime a
sink Word64
throttle = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr BaseSink -> Word64 -> IO ()
gst_base_sink_set_throttle_time Ptr BaseSink
sink' Word64
throttle
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetThrottleTimeMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetThrottleTimeMethodInfo a signature where
    overloadedMethod = baseSinkSetThrottleTime

#endif

-- method BaseSink::set_ts_offset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "offset"
--           , argType = TBasicType TInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new offset" , 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_sink_set_ts_offset" gst_base_sink_set_ts_offset :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Int64 ->                                -- offset : TBasicType TInt64
    IO ()

-- | Adjust the synchronisation of /@sink@/ with /@offset@/. A negative value will
-- render buffers earlier than their timestamp. A positive value will delay
-- rendering. This function can be used to fix playback of badly timestamped
-- buffers.
baseSinkSetTsOffset ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Int64
    -- ^ /@offset@/: the new offset
    -> m ()
baseSinkSetTsOffset :: a -> Int64 -> m ()
baseSinkSetTsOffset a
sink Int64
offset = 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 BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr BaseSink -> Int64 -> IO ()
gst_base_sink_set_ts_offset Ptr BaseSink
sink' Int64
offset
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data BaseSinkSetTsOffsetMethodInfo
instance (signature ~ (Int64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetTsOffsetMethodInfo a signature where
    overloadedMethod = baseSinkSetTsOffset

#endif

-- method BaseSink::wait
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "time"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the running_time to be reached"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "jitter"
--           , argType = TBasicType TInt64
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the jitter to be filled with time diff, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "FlowReturn" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_sink_wait" gst_base_sink_wait :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Word64 ->                               -- time : TBasicType TUInt64
    Ptr Int64 ->                            -- jitter : TBasicType TInt64
    IO CInt

-- | This function will wait for preroll to complete and will then block until /@time@/
-- is reached. It is usually called by subclasses that use their own internal
-- synchronisation but want to let some synchronization (like EOS) be handled
-- by the base class.
-- 
-- This function should only be called with the PREROLL_LOCK held (like when
-- receiving an EOS event in the [event](#g:signal:event) vmethod or when handling buffers in
-- [render](#g:signal:render)).
-- 
-- The /@time@/ argument should be the running_time of when the timeout should happen
-- and will be adjusted with any latency and offset configured in the sink.
baseSinkWait ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Word64
    -- ^ /@time@/: the running_time to be reached
    -> m ((Gst.Enums.FlowReturn, Int64))
    -- ^ __Returns:__ t'GI.Gst.Enums.FlowReturn'
baseSinkWait :: a -> Word64 -> m (FlowReturn, Int64)
baseSinkWait a
sink Word64
time = IO (FlowReturn, Int64) -> m (FlowReturn, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (FlowReturn, Int64) -> m (FlowReturn, Int64))
-> IO (FlowReturn, Int64) -> m (FlowReturn, Int64)
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr Int64
jitter <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
    CInt
result <- Ptr BaseSink -> Word64 -> Ptr Int64 -> IO CInt
gst_base_sink_wait Ptr BaseSink
sink' Word64
time Ptr Int64
jitter
    let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    Int64
jitter' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
jitter
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
jitter
    (FlowReturn, Int64) -> IO (FlowReturn, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (FlowReturn
result', Int64
jitter')

#if defined(ENABLE_OVERLOADING)
data BaseSinkWaitMethodInfo
instance (signature ~ (Word64 -> m ((Gst.Enums.FlowReturn, Int64))), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkWaitMethodInfo a signature where
    overloadedMethod = baseSinkWait

#endif

-- method BaseSink::wait_clock
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "time"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the running_time to be reached"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "jitter"
--           , argType = TBasicType TInt64
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the jitter to be filled with time diff, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "ClockReturn" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_sink_wait_clock" gst_base_sink_wait_clock :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    Word64 ->                               -- time : TBasicType TUInt64
    Ptr Int64 ->                            -- jitter : TBasicType TInt64
    IO CUInt

-- | This function will block until /@time@/ is reached. It is usually called by
-- subclasses that use their own internal synchronisation.
-- 
-- If /@time@/ is not valid, no synchronisation is done and 'GI.Gst.Enums.ClockReturnBadtime' is
-- returned. Likewise, if synchronisation is disabled in the element or there
-- is no clock, no synchronisation is done and 'GI.Gst.Enums.ClockReturnBadtime' is returned.
-- 
-- This function should only be called with the PREROLL_LOCK held, like when
-- receiving an EOS event in the t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/event/@() vmethod or when
-- receiving a buffer in
-- the t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() vmethod.
-- 
-- The /@time@/ argument should be the running_time of when this method should
-- return and is not adjusted with any latency or offset configured in the
-- sink.
baseSinkWaitClock ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> Word64
    -- ^ /@time@/: the running_time to be reached
    -> m ((Gst.Enums.ClockReturn, Int64))
    -- ^ __Returns:__ t'GI.Gst.Enums.ClockReturn'
baseSinkWaitClock :: a -> Word64 -> m (ClockReturn, Int64)
baseSinkWaitClock a
sink Word64
time = IO (ClockReturn, Int64) -> m (ClockReturn, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (ClockReturn, Int64) -> m (ClockReturn, Int64))
-> IO (ClockReturn, Int64) -> m (ClockReturn, Int64)
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    Ptr Int64
jitter <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
    CUInt
result <- Ptr BaseSink -> Word64 -> Ptr Int64 -> IO CUInt
gst_base_sink_wait_clock Ptr BaseSink
sink' Word64
time Ptr Int64
jitter
    let result' :: ClockReturn
result' = (Int -> ClockReturn
forall a. Enum a => Int -> a
toEnum (Int -> ClockReturn) -> (CUInt -> Int) -> CUInt -> ClockReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    Int64
jitter' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
jitter
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
jitter
    (ClockReturn, Int64) -> IO (ClockReturn, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (ClockReturn
result', Int64
jitter')

#if defined(ENABLE_OVERLOADING)
data BaseSinkWaitClockMethodInfo
instance (signature ~ (Word64 -> m ((Gst.Enums.ClockReturn, Int64))), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkWaitClockMethodInfo a signature where
    overloadedMethod = baseSinkWaitClock

#endif

-- method BaseSink::wait_preroll
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "sink"
--           , argType =
--               TInterface Name { namespace = "GstBase" , name = "BaseSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the sink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "FlowReturn" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_base_sink_wait_preroll" gst_base_sink_wait_preroll :: 
    Ptr BaseSink ->                         -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"})
    IO CInt

-- | If the t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method performs its own synchronisation
-- against the clock it must unblock when going from PLAYING to the PAUSED state
-- and call this method before continuing to render the remaining data.
-- 
-- If the t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method can block on something else than
-- the clock, it must also be ready to unblock immediately on
-- the t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/unlock/@() method and cause the
-- t'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method to immediately call this function.
-- In this case, the subclass must be prepared to continue rendering where it
-- left off if this function returns 'GI.Gst.Enums.FlowReturnOk'.
-- 
-- This function will block until a state change to PLAYING happens (in which
-- case this function returns 'GI.Gst.Enums.FlowReturnOk') or the processing must be stopped due
-- to a state change to READY or a FLUSH event (in which case this function
-- returns 'GI.Gst.Enums.FlowReturnFlushing').
-- 
-- This function should only be called with the PREROLL_LOCK held, like in the
-- render function.
baseSinkWaitPreroll ::
    (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) =>
    a
    -- ^ /@sink@/: the sink
    -> m Gst.Enums.FlowReturn
    -- ^ __Returns:__ 'GI.Gst.Enums.FlowReturnOk' if the preroll completed and processing can
    -- continue. Any other return value should be returned from the render vmethod.
baseSinkWaitPreroll :: a -> m FlowReturn
baseSinkWaitPreroll a
sink = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
    Ptr BaseSink
sink' <- a -> IO (Ptr BaseSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
sink
    CInt
result <- Ptr BaseSink -> IO CInt
gst_base_sink_wait_preroll Ptr BaseSink
sink'
    let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
sink
    FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'

#if defined(ENABLE_OVERLOADING)
data BaseSinkWaitPrerollMethodInfo
instance (signature ~ (m Gst.Enums.FlowReturn), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkWaitPrerollMethodInfo a signature where
    overloadedMethod = baseSinkWaitPreroll

#endif