{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Appsink is a sink plugin that supports many different methods for making
-- the application get a handle on the GStreamer data in a pipeline. Unlike
-- most GStreamer elements, Appsink provides external API functions.
-- 
-- appsink can be used by linking to the gstappsink.h header file to access the
-- methods or by using the appsink action signals and properties.
-- 
-- The normal way of retrieving samples from appsink is by using the
-- 'GI.GstApp.Objects.AppSink.appSinkPullSample' and 'GI.GstApp.Objects.AppSink.appSinkPullPreroll' methods.
-- These methods block until a sample becomes available in the sink or when the
-- sink is shut down or reaches EOS. There are also timed variants of these
-- methods, 'GI.GstApp.Objects.AppSink.appSinkTryPullSample' and 'GI.GstApp.Objects.AppSink.appSinkTryPullPreroll',
-- which accept a timeout parameter to limit the amount of time to wait.
-- 
-- Appsink will internally use a queue to collect buffers from the streaming
-- thread. If the application is not pulling samples fast enough, this queue
-- will consume a lot of memory over time. The \"max-buffers\" property can be
-- used to limit the queue size. The \"drop\" property controls whether the
-- streaming thread blocks or if older buffers are dropped when the maximum
-- queue size is reached. Note that blocking the streaming thread can negatively
-- affect real-time performance and should be avoided.
-- 
-- If a blocking behaviour is not desirable, setting the \"emit-signals\" property
-- to 'P.True' will make appsink emit the \"new-sample\" and \"new-preroll\" signals
-- when a sample can be pulled without blocking.
-- 
-- The \"caps\" property on appsink can be used to control the formats that
-- appsink can receive. This property can contain non-fixed caps, the format of
-- the pulled samples can be obtained by getting the sample caps.
-- 
-- If one of the pull-preroll or pull-sample methods return 'P.Nothing', the appsink
-- is stopped or in the EOS state. You can check for the EOS state with the
-- \"eos\" property or with the 'GI.GstApp.Objects.AppSink.appSinkIsEos' method.
-- 
-- The eos signal can also be used to be informed when the EOS state is reached
-- to avoid polling.

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

module GI.GstApp.Objects.AppSink
    ( 

-- * Exported types
    AppSink(..)                             ,
    IsAppSink                               ,
    toAppSink                               ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [abortState]("GI.Gst.Objects.Element#g:method:abortState"), [addControlBinding]("GI.Gst.Objects.Object#g:method:addControlBinding"), [addPad]("GI.Gst.Objects.Element#g:method:addPad"), [addPropertyDeepNotifyWatch]("GI.Gst.Objects.Element#g:method:addPropertyDeepNotifyWatch"), [addPropertyNotifyWatch]("GI.Gst.Objects.Element#g:method:addPropertyNotifyWatch"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [callAsync]("GI.Gst.Objects.Element#g:method:callAsync"), [changeState]("GI.Gst.Objects.Element#g:method:changeState"), [continueState]("GI.Gst.Objects.Element#g:method:continueState"), [createAllPads]("GI.Gst.Objects.Element#g:method:createAllPads"), [defaultError]("GI.Gst.Objects.Object#g:method:defaultError"), [doPreroll]("GI.GstBase.Objects.BaseSink#g:method:doPreroll"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [foreachPad]("GI.Gst.Objects.Element#g:method:foreachPad"), [foreachSinkPad]("GI.Gst.Objects.Element#g:method:foreachSinkPad"), [foreachSrcPad]("GI.Gst.Objects.Element#g:method:foreachSrcPad"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [hasActiveControlBindings]("GI.Gst.Objects.Object#g:method:hasActiveControlBindings"), [hasAncestor]("GI.Gst.Objects.Object#g:method:hasAncestor"), [hasAsAncestor]("GI.Gst.Objects.Object#g:method:hasAsAncestor"), [hasAsParent]("GI.Gst.Objects.Object#g:method:hasAsParent"), [isAsyncEnabled]("GI.GstBase.Objects.BaseSink#g:method:isAsyncEnabled"), [isEos]("GI.GstApp.Objects.AppSink#g:method:isEos"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isLastSampleEnabled]("GI.GstBase.Objects.BaseSink#g:method:isLastSampleEnabled"), [isLockedState]("GI.Gst.Objects.Element#g:method:isLockedState"), [isQosEnabled]("GI.GstBase.Objects.BaseSink#g:method:isQosEnabled"), [iteratePads]("GI.Gst.Objects.Element#g:method:iteratePads"), [iterateSinkPads]("GI.Gst.Objects.Element#g:method:iterateSinkPads"), [iterateSrcPads]("GI.Gst.Objects.Element#g:method:iterateSrcPads"), [link]("GI.Gst.Objects.Element#g:method:link"), [linkFiltered]("GI.Gst.Objects.Element#g:method:linkFiltered"), [linkPads]("GI.Gst.Objects.Element#g:method:linkPads"), [linkPadsFiltered]("GI.Gst.Objects.Element#g:method:linkPadsFiltered"), [linkPadsFull]("GI.Gst.Objects.Element#g:method:linkPadsFull"), [lostState]("GI.Gst.Objects.Element#g:method:lostState"), [messageFull]("GI.Gst.Objects.Element#g:method:messageFull"), [messageFullWithDetails]("GI.Gst.Objects.Element#g:method:messageFullWithDetails"), [noMorePads]("GI.Gst.Objects.Element#g:method:noMorePads"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [postMessage]("GI.Gst.Objects.Element#g:method:postMessage"), [provideClock]("GI.Gst.Objects.Element#g:method:provideClock"), [pullPreroll]("GI.GstApp.Objects.AppSink#g:method:pullPreroll"), [pullSample]("GI.GstApp.Objects.AppSink#g:method:pullSample"), [query]("GI.Gst.Objects.Element#g:method:query"), [queryConvert]("GI.Gst.Objects.Element#g:method:queryConvert"), [queryDuration]("GI.Gst.Objects.Element#g:method:queryDuration"), [queryLatency]("GI.GstBase.Objects.BaseSink#g:method:queryLatency"), [queryPosition]("GI.Gst.Objects.Element#g:method:queryPosition"), [ref]("GI.Gst.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [releaseRequestPad]("GI.Gst.Objects.Element#g:method:releaseRequestPad"), [removeControlBinding]("GI.Gst.Objects.Object#g:method:removeControlBinding"), [removePad]("GI.Gst.Objects.Element#g:method:removePad"), [removePropertyNotifyWatch]("GI.Gst.Objects.Element#g:method:removePropertyNotifyWatch"), [requestPad]("GI.Gst.Objects.Element#g:method:requestPad"), [requestPadSimple]("GI.Gst.Objects.Element#g:method:requestPadSimple"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [seek]("GI.Gst.Objects.Element#g:method:seek"), [seekSimple]("GI.Gst.Objects.Element#g:method:seekSimple"), [sendEvent]("GI.Gst.Objects.Element#g:method:sendEvent"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [suggestNextSync]("GI.Gst.Objects.Object#g:method:suggestNextSync"), [syncStateWithParent]("GI.Gst.Objects.Element#g:method:syncStateWithParent"), [syncValues]("GI.Gst.Objects.Object#g:method:syncValues"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [tryPullPreroll]("GI.GstApp.Objects.AppSink#g:method:tryPullPreroll"), [tryPullSample]("GI.GstApp.Objects.AppSink#g:method:tryPullSample"), [unlink]("GI.Gst.Objects.Element#g:method:unlink"), [unlinkPads]("GI.Gst.Objects.Element#g:method:unlinkPads"), [unparent]("GI.Gst.Objects.Object#g:method:unparent"), [unref]("GI.Gst.Objects.Object#g:method:unref"), [wait]("GI.GstBase.Objects.BaseSink#g:method:wait"), [waitClock]("GI.GstBase.Objects.BaseSink#g:method:waitClock"), [waitPreroll]("GI.GstBase.Objects.BaseSink#g:method:waitPreroll"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getBaseTime]("GI.Gst.Objects.Element#g:method:getBaseTime"), [getBlocksize]("GI.GstBase.Objects.BaseSink#g:method:getBlocksize"), [getBufferListSupport]("GI.GstApp.Objects.AppSink#g:method:getBufferListSupport"), [getBus]("GI.Gst.Objects.Element#g:method:getBus"), [getCaps]("GI.GstApp.Objects.AppSink#g:method:getCaps"), [getClock]("GI.Gst.Objects.Element#g:method:getClock"), [getCompatiblePad]("GI.Gst.Objects.Element#g:method:getCompatiblePad"), [getCompatiblePadTemplate]("GI.Gst.Objects.Element#g:method:getCompatiblePadTemplate"), [getContext]("GI.Gst.Objects.Element#g:method:getContext"), [getContextUnlocked]("GI.Gst.Objects.Element#g:method:getContextUnlocked"), [getContexts]("GI.Gst.Objects.Element#g:method:getContexts"), [getControlBinding]("GI.Gst.Objects.Object#g:method:getControlBinding"), [getControlRate]("GI.Gst.Objects.Object#g:method:getControlRate"), [getCurrentClockTime]("GI.Gst.Objects.Element#g:method:getCurrentClockTime"), [getCurrentRunningTime]("GI.Gst.Objects.Element#g:method:getCurrentRunningTime"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDrop]("GI.GstApp.Objects.AppSink#g:method:getDrop"), [getDropOutOfSegment]("GI.GstBase.Objects.BaseSink#g:method:getDropOutOfSegment"), [getEmitSignals]("GI.GstApp.Objects.AppSink#g:method:getEmitSignals"), [getFactory]("GI.Gst.Objects.Element#g:method:getFactory"), [getGValueArray]("GI.Gst.Objects.Object#g:method:getGValueArray"), [getLastSample]("GI.GstBase.Objects.BaseSink#g:method:getLastSample"), [getLatency]("GI.GstBase.Objects.BaseSink#g:method:getLatency"), [getMaxBitrate]("GI.GstBase.Objects.BaseSink#g:method:getMaxBitrate"), [getMaxBuffers]("GI.GstApp.Objects.AppSink#g:method:getMaxBuffers"), [getMaxLateness]("GI.GstBase.Objects.BaseSink#g:method:getMaxLateness"), [getMetadata]("GI.Gst.Objects.Element#g:method:getMetadata"), [getName]("GI.Gst.Objects.Object#g:method:getName"), [getPadTemplate]("GI.Gst.Objects.Element#g:method:getPadTemplate"), [getPadTemplateList]("GI.Gst.Objects.Element#g:method:getPadTemplateList"), [getParent]("GI.Gst.Objects.Object#g:method:getParent"), [getPathString]("GI.Gst.Objects.Object#g:method:getPathString"), [getProcessingDeadline]("GI.GstBase.Objects.BaseSink#g:method:getProcessingDeadline"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getProtocols]("GI.Gst.Interfaces.URIHandler#g:method:getProtocols"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRenderDelay]("GI.GstBase.Objects.BaseSink#g:method:getRenderDelay"), [getRequestPad]("GI.Gst.Objects.Element#g:method:getRequestPad"), [getStartTime]("GI.Gst.Objects.Element#g:method:getStartTime"), [getState]("GI.Gst.Objects.Element#g:method:getState"), [getStaticPad]("GI.Gst.Objects.Element#g:method:getStaticPad"), [getStats]("GI.GstBase.Objects.BaseSink#g:method:getStats"), [getSync]("GI.GstBase.Objects.BaseSink#g:method:getSync"), [getThrottleTime]("GI.GstBase.Objects.BaseSink#g:method:getThrottleTime"), [getTsOffset]("GI.GstBase.Objects.BaseSink#g:method:getTsOffset"), [getUri]("GI.Gst.Interfaces.URIHandler#g:method:getUri"), [getUriType]("GI.Gst.Interfaces.URIHandler#g:method:getUriType"), [getValue]("GI.Gst.Objects.Object#g:method:getValue"), [getWaitOnEos]("GI.GstApp.Objects.AppSink#g:method:getWaitOnEos").
-- 
-- ==== Setters
-- [setAsyncEnabled]("GI.GstBase.Objects.BaseSink#g:method:setAsyncEnabled"), [setBaseTime]("GI.Gst.Objects.Element#g:method:setBaseTime"), [setBlocksize]("GI.GstBase.Objects.BaseSink#g:method:setBlocksize"), [setBufferListSupport]("GI.GstApp.Objects.AppSink#g:method:setBufferListSupport"), [setBus]("GI.Gst.Objects.Element#g:method:setBus"), [setCaps]("GI.GstApp.Objects.AppSink#g:method:setCaps"), [setClock]("GI.Gst.Objects.Element#g:method:setClock"), [setContext]("GI.Gst.Objects.Element#g:method:setContext"), [setControlBindingDisabled]("GI.Gst.Objects.Object#g:method:setControlBindingDisabled"), [setControlBindingsDisabled]("GI.Gst.Objects.Object#g:method:setControlBindingsDisabled"), [setControlRate]("GI.Gst.Objects.Object#g:method:setControlRate"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDrop]("GI.GstApp.Objects.AppSink#g:method:setDrop"), [setDropOutOfSegment]("GI.GstBase.Objects.BaseSink#g:method:setDropOutOfSegment"), [setEmitSignals]("GI.GstApp.Objects.AppSink#g:method:setEmitSignals"), [setLastSampleEnabled]("GI.GstBase.Objects.BaseSink#g:method:setLastSampleEnabled"), [setLockedState]("GI.Gst.Objects.Element#g:method:setLockedState"), [setMaxBitrate]("GI.GstBase.Objects.BaseSink#g:method:setMaxBitrate"), [setMaxBuffers]("GI.GstApp.Objects.AppSink#g:method:setMaxBuffers"), [setMaxLateness]("GI.GstBase.Objects.BaseSink#g:method:setMaxLateness"), [setName]("GI.Gst.Objects.Object#g:method:setName"), [setParent]("GI.Gst.Objects.Object#g:method:setParent"), [setProcessingDeadline]("GI.GstBase.Objects.BaseSink#g:method:setProcessingDeadline"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setQosEnabled]("GI.GstBase.Objects.BaseSink#g:method:setQosEnabled"), [setRenderDelay]("GI.GstBase.Objects.BaseSink#g:method:setRenderDelay"), [setStartTime]("GI.Gst.Objects.Element#g:method:setStartTime"), [setState]("GI.Gst.Objects.Element#g:method:setState"), [setSync]("GI.GstBase.Objects.BaseSink#g:method:setSync"), [setThrottleTime]("GI.GstBase.Objects.BaseSink#g:method:setThrottleTime"), [setTsOffset]("GI.GstBase.Objects.BaseSink#g:method:setTsOffset"), [setUri]("GI.Gst.Interfaces.URIHandler#g:method:setUri"), [setWaitOnEos]("GI.GstApp.Objects.AppSink#g:method:setWaitOnEos").

#if defined(ENABLE_OVERLOADING)
    ResolveAppSinkMethod                    ,
#endif

-- ** getBufferListSupport #method:getBufferListSupport#

#if defined(ENABLE_OVERLOADING)
    AppSinkGetBufferListSupportMethodInfo   ,
#endif
    appSinkGetBufferListSupport             ,


-- ** getCaps #method:getCaps#

#if defined(ENABLE_OVERLOADING)
    AppSinkGetCapsMethodInfo                ,
#endif
    appSinkGetCaps                          ,


-- ** getDrop #method:getDrop#

#if defined(ENABLE_OVERLOADING)
    AppSinkGetDropMethodInfo                ,
#endif
    appSinkGetDrop                          ,


-- ** getEmitSignals #method:getEmitSignals#

#if defined(ENABLE_OVERLOADING)
    AppSinkGetEmitSignalsMethodInfo         ,
#endif
    appSinkGetEmitSignals                   ,


-- ** getMaxBuffers #method:getMaxBuffers#

#if defined(ENABLE_OVERLOADING)
    AppSinkGetMaxBuffersMethodInfo          ,
#endif
    appSinkGetMaxBuffers                    ,


-- ** getWaitOnEos #method:getWaitOnEos#

#if defined(ENABLE_OVERLOADING)
    AppSinkGetWaitOnEosMethodInfo           ,
#endif
    appSinkGetWaitOnEos                     ,


-- ** isEos #method:isEos#

#if defined(ENABLE_OVERLOADING)
    AppSinkIsEosMethodInfo                  ,
#endif
    appSinkIsEos                            ,


-- ** pullPreroll #method:pullPreroll#

#if defined(ENABLE_OVERLOADING)
    AppSinkPullPrerollMethodInfo            ,
#endif
    appSinkPullPreroll                      ,


-- ** pullSample #method:pullSample#

#if defined(ENABLE_OVERLOADING)
    AppSinkPullSampleMethodInfo             ,
#endif
    appSinkPullSample                       ,


-- ** setBufferListSupport #method:setBufferListSupport#

#if defined(ENABLE_OVERLOADING)
    AppSinkSetBufferListSupportMethodInfo   ,
#endif
    appSinkSetBufferListSupport             ,


-- ** setCaps #method:setCaps#

#if defined(ENABLE_OVERLOADING)
    AppSinkSetCapsMethodInfo                ,
#endif
    appSinkSetCaps                          ,


-- ** setDrop #method:setDrop#

#if defined(ENABLE_OVERLOADING)
    AppSinkSetDropMethodInfo                ,
#endif
    appSinkSetDrop                          ,


-- ** setEmitSignals #method:setEmitSignals#

#if defined(ENABLE_OVERLOADING)
    AppSinkSetEmitSignalsMethodInfo         ,
#endif
    appSinkSetEmitSignals                   ,


-- ** setMaxBuffers #method:setMaxBuffers#

#if defined(ENABLE_OVERLOADING)
    AppSinkSetMaxBuffersMethodInfo          ,
#endif
    appSinkSetMaxBuffers                    ,


-- ** setWaitOnEos #method:setWaitOnEos#

#if defined(ENABLE_OVERLOADING)
    AppSinkSetWaitOnEosMethodInfo           ,
#endif
    appSinkSetWaitOnEos                     ,


-- ** tryPullPreroll #method:tryPullPreroll#

#if defined(ENABLE_OVERLOADING)
    AppSinkTryPullPrerollMethodInfo         ,
#endif
    appSinkTryPullPreroll                   ,


-- ** tryPullSample #method:tryPullSample#

#if defined(ENABLE_OVERLOADING)
    AppSinkTryPullSampleMethodInfo          ,
#endif
    appSinkTryPullSample                    ,




 -- * Properties


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

#if defined(ENABLE_OVERLOADING)
    AppSinkBufferListPropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    appSinkBufferList                       ,
#endif
    constructAppSinkBufferList              ,
    getAppSinkBufferList                    ,
    setAppSinkBufferList                    ,


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

#if defined(ENABLE_OVERLOADING)
    AppSinkCapsPropertyInfo                 ,
#endif
#if defined(ENABLE_OVERLOADING)
    appSinkCaps                             ,
#endif
    clearAppSinkCaps                        ,
    constructAppSinkCaps                    ,
    getAppSinkCaps                          ,
    setAppSinkCaps                          ,


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

#if defined(ENABLE_OVERLOADING)
    AppSinkDropPropertyInfo                 ,
#endif
#if defined(ENABLE_OVERLOADING)
    appSinkDrop                             ,
#endif
    constructAppSinkDrop                    ,
    getAppSinkDrop                          ,
    setAppSinkDrop                          ,


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

#if defined(ENABLE_OVERLOADING)
    AppSinkEmitSignalsPropertyInfo          ,
#endif
#if defined(ENABLE_OVERLOADING)
    appSinkEmitSignals                      ,
#endif
    constructAppSinkEmitSignals             ,
    getAppSinkEmitSignals                   ,
    setAppSinkEmitSignals                   ,


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

#if defined(ENABLE_OVERLOADING)
    AppSinkEosPropertyInfo                  ,
#endif
#if defined(ENABLE_OVERLOADING)
    appSinkEos                              ,
#endif
    getAppSinkEos                           ,


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

#if defined(ENABLE_OVERLOADING)
    AppSinkMaxBuffersPropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    appSinkMaxBuffers                       ,
#endif
    constructAppSinkMaxBuffers              ,
    getAppSinkMaxBuffers                    ,
    setAppSinkMaxBuffers                    ,


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

#if defined(ENABLE_OVERLOADING)
    AppSinkWaitOnEosPropertyInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    appSinkWaitOnEos                        ,
#endif
    constructAppSinkWaitOnEos               ,
    getAppSinkWaitOnEos                     ,
    setAppSinkWaitOnEos                     ,




 -- * Signals


-- ** eos #signal:eos#

    AppSinkEosCallback                      ,
#if defined(ENABLE_OVERLOADING)
    AppSinkEosSignalInfo                    ,
#endif
    afterAppSinkEos                         ,
    onAppSinkEos                            ,


-- ** newPreroll #signal:newPreroll#

    AppSinkNewPrerollCallback               ,
#if defined(ENABLE_OVERLOADING)
    AppSinkNewPrerollSignalInfo             ,
#endif
    afterAppSinkNewPreroll                  ,
    onAppSinkNewPreroll                     ,


-- ** newSample #signal:newSample#

    AppSinkNewSampleCallback                ,
#if defined(ENABLE_OVERLOADING)
    AppSinkNewSampleSignalInfo              ,
#endif
    afterAppSinkNewSample                   ,
    onAppSinkNewSample                      ,


-- ** newSerializedEvent #signal:newSerializedEvent#

    AppSinkNewSerializedEventCallback       ,
#if defined(ENABLE_OVERLOADING)
    AppSinkNewSerializedEventSignalInfo     ,
#endif
    afterAppSinkNewSerializedEvent          ,
    onAppSinkNewSerializedEvent             ,


-- ** pullPreroll #signal:pullPreroll#

    AppSinkPullPrerollCallback              ,
#if defined(ENABLE_OVERLOADING)
    AppSinkPullPrerollSignalInfo            ,
#endif
    afterAppSinkPullPreroll                 ,
    onAppSinkPullPreroll                    ,


-- ** pullSample #signal:pullSample#

    AppSinkPullSampleCallback               ,
#if defined(ENABLE_OVERLOADING)
    AppSinkPullSampleSignalInfo             ,
#endif
    afterAppSinkPullSample                  ,
    onAppSinkPullSample                     ,


-- ** tryPullObject #signal:tryPullObject#

    AppSinkTryPullObjectCallback            ,
#if defined(ENABLE_OVERLOADING)
    AppSinkTryPullObjectSignalInfo          ,
#endif
    afterAppSinkTryPullObject               ,
    onAppSinkTryPullObject                  ,


-- ** tryPullPreroll #signal:tryPullPreroll#

    AppSinkTryPullPrerollCallback           ,
#if defined(ENABLE_OVERLOADING)
    AppSinkTryPullPrerollSignalInfo         ,
#endif
    afterAppSinkTryPullPreroll              ,
    onAppSinkTryPullPreroll                 ,


-- ** tryPullSample #signal:tryPullSample#

    AppSinkTryPullSampleCallback            ,
#if defined(ENABLE_OVERLOADING)
    AppSinkTryPullSampleSignalInfo          ,
#endif
    afterAppSinkTryPullSample               ,
    onAppSinkTryPullSample                  ,




    ) where

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

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

import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gst.Enums as Gst.Enums
import qualified GI.Gst.Interfaces.URIHandler as Gst.URIHandler
import qualified GI.Gst.Objects.Element as Gst.Element
import qualified GI.Gst.Objects.Object as Gst.Object
import qualified GI.Gst.Structs.Caps as Gst.Caps
import qualified GI.Gst.Structs.MiniObject as Gst.MiniObject
import qualified GI.Gst.Structs.Sample as Gst.Sample
import qualified GI.GstBase.Objects.BaseSink as GstBase.BaseSink

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

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

foreign import ccall "gst_app_sink_get_type"
    c_gst_app_sink_get_type :: IO B.Types.GType

instance B.Types.TypedObject AppSink where
    glibType :: IO GType
glibType = IO GType
c_gst_app_sink_get_type

instance B.Types.GObject AppSink

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

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

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

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

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

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

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveAppSinkMethod t AppSink, O.OverloadedMethod info AppSink p, R.HasField t AppSink p) => R.HasField t AppSink p where
    getField = O.overloadedMethod @info

#endif

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

#endif

-- signal AppSink::eos
-- | Signal that the end-of-stream has been reached. This signal is emitted from
-- the streaming thread.
type AppSinkEosCallback =
    IO ()

type C_AppSinkEosCallback =
    Ptr AppSink ->                          -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_AppSinkEosCallback`.
foreign import ccall "wrapper"
    mk_AppSinkEosCallback :: C_AppSinkEosCallback -> IO (FunPtr C_AppSinkEosCallback)

wrap_AppSinkEosCallback :: 
    GObject a => (a -> AppSinkEosCallback) ->
    C_AppSinkEosCallback
wrap_AppSinkEosCallback :: forall a. GObject a => (a -> IO ()) -> C_AppSinkEosCallback
wrap_AppSinkEosCallback a -> IO ()
gi'cb Ptr AppSink
gi'selfPtr Ptr ()
_ = do
    Ptr AppSink -> (AppSink -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> IO ()) -> IO ()) -> (AppSink -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> IO ()
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self) 


-- | Connect a signal handler for the [eos](#signal:eos) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #eos callback
-- @
-- 
-- 
onAppSinkEos :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkEosCallback) -> m SignalHandlerId
onAppSinkEos :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onAppSinkEos a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_AppSinkEosCallback
wrapped' = (a -> IO ()) -> C_AppSinkEosCallback
forall a. GObject a => (a -> IO ()) -> C_AppSinkEosCallback
wrap_AppSinkEosCallback a -> IO ()
wrapped
    FunPtr C_AppSinkEosCallback
wrapped'' <- C_AppSinkEosCallback -> IO (FunPtr C_AppSinkEosCallback)
mk_AppSinkEosCallback C_AppSinkEosCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkEosCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"eos" FunPtr C_AppSinkEosCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [eos](#signal:eos) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #eos callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkEos :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkEosCallback) -> m SignalHandlerId
afterAppSinkEos :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterAppSinkEos a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_AppSinkEosCallback
wrapped' = (a -> IO ()) -> C_AppSinkEosCallback
forall a. GObject a => (a -> IO ()) -> C_AppSinkEosCallback
wrap_AppSinkEosCallback a -> IO ()
wrapped
    FunPtr C_AppSinkEosCallback
wrapped'' <- C_AppSinkEosCallback -> IO (FunPtr C_AppSinkEosCallback)
mk_AppSinkEosCallback C_AppSinkEosCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkEosCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"eos" FunPtr C_AppSinkEosCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkEosSignalInfo
instance SignalInfo AppSinkEosSignalInfo where
    type HaskellCallbackType AppSinkEosSignalInfo = AppSinkEosCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkEosCallback cb
        cb'' <- mk_AppSinkEosCallback cb'
        connectSignalFunPtr obj "eos" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::eos"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:eos"})

#endif

-- signal AppSink::new-preroll
-- | Signal that a new preroll sample is available.
-- 
-- This signal is emitted from the streaming thread and only when the
-- \"emit-signals\" property is 'P.True'.
-- 
-- The new preroll sample can be retrieved with the \"pull-preroll\" action
-- signal or 'GI.GstApp.Objects.AppSink.appSinkPullPreroll' either from this signal callback
-- or from any other thread.
-- 
-- Note that this signal is only emitted when the \"emit-signals\" property is
-- set to 'P.True', which it is not by default for performance reasons.
type AppSinkNewPrerollCallback =
    IO Gst.Enums.FlowReturn

type C_AppSinkNewPrerollCallback =
    Ptr AppSink ->                          -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_AppSinkNewPrerollCallback`.
foreign import ccall "wrapper"
    mk_AppSinkNewPrerollCallback :: C_AppSinkNewPrerollCallback -> IO (FunPtr C_AppSinkNewPrerollCallback)

wrap_AppSinkNewPrerollCallback :: 
    GObject a => (a -> AppSinkNewPrerollCallback) ->
    C_AppSinkNewPrerollCallback
wrap_AppSinkNewPrerollCallback :: forall a.
GObject a =>
(a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
wrap_AppSinkNewPrerollCallback a -> AppSinkNewPrerollCallback
gi'cb Ptr AppSink
gi'selfPtr Ptr ()
_ = do
    FlowReturn
result <- Ptr AppSink
-> (AppSink -> AppSinkNewPrerollCallback)
-> AppSinkNewPrerollCallback
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> AppSinkNewPrerollCallback)
 -> AppSinkNewPrerollCallback)
-> (AppSink -> AppSinkNewPrerollCallback)
-> AppSinkNewPrerollCallback
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> AppSinkNewPrerollCallback
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self) 
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (FlowReturn -> Int) -> FlowReturn -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FlowReturn -> Int
forall a. Enum a => a -> Int
fromEnum) FlowReturn
result
    CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [newPreroll](#signal:newPreroll) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #newPreroll callback
-- @
-- 
-- 
onAppSinkNewPreroll :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkNewPrerollCallback) -> m SignalHandlerId
onAppSinkNewPreroll :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a -> ((?self::a) => AppSinkNewPrerollCallback) -> m SignalHandlerId
onAppSinkNewPreroll a
obj (?self::a) => AppSinkNewPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkNewPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkNewPrerollCallback
(?self::a) => AppSinkNewPrerollCallback
cb
    let wrapped' :: C_AppSinkNewPrerollCallback
wrapped' = (a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
forall a.
GObject a =>
(a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
wrap_AppSinkNewPrerollCallback a -> AppSinkNewPrerollCallback
wrapped
    FunPtr C_AppSinkNewPrerollCallback
wrapped'' <- C_AppSinkNewPrerollCallback
-> IO (FunPtr C_AppSinkNewPrerollCallback)
mk_AppSinkNewPrerollCallback C_AppSinkNewPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkNewPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"new-preroll" FunPtr C_AppSinkNewPrerollCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [newPreroll](#signal:newPreroll) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #newPreroll callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkNewPreroll :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkNewPrerollCallback) -> m SignalHandlerId
afterAppSinkNewPreroll :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a -> ((?self::a) => AppSinkNewPrerollCallback) -> m SignalHandlerId
afterAppSinkNewPreroll a
obj (?self::a) => AppSinkNewPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkNewPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkNewPrerollCallback
(?self::a) => AppSinkNewPrerollCallback
cb
    let wrapped' :: C_AppSinkNewPrerollCallback
wrapped' = (a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
forall a.
GObject a =>
(a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
wrap_AppSinkNewPrerollCallback a -> AppSinkNewPrerollCallback
wrapped
    FunPtr C_AppSinkNewPrerollCallback
wrapped'' <- C_AppSinkNewPrerollCallback
-> IO (FunPtr C_AppSinkNewPrerollCallback)
mk_AppSinkNewPrerollCallback C_AppSinkNewPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkNewPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"new-preroll" FunPtr C_AppSinkNewPrerollCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkNewPrerollSignalInfo
instance SignalInfo AppSinkNewPrerollSignalInfo where
    type HaskellCallbackType AppSinkNewPrerollSignalInfo = AppSinkNewPrerollCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkNewPrerollCallback cb
        cb'' <- mk_AppSinkNewPrerollCallback cb'
        connectSignalFunPtr obj "new-preroll" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::new-preroll"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:newPreroll"})

#endif

-- signal AppSink::new-sample
-- | Signal that a new sample is available.
-- 
-- This signal is emitted from the streaming thread and only when the
-- \"emit-signals\" property is 'P.True'.
-- 
-- The new sample can be retrieved with the \"pull-sample\" action
-- signal or 'GI.GstApp.Objects.AppSink.appSinkPullSample' either from this signal callback
-- or from any other thread.
-- 
-- Note that this signal is only emitted when the \"emit-signals\" property is
-- set to 'P.True', which it is not by default for performance reasons.
type AppSinkNewSampleCallback =
    IO Gst.Enums.FlowReturn

type C_AppSinkNewSampleCallback =
    Ptr AppSink ->                          -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_AppSinkNewSampleCallback`.
foreign import ccall "wrapper"
    mk_AppSinkNewSampleCallback :: C_AppSinkNewSampleCallback -> IO (FunPtr C_AppSinkNewSampleCallback)

wrap_AppSinkNewSampleCallback :: 
    GObject a => (a -> AppSinkNewSampleCallback) ->
    C_AppSinkNewSampleCallback
wrap_AppSinkNewSampleCallback :: forall a.
GObject a =>
(a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
wrap_AppSinkNewSampleCallback a -> AppSinkNewPrerollCallback
gi'cb Ptr AppSink
gi'selfPtr Ptr ()
_ = do
    FlowReturn
result <- Ptr AppSink
-> (AppSink -> AppSinkNewPrerollCallback)
-> AppSinkNewPrerollCallback
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> AppSinkNewPrerollCallback)
 -> AppSinkNewPrerollCallback)
-> (AppSink -> AppSinkNewPrerollCallback)
-> AppSinkNewPrerollCallback
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> AppSinkNewPrerollCallback
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self) 
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (FlowReturn -> Int) -> FlowReturn -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FlowReturn -> Int
forall a. Enum a => a -> Int
fromEnum) FlowReturn
result
    CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [newSample](#signal:newSample) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #newSample callback
-- @
-- 
-- 
onAppSinkNewSample :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkNewSampleCallback) -> m SignalHandlerId
onAppSinkNewSample :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a -> ((?self::a) => AppSinkNewPrerollCallback) -> m SignalHandlerId
onAppSinkNewSample a
obj (?self::a) => AppSinkNewPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkNewPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkNewPrerollCallback
(?self::a) => AppSinkNewPrerollCallback
cb
    let wrapped' :: C_AppSinkNewPrerollCallback
wrapped' = (a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
forall a.
GObject a =>
(a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
wrap_AppSinkNewSampleCallback a -> AppSinkNewPrerollCallback
wrapped
    FunPtr C_AppSinkNewPrerollCallback
wrapped'' <- C_AppSinkNewPrerollCallback
-> IO (FunPtr C_AppSinkNewPrerollCallback)
mk_AppSinkNewSampleCallback C_AppSinkNewPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkNewPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"new-sample" FunPtr C_AppSinkNewPrerollCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [newSample](#signal:newSample) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #newSample callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkNewSample :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkNewSampleCallback) -> m SignalHandlerId
afterAppSinkNewSample :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a -> ((?self::a) => AppSinkNewPrerollCallback) -> m SignalHandlerId
afterAppSinkNewSample a
obj (?self::a) => AppSinkNewPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkNewPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkNewPrerollCallback
(?self::a) => AppSinkNewPrerollCallback
cb
    let wrapped' :: C_AppSinkNewPrerollCallback
wrapped' = (a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
forall a.
GObject a =>
(a -> AppSinkNewPrerollCallback) -> C_AppSinkNewPrerollCallback
wrap_AppSinkNewSampleCallback a -> AppSinkNewPrerollCallback
wrapped
    FunPtr C_AppSinkNewPrerollCallback
wrapped'' <- C_AppSinkNewPrerollCallback
-> IO (FunPtr C_AppSinkNewPrerollCallback)
mk_AppSinkNewSampleCallback C_AppSinkNewPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkNewPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"new-sample" FunPtr C_AppSinkNewPrerollCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkNewSampleSignalInfo
instance SignalInfo AppSinkNewSampleSignalInfo where
    type HaskellCallbackType AppSinkNewSampleSignalInfo = AppSinkNewSampleCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkNewSampleCallback cb
        cb'' <- mk_AppSinkNewSampleCallback cb'
        connectSignalFunPtr obj "new-sample" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::new-sample"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:newSample"})

#endif

-- signal AppSink::new-serialized-event
-- | Signal that a new downstream serialized event is available.
-- 
-- This signal is emitted from the streaming thread and only when the
-- \"emit-signals\" property is 'P.True'.
-- 
-- The new event can be retrieved with the \"try-pull-object\" action
-- signal or @/gst_app_sink_pull_object()/@ either from this signal callback
-- or from any other thread.
-- 
-- EOS will not be notified using this signal, use [AppSink::eos]("GI.GstApp.Objects.AppSink#g:signal:eos") instead.
-- EOS cannot be pulled either, use 'GI.GstApp.Objects.AppSink.appSinkIsEos' to check for it.
-- 
-- Note that this signal is only emitted when the \"emit-signals\" property is
-- set to 'P.True', which it is not by default for performance reasons.
-- 
-- The callback should return 'P.True' if the event has been handled, which will
-- skip basesink handling of the event, 'P.False' otherwise.
-- 
-- /Since: 1.20/
type AppSinkNewSerializedEventCallback =
    IO Bool

type C_AppSinkNewSerializedEventCallback =
    Ptr AppSink ->                          -- object
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_AppSinkNewSerializedEventCallback`.
foreign import ccall "wrapper"
    mk_AppSinkNewSerializedEventCallback :: C_AppSinkNewSerializedEventCallback -> IO (FunPtr C_AppSinkNewSerializedEventCallback)

wrap_AppSinkNewSerializedEventCallback :: 
    GObject a => (a -> AppSinkNewSerializedEventCallback) ->
    C_AppSinkNewSerializedEventCallback
wrap_AppSinkNewSerializedEventCallback :: forall a.
GObject a =>
(a -> AppSinkNewSerializedEventCallback)
-> C_AppSinkNewPrerollCallback
wrap_AppSinkNewSerializedEventCallback a -> AppSinkNewSerializedEventCallback
gi'cb Ptr AppSink
gi'selfPtr Ptr ()
_ = do
    Bool
result <- Ptr AppSink
-> (AppSink -> AppSinkNewSerializedEventCallback)
-> AppSinkNewSerializedEventCallback
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> AppSinkNewSerializedEventCallback)
 -> AppSinkNewSerializedEventCallback)
-> (AppSink -> AppSinkNewSerializedEventCallback)
-> AppSinkNewSerializedEventCallback
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> AppSinkNewSerializedEventCallback
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self) 
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
result
    CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [newSerializedEvent](#signal:newSerializedEvent) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #newSerializedEvent callback
-- @
-- 
-- 
onAppSinkNewSerializedEvent :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkNewSerializedEventCallback) -> m SignalHandlerId
onAppSinkNewSerializedEvent :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkNewSerializedEventCallback)
-> m SignalHandlerId
onAppSinkNewSerializedEvent a
obj (?self::a) => AppSinkNewSerializedEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkNewSerializedEventCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkNewSerializedEventCallback
(?self::a) => AppSinkNewSerializedEventCallback
cb
    let wrapped' :: C_AppSinkNewPrerollCallback
wrapped' = (a -> AppSinkNewSerializedEventCallback)
-> C_AppSinkNewPrerollCallback
forall a.
GObject a =>
(a -> AppSinkNewSerializedEventCallback)
-> C_AppSinkNewPrerollCallback
wrap_AppSinkNewSerializedEventCallback a -> AppSinkNewSerializedEventCallback
wrapped
    FunPtr C_AppSinkNewPrerollCallback
wrapped'' <- C_AppSinkNewPrerollCallback
-> IO (FunPtr C_AppSinkNewPrerollCallback)
mk_AppSinkNewSerializedEventCallback C_AppSinkNewPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkNewPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"new-serialized-event" FunPtr C_AppSinkNewPrerollCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [newSerializedEvent](#signal:newSerializedEvent) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #newSerializedEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkNewSerializedEvent :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkNewSerializedEventCallback) -> m SignalHandlerId
afterAppSinkNewSerializedEvent :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkNewSerializedEventCallback)
-> m SignalHandlerId
afterAppSinkNewSerializedEvent a
obj (?self::a) => AppSinkNewSerializedEventCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkNewSerializedEventCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkNewSerializedEventCallback
(?self::a) => AppSinkNewSerializedEventCallback
cb
    let wrapped' :: C_AppSinkNewPrerollCallback
wrapped' = (a -> AppSinkNewSerializedEventCallback)
-> C_AppSinkNewPrerollCallback
forall a.
GObject a =>
(a -> AppSinkNewSerializedEventCallback)
-> C_AppSinkNewPrerollCallback
wrap_AppSinkNewSerializedEventCallback a -> AppSinkNewSerializedEventCallback
wrapped
    FunPtr C_AppSinkNewPrerollCallback
wrapped'' <- C_AppSinkNewPrerollCallback
-> IO (FunPtr C_AppSinkNewPrerollCallback)
mk_AppSinkNewSerializedEventCallback C_AppSinkNewPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkNewPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"new-serialized-event" FunPtr C_AppSinkNewPrerollCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkNewSerializedEventSignalInfo
instance SignalInfo AppSinkNewSerializedEventSignalInfo where
    type HaskellCallbackType AppSinkNewSerializedEventSignalInfo = AppSinkNewSerializedEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkNewSerializedEventCallback cb
        cb'' <- mk_AppSinkNewSerializedEventCallback cb'
        connectSignalFunPtr obj "new-serialized-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::new-serialized-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:newSerializedEvent"})

#endif

-- signal AppSink::pull-preroll
-- | Get the last preroll sample in /@appsink@/. This was the sample that caused the
-- appsink to preroll in the PAUSED state.
-- 
-- This function is typically used when dealing with a pipeline in the PAUSED
-- state. Calling this function after doing a seek will give the sample right
-- after the seek position.
-- 
-- Calling this function will clear the internal reference to the preroll
-- buffer.
-- 
-- Note that the preroll sample will also be returned as the first sample
-- when calling 'GI.GstApp.Objects.AppSink.appSinkPullSample' or the \"pull-sample\" action signal.
-- 
-- If an EOS event was received before any buffers, this function returns
-- 'P.Nothing'. Use gst_app_sink_is_eos () to check for the EOS condition.
-- 
-- This function blocks until a preroll sample or EOS is received or the appsink
-- element is set to the READY\/NULL state.
type AppSinkPullPrerollCallback =
    IO (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or NULL when the appsink is stopped or EOS.

type C_AppSinkPullPrerollCallback =
    Ptr AppSink ->                          -- object
    Ptr () ->                               -- user_data
    IO (Ptr Gst.Sample.Sample)

-- | Generate a function pointer callable from C code, from a `C_AppSinkPullPrerollCallback`.
foreign import ccall "wrapper"
    mk_AppSinkPullPrerollCallback :: C_AppSinkPullPrerollCallback -> IO (FunPtr C_AppSinkPullPrerollCallback)

wrap_AppSinkPullPrerollCallback :: 
    GObject a => (a -> AppSinkPullPrerollCallback) ->
    C_AppSinkPullPrerollCallback
wrap_AppSinkPullPrerollCallback :: forall a.
GObject a =>
(a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
wrap_AppSinkPullPrerollCallback a -> AppSinkPullPrerollCallback
gi'cb Ptr AppSink
gi'selfPtr Ptr ()
_ = do
    Maybe Sample
result <- Ptr AppSink
-> (AppSink -> AppSinkPullPrerollCallback)
-> AppSinkPullPrerollCallback
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> AppSinkPullPrerollCallback)
 -> AppSinkPullPrerollCallback)
-> (AppSink -> AppSinkPullPrerollCallback)
-> AppSinkPullPrerollCallback
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> AppSinkPullPrerollCallback
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self) 
    Ptr Sample
-> Maybe Sample -> (Sample -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr Sample
forall a. Ptr a
FP.nullPtr Maybe Sample
result ((Sample -> IO (Ptr Sample)) -> IO (Ptr Sample))
-> (Sample -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall a b. (a -> b) -> a -> b
$ \Sample
result' -> do
        Ptr Sample
result'' <- Sample -> IO (Ptr Sample)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Sample
result'
        Ptr Sample -> IO (Ptr Sample)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Sample
result''


-- | Connect a signal handler for the [pullPreroll](#signal:pullPreroll) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #pullPreroll callback
-- @
-- 
-- 
onAppSinkPullPreroll :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkPullPrerollCallback) -> m SignalHandlerId
onAppSinkPullPreroll :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkPullPrerollCallback) -> m SignalHandlerId
onAppSinkPullPreroll a
obj (?self::a) => AppSinkPullPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkPullPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkPullPrerollCallback
(?self::a) => AppSinkPullPrerollCallback
cb
    let wrapped' :: C_AppSinkPullPrerollCallback
wrapped' = (a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
forall a.
GObject a =>
(a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
wrap_AppSinkPullPrerollCallback a -> AppSinkPullPrerollCallback
wrapped
    FunPtr C_AppSinkPullPrerollCallback
wrapped'' <- C_AppSinkPullPrerollCallback
-> IO (FunPtr C_AppSinkPullPrerollCallback)
mk_AppSinkPullPrerollCallback C_AppSinkPullPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkPullPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pull-preroll" FunPtr C_AppSinkPullPrerollCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [pullPreroll](#signal:pullPreroll) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #pullPreroll callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkPullPreroll :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkPullPrerollCallback) -> m SignalHandlerId
afterAppSinkPullPreroll :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkPullPrerollCallback) -> m SignalHandlerId
afterAppSinkPullPreroll a
obj (?self::a) => AppSinkPullPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkPullPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkPullPrerollCallback
(?self::a) => AppSinkPullPrerollCallback
cb
    let wrapped' :: C_AppSinkPullPrerollCallback
wrapped' = (a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
forall a.
GObject a =>
(a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
wrap_AppSinkPullPrerollCallback a -> AppSinkPullPrerollCallback
wrapped
    FunPtr C_AppSinkPullPrerollCallback
wrapped'' <- C_AppSinkPullPrerollCallback
-> IO (FunPtr C_AppSinkPullPrerollCallback)
mk_AppSinkPullPrerollCallback C_AppSinkPullPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkPullPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pull-preroll" FunPtr C_AppSinkPullPrerollCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkPullPrerollSignalInfo
instance SignalInfo AppSinkPullPrerollSignalInfo where
    type HaskellCallbackType AppSinkPullPrerollSignalInfo = AppSinkPullPrerollCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkPullPrerollCallback cb
        cb'' <- mk_AppSinkPullPrerollCallback cb'
        connectSignalFunPtr obj "pull-preroll" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::pull-preroll"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:pullPreroll"})

#endif

-- signal AppSink::pull-sample
-- | This function blocks until a sample or EOS becomes available or the appsink
-- element is set to the READY\/NULL state.
-- 
-- This function will only return samples when the appsink is in the PLAYING
-- state. All rendered samples will be put in a queue so that the application
-- can pull samples at its own rate.
-- 
-- Note that when the application does not pull samples fast enough, the
-- queued samples could consume a lot of memory, especially when dealing with
-- raw video frames. It\'s possible to control the behaviour of the queue with
-- the \"drop\" and \"max-buffers\" properties.
-- 
-- If an EOS event was received before any buffers, this function returns
-- 'P.Nothing'. Use gst_app_sink_is_eos () to check for the EOS condition.
type AppSinkPullSampleCallback =
    IO (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or NULL when the appsink is stopped or EOS.

type C_AppSinkPullSampleCallback =
    Ptr AppSink ->                          -- object
    Ptr () ->                               -- user_data
    IO (Ptr Gst.Sample.Sample)

-- | Generate a function pointer callable from C code, from a `C_AppSinkPullSampleCallback`.
foreign import ccall "wrapper"
    mk_AppSinkPullSampleCallback :: C_AppSinkPullSampleCallback -> IO (FunPtr C_AppSinkPullSampleCallback)

wrap_AppSinkPullSampleCallback :: 
    GObject a => (a -> AppSinkPullSampleCallback) ->
    C_AppSinkPullSampleCallback
wrap_AppSinkPullSampleCallback :: forall a.
GObject a =>
(a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
wrap_AppSinkPullSampleCallback a -> AppSinkPullPrerollCallback
gi'cb Ptr AppSink
gi'selfPtr Ptr ()
_ = do
    Maybe Sample
result <- Ptr AppSink
-> (AppSink -> AppSinkPullPrerollCallback)
-> AppSinkPullPrerollCallback
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> AppSinkPullPrerollCallback)
 -> AppSinkPullPrerollCallback)
-> (AppSink -> AppSinkPullPrerollCallback)
-> AppSinkPullPrerollCallback
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> AppSinkPullPrerollCallback
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self) 
    Ptr Sample
-> Maybe Sample -> (Sample -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr Sample
forall a. Ptr a
FP.nullPtr Maybe Sample
result ((Sample -> IO (Ptr Sample)) -> IO (Ptr Sample))
-> (Sample -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall a b. (a -> b) -> a -> b
$ \Sample
result' -> do
        Ptr Sample
result'' <- Sample -> IO (Ptr Sample)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Sample
result'
        Ptr Sample -> IO (Ptr Sample)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Sample
result''


-- | Connect a signal handler for the [pullSample](#signal:pullSample) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #pullSample callback
-- @
-- 
-- 
onAppSinkPullSample :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkPullSampleCallback) -> m SignalHandlerId
onAppSinkPullSample :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkPullPrerollCallback) -> m SignalHandlerId
onAppSinkPullSample a
obj (?self::a) => AppSinkPullPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkPullPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkPullPrerollCallback
(?self::a) => AppSinkPullPrerollCallback
cb
    let wrapped' :: C_AppSinkPullPrerollCallback
wrapped' = (a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
forall a.
GObject a =>
(a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
wrap_AppSinkPullSampleCallback a -> AppSinkPullPrerollCallback
wrapped
    FunPtr C_AppSinkPullPrerollCallback
wrapped'' <- C_AppSinkPullPrerollCallback
-> IO (FunPtr C_AppSinkPullPrerollCallback)
mk_AppSinkPullSampleCallback C_AppSinkPullPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkPullPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pull-sample" FunPtr C_AppSinkPullPrerollCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [pullSample](#signal:pullSample) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #pullSample callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkPullSample :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkPullSampleCallback) -> m SignalHandlerId
afterAppSinkPullSample :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkPullPrerollCallback) -> m SignalHandlerId
afterAppSinkPullSample a
obj (?self::a) => AppSinkPullPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkPullPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in AppSinkPullPrerollCallback
(?self::a) => AppSinkPullPrerollCallback
cb
    let wrapped' :: C_AppSinkPullPrerollCallback
wrapped' = (a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
forall a.
GObject a =>
(a -> AppSinkPullPrerollCallback) -> C_AppSinkPullPrerollCallback
wrap_AppSinkPullSampleCallback a -> AppSinkPullPrerollCallback
wrapped
    FunPtr C_AppSinkPullPrerollCallback
wrapped'' <- C_AppSinkPullPrerollCallback
-> IO (FunPtr C_AppSinkPullPrerollCallback)
mk_AppSinkPullSampleCallback C_AppSinkPullPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkPullPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pull-sample" FunPtr C_AppSinkPullPrerollCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkPullSampleSignalInfo
instance SignalInfo AppSinkPullSampleSignalInfo where
    type HaskellCallbackType AppSinkPullSampleSignalInfo = AppSinkPullSampleCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkPullSampleCallback cb
        cb'' <- mk_AppSinkPullSampleCallback cb'
        connectSignalFunPtr obj "pull-sample" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::pull-sample"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:pullSample"})

#endif

-- signal AppSink::try-pull-object
-- | This function blocks until a sample or an event becomes available or the appsink
-- element is set to the READY\/NULL state or the timeout expires.
-- 
-- This function will only return samples when the appsink is in the PLAYING
-- state. All rendered samples and events will be put in a queue so that the application
-- can pull them at its own rate.
-- Events can be pulled when the appsink is in the READY, PAUSED or PLAYING state.
-- 
-- Note that when the application does not pull samples fast enough, the
-- queued samples could consume a lot of memory, especially when dealing with
-- raw video frames. It\'s possible to control the behaviour of the queue with
-- the \"drop\" and \"max-buffers\" properties.
-- 
-- This function will only pull serialized events, excluding
-- the EOS event for which this functions returns
-- 'P.Nothing'. Use 'GI.GstApp.Objects.AppSink.appSinkIsEos' to check for the EOS condition.
-- 
-- This signal is a variant of [AppSink::tryPullSample]("GI.GstApp.Objects.AppSink#g:signal:tryPullSample"): that can be used
-- to handle incoming events as well as samples.
-- 
-- Note that future releases may extend this API to return other object types
-- so make sure that your code is checking for the actual type it is handling.
-- 
-- /Since: 1.20/
type AppSinkTryPullObjectCallback =
    Word64
    -- ^ /@timeout@/: the maximum amount of time to wait for a sample
    -> IO (Maybe Gst.MiniObject.MiniObject)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or a t'GI.Gst.Structs.Event.Event' or NULL when the appsink is stopped or EOS or the timeout expires.

type C_AppSinkTryPullObjectCallback =
    Ptr AppSink ->                          -- object
    Word64 ->
    Ptr () ->                               -- user_data
    IO (Ptr Gst.MiniObject.MiniObject)

-- | Generate a function pointer callable from C code, from a `C_AppSinkTryPullObjectCallback`.
foreign import ccall "wrapper"
    mk_AppSinkTryPullObjectCallback :: C_AppSinkTryPullObjectCallback -> IO (FunPtr C_AppSinkTryPullObjectCallback)

wrap_AppSinkTryPullObjectCallback :: 
    GObject a => (a -> AppSinkTryPullObjectCallback) ->
    C_AppSinkTryPullObjectCallback
wrap_AppSinkTryPullObjectCallback :: forall a.
GObject a =>
(a -> AppSinkTryPullObjectCallback)
-> C_AppSinkTryPullObjectCallback
wrap_AppSinkTryPullObjectCallback a -> AppSinkTryPullObjectCallback
gi'cb Ptr AppSink
gi'selfPtr Word64
timeout Ptr ()
_ = do
    Maybe MiniObject
result <- Ptr AppSink
-> (AppSink -> IO (Maybe MiniObject)) -> IO (Maybe MiniObject)
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> IO (Maybe MiniObject)) -> IO (Maybe MiniObject))
-> (AppSink -> IO (Maybe MiniObject)) -> IO (Maybe MiniObject)
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> AppSinkTryPullObjectCallback
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self)  Word64
timeout
    Ptr MiniObject
-> Maybe MiniObject
-> (MiniObject -> IO (Ptr MiniObject))
-> IO (Ptr MiniObject)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr MiniObject
forall a. Ptr a
FP.nullPtr Maybe MiniObject
result ((MiniObject -> IO (Ptr MiniObject)) -> IO (Ptr MiniObject))
-> (MiniObject -> IO (Ptr MiniObject)) -> IO (Ptr MiniObject)
forall a b. (a -> b) -> a -> b
$ \MiniObject
result' -> do
        Ptr MiniObject
result'' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed MiniObject
result'
        Ptr MiniObject -> IO (Ptr MiniObject)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MiniObject
result''


-- | Connect a signal handler for the [tryPullObject](#signal:tryPullObject) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #tryPullObject callback
-- @
-- 
-- 
onAppSinkTryPullObject :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkTryPullObjectCallback) -> m SignalHandlerId
onAppSinkTryPullObject :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkTryPullObjectCallback)
-> m SignalHandlerId
onAppSinkTryPullObject a
obj (?self::a) => AppSinkTryPullObjectCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkTryPullObjectCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => AppSinkTryPullObjectCallback
AppSinkTryPullObjectCallback
cb
    let wrapped' :: C_AppSinkTryPullObjectCallback
wrapped' = (a -> AppSinkTryPullObjectCallback)
-> C_AppSinkTryPullObjectCallback
forall a.
GObject a =>
(a -> AppSinkTryPullObjectCallback)
-> C_AppSinkTryPullObjectCallback
wrap_AppSinkTryPullObjectCallback a -> AppSinkTryPullObjectCallback
wrapped
    FunPtr C_AppSinkTryPullObjectCallback
wrapped'' <- C_AppSinkTryPullObjectCallback
-> IO (FunPtr C_AppSinkTryPullObjectCallback)
mk_AppSinkTryPullObjectCallback C_AppSinkTryPullObjectCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkTryPullObjectCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"try-pull-object" FunPtr C_AppSinkTryPullObjectCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [tryPullObject](#signal:tryPullObject) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #tryPullObject callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkTryPullObject :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkTryPullObjectCallback) -> m SignalHandlerId
afterAppSinkTryPullObject :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkTryPullObjectCallback)
-> m SignalHandlerId
afterAppSinkTryPullObject a
obj (?self::a) => AppSinkTryPullObjectCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkTryPullObjectCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => AppSinkTryPullObjectCallback
AppSinkTryPullObjectCallback
cb
    let wrapped' :: C_AppSinkTryPullObjectCallback
wrapped' = (a -> AppSinkTryPullObjectCallback)
-> C_AppSinkTryPullObjectCallback
forall a.
GObject a =>
(a -> AppSinkTryPullObjectCallback)
-> C_AppSinkTryPullObjectCallback
wrap_AppSinkTryPullObjectCallback a -> AppSinkTryPullObjectCallback
wrapped
    FunPtr C_AppSinkTryPullObjectCallback
wrapped'' <- C_AppSinkTryPullObjectCallback
-> IO (FunPtr C_AppSinkTryPullObjectCallback)
mk_AppSinkTryPullObjectCallback C_AppSinkTryPullObjectCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkTryPullObjectCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"try-pull-object" FunPtr C_AppSinkTryPullObjectCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkTryPullObjectSignalInfo
instance SignalInfo AppSinkTryPullObjectSignalInfo where
    type HaskellCallbackType AppSinkTryPullObjectSignalInfo = AppSinkTryPullObjectCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkTryPullObjectCallback cb
        cb'' <- mk_AppSinkTryPullObjectCallback cb'
        connectSignalFunPtr obj "try-pull-object" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::try-pull-object"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:tryPullObject"})

#endif

-- signal AppSink::try-pull-preroll
-- | Get the last preroll sample in /@appsink@/. This was the sample that caused the
-- appsink to preroll in the PAUSED state.
-- 
-- This function is typically used when dealing with a pipeline in the PAUSED
-- state. Calling this function after doing a seek will give the sample right
-- after the seek position.
-- 
-- Calling this function will clear the internal reference to the preroll
-- buffer.
-- 
-- Note that the preroll sample will also be returned as the first sample
-- when calling 'GI.GstApp.Objects.AppSink.appSinkPullSample' or the \"pull-sample\" action signal.
-- 
-- If an EOS event was received before any buffers or the timeout expires,
-- this function returns 'P.Nothing'. Use gst_app_sink_is_eos () to check for the EOS
-- condition.
-- 
-- This function blocks until a preroll sample or EOS is received, the appsink
-- element is set to the READY\/NULL state, or the timeout expires.
-- 
-- /Since: 1.10/
type AppSinkTryPullPrerollCallback =
    Word64
    -- ^ /@timeout@/: the maximum amount of time to wait for the preroll sample
    -> IO (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or NULL when the appsink is stopped or EOS or the timeout expires.

type C_AppSinkTryPullPrerollCallback =
    Ptr AppSink ->                          -- object
    Word64 ->
    Ptr () ->                               -- user_data
    IO (Ptr Gst.Sample.Sample)

-- | Generate a function pointer callable from C code, from a `C_AppSinkTryPullPrerollCallback`.
foreign import ccall "wrapper"
    mk_AppSinkTryPullPrerollCallback :: C_AppSinkTryPullPrerollCallback -> IO (FunPtr C_AppSinkTryPullPrerollCallback)

wrap_AppSinkTryPullPrerollCallback :: 
    GObject a => (a -> AppSinkTryPullPrerollCallback) ->
    C_AppSinkTryPullPrerollCallback
wrap_AppSinkTryPullPrerollCallback :: forall a.
GObject a =>
(a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
wrap_AppSinkTryPullPrerollCallback a -> AppSinkTryPullPrerollCallback
gi'cb Ptr AppSink
gi'selfPtr Word64
timeout Ptr ()
_ = do
    Maybe Sample
result <- Ptr AppSink
-> (AppSink -> AppSinkPullPrerollCallback)
-> AppSinkPullPrerollCallback
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> AppSinkPullPrerollCallback)
 -> AppSinkPullPrerollCallback)
-> (AppSink -> AppSinkPullPrerollCallback)
-> AppSinkPullPrerollCallback
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> AppSinkTryPullPrerollCallback
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self)  Word64
timeout
    Ptr Sample
-> Maybe Sample -> (Sample -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr Sample
forall a. Ptr a
FP.nullPtr Maybe Sample
result ((Sample -> IO (Ptr Sample)) -> IO (Ptr Sample))
-> (Sample -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall a b. (a -> b) -> a -> b
$ \Sample
result' -> do
        Ptr Sample
result'' <- Sample -> IO (Ptr Sample)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Sample
result'
        Ptr Sample -> IO (Ptr Sample)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Sample
result''


-- | Connect a signal handler for the [tryPullPreroll](#signal:tryPullPreroll) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #tryPullPreroll callback
-- @
-- 
-- 
onAppSinkTryPullPreroll :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkTryPullPrerollCallback) -> m SignalHandlerId
onAppSinkTryPullPreroll :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkTryPullPrerollCallback)
-> m SignalHandlerId
onAppSinkTryPullPreroll a
obj (?self::a) => AppSinkTryPullPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkTryPullPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => AppSinkTryPullPrerollCallback
AppSinkTryPullPrerollCallback
cb
    let wrapped' :: C_AppSinkTryPullPrerollCallback
wrapped' = (a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
forall a.
GObject a =>
(a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
wrap_AppSinkTryPullPrerollCallback a -> AppSinkTryPullPrerollCallback
wrapped
    FunPtr C_AppSinkTryPullPrerollCallback
wrapped'' <- C_AppSinkTryPullPrerollCallback
-> IO (FunPtr C_AppSinkTryPullPrerollCallback)
mk_AppSinkTryPullPrerollCallback C_AppSinkTryPullPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkTryPullPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"try-pull-preroll" FunPtr C_AppSinkTryPullPrerollCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [tryPullPreroll](#signal:tryPullPreroll) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #tryPullPreroll callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkTryPullPreroll :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkTryPullPrerollCallback) -> m SignalHandlerId
afterAppSinkTryPullPreroll :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkTryPullPrerollCallback)
-> m SignalHandlerId
afterAppSinkTryPullPreroll a
obj (?self::a) => AppSinkTryPullPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkTryPullPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => AppSinkTryPullPrerollCallback
AppSinkTryPullPrerollCallback
cb
    let wrapped' :: C_AppSinkTryPullPrerollCallback
wrapped' = (a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
forall a.
GObject a =>
(a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
wrap_AppSinkTryPullPrerollCallback a -> AppSinkTryPullPrerollCallback
wrapped
    FunPtr C_AppSinkTryPullPrerollCallback
wrapped'' <- C_AppSinkTryPullPrerollCallback
-> IO (FunPtr C_AppSinkTryPullPrerollCallback)
mk_AppSinkTryPullPrerollCallback C_AppSinkTryPullPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkTryPullPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"try-pull-preroll" FunPtr C_AppSinkTryPullPrerollCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkTryPullPrerollSignalInfo
instance SignalInfo AppSinkTryPullPrerollSignalInfo where
    type HaskellCallbackType AppSinkTryPullPrerollSignalInfo = AppSinkTryPullPrerollCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkTryPullPrerollCallback cb
        cb'' <- mk_AppSinkTryPullPrerollCallback cb'
        connectSignalFunPtr obj "try-pull-preroll" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::try-pull-preroll"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:tryPullPreroll"})

#endif

-- signal AppSink::try-pull-sample
-- | This function blocks until a sample or EOS becomes available or the appsink
-- element is set to the READY\/NULL state or the timeout expires.
-- 
-- This function will only return samples when the appsink is in the PLAYING
-- state. All rendered samples will be put in a queue so that the application
-- can pull samples at its own rate.
-- 
-- Note that when the application does not pull samples fast enough, the
-- queued samples could consume a lot of memory, especially when dealing with
-- raw video frames. It\'s possible to control the behaviour of the queue with
-- the \"drop\" and \"max-buffers\" properties.
-- 
-- If an EOS event was received before any buffers or the timeout expires,
-- this function returns 'P.Nothing'. Use gst_app_sink_is_eos () to check
-- for the EOS condition.
-- 
-- /Since: 1.10/
type AppSinkTryPullSampleCallback =
    Word64
    -- ^ /@timeout@/: the maximum amount of time to wait for a sample
    -> IO (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or NULL when the appsink is stopped or EOS or the timeout expires.

type C_AppSinkTryPullSampleCallback =
    Ptr AppSink ->                          -- object
    Word64 ->
    Ptr () ->                               -- user_data
    IO (Ptr Gst.Sample.Sample)

-- | Generate a function pointer callable from C code, from a `C_AppSinkTryPullSampleCallback`.
foreign import ccall "wrapper"
    mk_AppSinkTryPullSampleCallback :: C_AppSinkTryPullSampleCallback -> IO (FunPtr C_AppSinkTryPullSampleCallback)

wrap_AppSinkTryPullSampleCallback :: 
    GObject a => (a -> AppSinkTryPullSampleCallback) ->
    C_AppSinkTryPullSampleCallback
wrap_AppSinkTryPullSampleCallback :: forall a.
GObject a =>
(a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
wrap_AppSinkTryPullSampleCallback a -> AppSinkTryPullPrerollCallback
gi'cb Ptr AppSink
gi'selfPtr Word64
timeout Ptr ()
_ = do
    Maybe Sample
result <- Ptr AppSink
-> (AppSink -> AppSinkPullPrerollCallback)
-> AppSinkPullPrerollCallback
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr AppSink
gi'selfPtr ((AppSink -> AppSinkPullPrerollCallback)
 -> AppSinkPullPrerollCallback)
-> (AppSink -> AppSinkPullPrerollCallback)
-> AppSinkPullPrerollCallback
forall a b. (a -> b) -> a -> b
$ \AppSink
gi'self -> a -> AppSinkTryPullPrerollCallback
gi'cb (AppSink -> a
forall a b. Coercible a b => a -> b
Coerce.coerce AppSink
gi'self)  Word64
timeout
    Ptr Sample
-> Maybe Sample -> (Sample -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr Sample
forall a. Ptr a
FP.nullPtr Maybe Sample
result ((Sample -> IO (Ptr Sample)) -> IO (Ptr Sample))
-> (Sample -> IO (Ptr Sample)) -> IO (Ptr Sample)
forall a b. (a -> b) -> a -> b
$ \Sample
result' -> do
        Ptr Sample
result'' <- Sample -> IO (Ptr Sample)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Sample
result'
        Ptr Sample -> IO (Ptr Sample)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Sample
result''


-- | Connect a signal handler for the [tryPullSample](#signal:tryPullSample) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' appSink #tryPullSample callback
-- @
-- 
-- 
onAppSinkTryPullSample :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkTryPullSampleCallback) -> m SignalHandlerId
onAppSinkTryPullSample :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkTryPullPrerollCallback)
-> m SignalHandlerId
onAppSinkTryPullSample a
obj (?self::a) => AppSinkTryPullPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkTryPullPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => AppSinkTryPullPrerollCallback
AppSinkTryPullPrerollCallback
cb
    let wrapped' :: C_AppSinkTryPullPrerollCallback
wrapped' = (a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
forall a.
GObject a =>
(a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
wrap_AppSinkTryPullSampleCallback a -> AppSinkTryPullPrerollCallback
wrapped
    FunPtr C_AppSinkTryPullPrerollCallback
wrapped'' <- C_AppSinkTryPullPrerollCallback
-> IO (FunPtr C_AppSinkTryPullPrerollCallback)
mk_AppSinkTryPullSampleCallback C_AppSinkTryPullPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkTryPullPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"try-pull-sample" FunPtr C_AppSinkTryPullPrerollCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [tryPullSample](#signal:tryPullSample) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' appSink #tryPullSample callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterAppSinkTryPullSample :: (IsAppSink a, MonadIO m) => a -> ((?self :: a) => AppSinkTryPullSampleCallback) -> m SignalHandlerId
afterAppSinkTryPullSample :: forall a (m :: * -> *).
(IsAppSink a, MonadIO m) =>
a
-> ((?self::a) => AppSinkTryPullPrerollCallback)
-> m SignalHandlerId
afterAppSinkTryPullSample a
obj (?self::a) => AppSinkTryPullPrerollCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> AppSinkTryPullPrerollCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => AppSinkTryPullPrerollCallback
AppSinkTryPullPrerollCallback
cb
    let wrapped' :: C_AppSinkTryPullPrerollCallback
wrapped' = (a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
forall a.
GObject a =>
(a -> AppSinkTryPullPrerollCallback)
-> C_AppSinkTryPullPrerollCallback
wrap_AppSinkTryPullSampleCallback a -> AppSinkTryPullPrerollCallback
wrapped
    FunPtr C_AppSinkTryPullPrerollCallback
wrapped'' <- C_AppSinkTryPullPrerollCallback
-> IO (FunPtr C_AppSinkTryPullPrerollCallback)
mk_AppSinkTryPullSampleCallback C_AppSinkTryPullPrerollCallback
wrapped'
    a
-> Text
-> FunPtr C_AppSinkTryPullPrerollCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"try-pull-sample" FunPtr C_AppSinkTryPullPrerollCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data AppSinkTryPullSampleSignalInfo
instance SignalInfo AppSinkTryPullSampleSignalInfo where
    type HaskellCallbackType AppSinkTryPullSampleSignalInfo = AppSinkTryPullSampleCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_AppSinkTryPullSampleCallback cb
        cb'' <- mk_AppSinkTryPullSampleCallback cb'
        connectSignalFunPtr obj "try-pull-sample" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink::try-pull-sample"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:signal:tryPullSample"})

#endif

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

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

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

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

#if defined(ENABLE_OVERLOADING)
data AppSinkBufferListPropertyInfo
instance AttrInfo AppSinkBufferListPropertyInfo where
    type AttrAllowedOps AppSinkBufferListPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint AppSinkBufferListPropertyInfo = IsAppSink
    type AttrSetTypeConstraint AppSinkBufferListPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint AppSinkBufferListPropertyInfo = (~) Bool
    type AttrTransferType AppSinkBufferListPropertyInfo = Bool
    type AttrGetType AppSinkBufferListPropertyInfo = Bool
    type AttrLabel AppSinkBufferListPropertyInfo = "buffer-list"
    type AttrOrigin AppSinkBufferListPropertyInfo = AppSink
    attrGet = getAppSinkBufferList
    attrSet = setAppSinkBufferList
    attrTransfer _ v = do
        return v
    attrConstruct = constructAppSinkBufferList
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.bufferList"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:attr:bufferList"
        })
#endif

-- VVV Prop "caps"
   -- Type: TInterface (Name {namespace = "Gst", name = "Caps"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just True)

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

-- | Set the value of the “@caps@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' appSink [ #caps 'Data.GI.Base.Attributes.:=' value ]
-- @
setAppSinkCaps :: (MonadIO m, IsAppSink o) => o -> Gst.Caps.Caps -> m ()
setAppSinkCaps :: forall (m :: * -> *) o.
(MonadIO m, IsAppSink o) =>
o -> Caps -> m ()
setAppSinkCaps o
obj Caps
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe Caps -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"caps" (Caps -> Maybe Caps
forall a. a -> Maybe a
Just Caps
val)

-- | Construct a `GValueConstruct` with valid value for the “@caps@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructAppSinkCaps :: (IsAppSink o, MIO.MonadIO m) => Gst.Caps.Caps -> m (GValueConstruct o)
constructAppSinkCaps :: forall o (m :: * -> *).
(IsAppSink o, MonadIO m) =>
Caps -> m (GValueConstruct o)
constructAppSinkCaps Caps
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Caps -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"caps" (Caps -> Maybe Caps
forall a. a -> Maybe a
P.Just Caps
val)

-- | Set the value of the “@caps@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #caps
-- @
clearAppSinkCaps :: (MonadIO m, IsAppSink o) => o -> m ()
clearAppSinkCaps :: forall (m :: * -> *) o. (MonadIO m, IsAppSink o) => o -> m ()
clearAppSinkCaps o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Caps -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"caps" (Maybe Caps
forall a. Maybe a
Nothing :: Maybe Gst.Caps.Caps)

#if defined(ENABLE_OVERLOADING)
data AppSinkCapsPropertyInfo
instance AttrInfo AppSinkCapsPropertyInfo where
    type AttrAllowedOps AppSinkCapsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint AppSinkCapsPropertyInfo = IsAppSink
    type AttrSetTypeConstraint AppSinkCapsPropertyInfo = (~) Gst.Caps.Caps
    type AttrTransferTypeConstraint AppSinkCapsPropertyInfo = (~) Gst.Caps.Caps
    type AttrTransferType AppSinkCapsPropertyInfo = Gst.Caps.Caps
    type AttrGetType AppSinkCapsPropertyInfo = (Maybe Gst.Caps.Caps)
    type AttrLabel AppSinkCapsPropertyInfo = "caps"
    type AttrOrigin AppSinkCapsPropertyInfo = AppSink
    attrGet = getAppSinkCaps
    attrSet = setAppSinkCaps
    attrTransfer _ v = do
        return v
    attrConstruct = constructAppSinkCaps
    attrClear = clearAppSinkCaps
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.caps"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:attr:caps"
        })
#endif

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

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

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

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

#if defined(ENABLE_OVERLOADING)
data AppSinkDropPropertyInfo
instance AttrInfo AppSinkDropPropertyInfo where
    type AttrAllowedOps AppSinkDropPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint AppSinkDropPropertyInfo = IsAppSink
    type AttrSetTypeConstraint AppSinkDropPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint AppSinkDropPropertyInfo = (~) Bool
    type AttrTransferType AppSinkDropPropertyInfo = Bool
    type AttrGetType AppSinkDropPropertyInfo = Bool
    type AttrLabel AppSinkDropPropertyInfo = "drop"
    type AttrOrigin AppSinkDropPropertyInfo = AppSink
    attrGet = getAppSinkDrop
    attrSet = setAppSinkDrop
    attrTransfer _ v = do
        return v
    attrConstruct = constructAppSinkDrop
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.drop"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:attr:drop"
        })
#endif

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

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

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

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

#if defined(ENABLE_OVERLOADING)
data AppSinkEmitSignalsPropertyInfo
instance AttrInfo AppSinkEmitSignalsPropertyInfo where
    type AttrAllowedOps AppSinkEmitSignalsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint AppSinkEmitSignalsPropertyInfo = IsAppSink
    type AttrSetTypeConstraint AppSinkEmitSignalsPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint AppSinkEmitSignalsPropertyInfo = (~) Bool
    type AttrTransferType AppSinkEmitSignalsPropertyInfo = Bool
    type AttrGetType AppSinkEmitSignalsPropertyInfo = Bool
    type AttrLabel AppSinkEmitSignalsPropertyInfo = "emit-signals"
    type AttrOrigin AppSinkEmitSignalsPropertyInfo = AppSink
    attrGet = getAppSinkEmitSignals
    attrSet = setAppSinkEmitSignals
    attrTransfer _ v = do
        return v
    attrConstruct = constructAppSinkEmitSignals
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.emitSignals"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:attr:emitSignals"
        })
#endif

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

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

#if defined(ENABLE_OVERLOADING)
data AppSinkEosPropertyInfo
instance AttrInfo AppSinkEosPropertyInfo where
    type AttrAllowedOps AppSinkEosPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint AppSinkEosPropertyInfo = IsAppSink
    type AttrSetTypeConstraint AppSinkEosPropertyInfo = (~) ()
    type AttrTransferTypeConstraint AppSinkEosPropertyInfo = (~) ()
    type AttrTransferType AppSinkEosPropertyInfo = ()
    type AttrGetType AppSinkEosPropertyInfo = Bool
    type AttrLabel AppSinkEosPropertyInfo = "eos"
    type AttrOrigin AppSinkEosPropertyInfo = AppSink
    attrGet = getAppSinkEos
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.eos"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:attr:eos"
        })
#endif

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

-- | Get the value of the “@max-buffers@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' appSink #maxBuffers
-- @
getAppSinkMaxBuffers :: (MonadIO m, IsAppSink o) => o -> m Word32
getAppSinkMaxBuffers :: forall (m :: * -> *) o. (MonadIO m, IsAppSink o) => o -> m Word32
getAppSinkMaxBuffers o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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
"max-buffers"

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

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

#if defined(ENABLE_OVERLOADING)
data AppSinkMaxBuffersPropertyInfo
instance AttrInfo AppSinkMaxBuffersPropertyInfo where
    type AttrAllowedOps AppSinkMaxBuffersPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint AppSinkMaxBuffersPropertyInfo = IsAppSink
    type AttrSetTypeConstraint AppSinkMaxBuffersPropertyInfo = (~) Word32
    type AttrTransferTypeConstraint AppSinkMaxBuffersPropertyInfo = (~) Word32
    type AttrTransferType AppSinkMaxBuffersPropertyInfo = Word32
    type AttrGetType AppSinkMaxBuffersPropertyInfo = Word32
    type AttrLabel AppSinkMaxBuffersPropertyInfo = "max-buffers"
    type AttrOrigin AppSinkMaxBuffersPropertyInfo = AppSink
    attrGet = getAppSinkMaxBuffers
    attrSet = setAppSinkMaxBuffers
    attrTransfer _ v = do
        return v
    attrConstruct = constructAppSinkMaxBuffers
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.maxBuffers"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:attr:maxBuffers"
        })
#endif

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

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

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

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

#if defined(ENABLE_OVERLOADING)
data AppSinkWaitOnEosPropertyInfo
instance AttrInfo AppSinkWaitOnEosPropertyInfo where
    type AttrAllowedOps AppSinkWaitOnEosPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint AppSinkWaitOnEosPropertyInfo = IsAppSink
    type AttrSetTypeConstraint AppSinkWaitOnEosPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint AppSinkWaitOnEosPropertyInfo = (~) Bool
    type AttrTransferType AppSinkWaitOnEosPropertyInfo = Bool
    type AttrGetType AppSinkWaitOnEosPropertyInfo = Bool
    type AttrLabel AppSinkWaitOnEosPropertyInfo = "wait-on-eos"
    type AttrOrigin AppSinkWaitOnEosPropertyInfo = AppSink
    attrGet = getAppSinkWaitOnEos
    attrSet = setAppSinkWaitOnEos
    attrTransfer _ v = do
        return v
    attrConstruct = constructAppSinkWaitOnEos
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.waitOnEos"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#g:attr:waitOnEos"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AppSink
type instance O.AttributeList AppSink = AppSinkAttributeList
type AppSinkAttributeList = ('[ '("async", GstBase.BaseSink.BaseSinkAsyncPropertyInfo), '("blocksize", GstBase.BaseSink.BaseSinkBlocksizePropertyInfo), '("bufferList", AppSinkBufferListPropertyInfo), '("caps", AppSinkCapsPropertyInfo), '("drop", AppSinkDropPropertyInfo), '("emitSignals", AppSinkEmitSignalsPropertyInfo), '("enableLastSample", GstBase.BaseSink.BaseSinkEnableLastSamplePropertyInfo), '("eos", AppSinkEosPropertyInfo), '("lastSample", GstBase.BaseSink.BaseSinkLastSamplePropertyInfo), '("maxBitrate", GstBase.BaseSink.BaseSinkMaxBitratePropertyInfo), '("maxBuffers", AppSinkMaxBuffersPropertyInfo), '("maxLateness", GstBase.BaseSink.BaseSinkMaxLatenessPropertyInfo), '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("processingDeadline", GstBase.BaseSink.BaseSinkProcessingDeadlinePropertyInfo), '("qos", GstBase.BaseSink.BaseSinkQosPropertyInfo), '("renderDelay", GstBase.BaseSink.BaseSinkRenderDelayPropertyInfo), '("stats", GstBase.BaseSink.BaseSinkStatsPropertyInfo), '("sync", GstBase.BaseSink.BaseSinkSyncPropertyInfo), '("throttleTime", GstBase.BaseSink.BaseSinkThrottleTimePropertyInfo), '("tsOffset", GstBase.BaseSink.BaseSinkTsOffsetPropertyInfo), '("waitOnEos", AppSinkWaitOnEosPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
appSinkBufferList :: AttrLabelProxy "bufferList"
appSinkBufferList = AttrLabelProxy

appSinkCaps :: AttrLabelProxy "caps"
appSinkCaps = AttrLabelProxy

appSinkDrop :: AttrLabelProxy "drop"
appSinkDrop = AttrLabelProxy

appSinkEmitSignals :: AttrLabelProxy "emitSignals"
appSinkEmitSignals = AttrLabelProxy

appSinkEos :: AttrLabelProxy "eos"
appSinkEos = AttrLabelProxy

appSinkMaxBuffers :: AttrLabelProxy "maxBuffers"
appSinkMaxBuffers = AttrLabelProxy

appSinkWaitOnEos :: AttrLabelProxy "waitOnEos"
appSinkWaitOnEos = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AppSink = AppSinkSignalList
type AppSinkSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("eos", AppSinkEosSignalInfo), '("newPreroll", AppSinkNewPrerollSignalInfo), '("newSample", AppSinkNewSampleSignalInfo), '("newSerializedEvent", AppSinkNewSerializedEventSignalInfo), '("noMorePads", Gst.Element.ElementNoMorePadsSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("padAdded", Gst.Element.ElementPadAddedSignalInfo), '("padRemoved", Gst.Element.ElementPadRemovedSignalInfo), '("pullPreroll", AppSinkPullPrerollSignalInfo), '("pullSample", AppSinkPullSampleSignalInfo), '("tryPullObject", AppSinkTryPullObjectSignalInfo), '("tryPullPreroll", AppSinkTryPullPrerollSignalInfo), '("tryPullSample", AppSinkTryPullSampleSignalInfo)] :: [(Symbol, DK.Type)])

#endif

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

foreign import ccall "gst_app_sink_get_buffer_list_support" gst_app_sink_get_buffer_list_support :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO CInt

-- | Check if /@appsink@/ supports buffer lists.
-- 
-- /Since: 1.12/
appSinkGetBufferListSupport ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@appsink@/ supports buffer lists.
appSinkGetBufferListSupport :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m Bool
appSinkGetBufferListSupport a
appsink = AppSinkNewSerializedEventCallback -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkNewSerializedEventCallback -> m Bool)
-> AppSinkNewSerializedEventCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    CInt
result <- Ptr AppSink -> IO CInt
gst_app_sink_get_buffer_list_support Ptr AppSink
appsink'
    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
appsink
    Bool -> AppSinkNewSerializedEventCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data AppSinkGetBufferListSupportMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkGetBufferListSupportMethodInfo a signature where
    overloadedMethod = appSinkGetBufferListSupport

instance O.OverloadedMethodInfo AppSinkGetBufferListSupportMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkGetBufferListSupport",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkGetBufferListSupport"
        })


#endif

-- method AppSink::get_caps
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "Caps" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_get_caps" gst_app_sink_get_caps :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO (Ptr Gst.Caps.Caps)

-- | Get the configured caps on /@appsink@/.
appSinkGetCaps ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m (Maybe Gst.Caps.Caps)
    -- ^ __Returns:__ the t'GI.Gst.Structs.Caps.Caps' accepted by the sink. @/gst_caps_unref()/@ after usage.
appSinkGetCaps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m (Maybe Caps)
appSinkGetCaps a
appsink = IO (Maybe Caps) -> m (Maybe Caps)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Caps) -> m (Maybe Caps))
-> IO (Maybe Caps) -> m (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    Ptr Caps
result <- Ptr AppSink -> IO (Ptr Caps)
gst_app_sink_get_caps Ptr AppSink
appsink'
    Maybe Caps
maybeResult <- Ptr Caps -> (Ptr Caps -> IO Caps) -> IO (Maybe Caps)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Caps
result ((Ptr Caps -> IO Caps) -> IO (Maybe Caps))
-> (Ptr Caps -> IO Caps) -> IO (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ \Ptr Caps
result' -> do
        Caps
result'' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result'
        Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    Maybe Caps -> IO (Maybe Caps)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Caps
maybeResult

#if defined(ENABLE_OVERLOADING)
data AppSinkGetCapsMethodInfo
instance (signature ~ (m (Maybe Gst.Caps.Caps)), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkGetCapsMethodInfo a signature where
    overloadedMethod = appSinkGetCaps

instance O.OverloadedMethodInfo AppSinkGetCapsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkGetCaps",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkGetCaps"
        })


#endif

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

foreign import ccall "gst_app_sink_get_drop" gst_app_sink_get_drop :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO CInt

-- | Check if /@appsink@/ will drop old buffers when the maximum amount of queued
-- buffers is reached.
appSinkGetDrop ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@appsink@/ is dropping old buffers when the queue is
    -- filled.
appSinkGetDrop :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m Bool
appSinkGetDrop a
appsink = AppSinkNewSerializedEventCallback -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkNewSerializedEventCallback -> m Bool)
-> AppSinkNewSerializedEventCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    CInt
result <- Ptr AppSink -> IO CInt
gst_app_sink_get_drop Ptr AppSink
appsink'
    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
appsink
    Bool -> AppSinkNewSerializedEventCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data AppSinkGetDropMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkGetDropMethodInfo a signature where
    overloadedMethod = appSinkGetDrop

instance O.OverloadedMethodInfo AppSinkGetDropMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkGetDrop",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkGetDrop"
        })


#endif

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

foreign import ccall "gst_app_sink_get_emit_signals" gst_app_sink_get_emit_signals :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO CInt

-- | Check if appsink will emit the \"new-preroll\" and \"new-sample\" signals.
appSinkGetEmitSignals ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@appsink@/ is emitting the \"new-preroll\" and \"new-sample\"
    -- signals.
appSinkGetEmitSignals :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m Bool
appSinkGetEmitSignals a
appsink = AppSinkNewSerializedEventCallback -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkNewSerializedEventCallback -> m Bool)
-> AppSinkNewSerializedEventCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    CInt
result <- Ptr AppSink -> IO CInt
gst_app_sink_get_emit_signals Ptr AppSink
appsink'
    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
appsink
    Bool -> AppSinkNewSerializedEventCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data AppSinkGetEmitSignalsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkGetEmitSignalsMethodInfo a signature where
    overloadedMethod = appSinkGetEmitSignals

instance O.OverloadedMethodInfo AppSinkGetEmitSignalsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkGetEmitSignals",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkGetEmitSignals"
        })


#endif

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

foreign import ccall "gst_app_sink_get_max_buffers" gst_app_sink_get_max_buffers :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO Word32

-- | Get the maximum amount of buffers that can be queued in /@appsink@/.
appSinkGetMaxBuffers ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m Word32
    -- ^ __Returns:__ The maximum amount of buffers that can be queued.
appSinkGetMaxBuffers :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m Word32
appSinkGetMaxBuffers a
appsink = IO Word32 -> m Word32
forall a. IO a -> m a
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 AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    Word32
result <- Ptr AppSink -> IO Word32
gst_app_sink_get_max_buffers Ptr AppSink
appsink'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data AppSinkGetMaxBuffersMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkGetMaxBuffersMethodInfo a signature where
    overloadedMethod = appSinkGetMaxBuffers

instance O.OverloadedMethodInfo AppSinkGetMaxBuffersMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkGetMaxBuffers",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkGetMaxBuffers"
        })


#endif

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

foreign import ccall "gst_app_sink_get_wait_on_eos" gst_app_sink_get_wait_on_eos :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO CInt

-- | Check if /@appsink@/ will wait for all buffers to be consumed when an EOS is
-- received.
appSinkGetWaitOnEos ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@appsink@/ will wait for all buffers to be consumed when an
    -- EOS is received.
appSinkGetWaitOnEos :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m Bool
appSinkGetWaitOnEos a
appsink = AppSinkNewSerializedEventCallback -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkNewSerializedEventCallback -> m Bool)
-> AppSinkNewSerializedEventCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    CInt
result <- Ptr AppSink -> IO CInt
gst_app_sink_get_wait_on_eos Ptr AppSink
appsink'
    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
appsink
    Bool -> AppSinkNewSerializedEventCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data AppSinkGetWaitOnEosMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkGetWaitOnEosMethodInfo a signature where
    overloadedMethod = appSinkGetWaitOnEos

instance O.OverloadedMethodInfo AppSinkGetWaitOnEosMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkGetWaitOnEos",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkGetWaitOnEos"
        })


#endif

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

foreign import ccall "gst_app_sink_is_eos" gst_app_sink_is_eos :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO CInt

-- | Check if /@appsink@/ is EOS, which is when no more samples can be pulled because
-- an EOS event was received.
-- 
-- This function also returns 'P.True' when the appsink is not in the PAUSED or
-- PLAYING state.
appSinkIsEos ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if no more samples can be pulled and the appsink is EOS.
appSinkIsEos :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m Bool
appSinkIsEos a
appsink = AppSinkNewSerializedEventCallback -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkNewSerializedEventCallback -> m Bool)
-> AppSinkNewSerializedEventCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    CInt
result <- Ptr AppSink -> IO CInt
gst_app_sink_is_eos Ptr AppSink
appsink'
    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
appsink
    Bool -> AppSinkNewSerializedEventCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data AppSinkIsEosMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkIsEosMethodInfo a signature where
    overloadedMethod = appSinkIsEos

instance O.OverloadedMethodInfo AppSinkIsEosMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkIsEos",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkIsEos"
        })


#endif

-- method AppSink::pull_preroll
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "Sample" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_pull_preroll" gst_app_sink_pull_preroll :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO (Ptr Gst.Sample.Sample)

-- | Get the last preroll sample in /@appsink@/. This was the sample that caused the
-- appsink to preroll in the PAUSED state.
-- 
-- This function is typically used when dealing with a pipeline in the PAUSED
-- state. Calling this function after doing a seek will give the sample right
-- after the seek position.
-- 
-- Calling this function will clear the internal reference to the preroll
-- buffer.
-- 
-- Note that the preroll sample will also be returned as the first sample
-- when calling 'GI.GstApp.Objects.AppSink.appSinkPullSample'.
-- 
-- If an EOS event was received before any buffers, this function returns
-- 'P.Nothing'. Use gst_app_sink_is_eos () to check for the EOS condition.
-- 
-- This function blocks until a preroll sample or EOS is received or the appsink
-- element is set to the READY\/NULL state.
appSinkPullPreroll ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or NULL when the appsink is stopped or EOS.
    --          Call @/gst_sample_unref()/@ after usage.
appSinkPullPreroll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m (Maybe Sample)
appSinkPullPreroll a
appsink = AppSinkPullPrerollCallback -> m (Maybe Sample)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkPullPrerollCallback -> m (Maybe Sample))
-> AppSinkPullPrerollCallback -> m (Maybe Sample)
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    Ptr Sample
result <- Ptr AppSink -> IO (Ptr Sample)
gst_app_sink_pull_preroll Ptr AppSink
appsink'
    Maybe Sample
maybeResult <- Ptr Sample
-> (Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Sample
result ((Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback)
-> (Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sample
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    Maybe Sample -> AppSinkPullPrerollCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Sample
maybeResult

#if defined(ENABLE_OVERLOADING)
data AppSinkPullPrerollMethodInfo
instance (signature ~ (m (Maybe Gst.Sample.Sample)), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkPullPrerollMethodInfo a signature where
    overloadedMethod = appSinkPullPreroll

instance O.OverloadedMethodInfo AppSinkPullPrerollMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkPullPreroll",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkPullPreroll"
        })


#endif

-- method AppSink::pull_sample
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "Sample" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_pull_sample" gst_app_sink_pull_sample :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    IO (Ptr Gst.Sample.Sample)

-- | This function blocks until a sample or EOS becomes available or the appsink
-- element is set to the READY\/NULL state.
-- 
-- This function will only return samples when the appsink is in the PLAYING
-- state. All rendered buffers will be put in a queue so that the application
-- can pull samples at its own rate. Note that when the application does not
-- pull samples fast enough, the queued buffers could consume a lot of memory,
-- especially when dealing with raw video frames.
-- 
-- If an EOS event was received before any buffers, this function returns
-- 'P.Nothing'. Use gst_app_sink_is_eos () to check for the EOS condition.
appSinkPullSample ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> m (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or NULL when the appsink is stopped or EOS.
    --          Call @/gst_sample_unref()/@ after usage.
appSinkPullSample :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> m (Maybe Sample)
appSinkPullSample a
appsink = AppSinkPullPrerollCallback -> m (Maybe Sample)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkPullPrerollCallback -> m (Maybe Sample))
-> AppSinkPullPrerollCallback -> m (Maybe Sample)
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    Ptr Sample
result <- Ptr AppSink -> IO (Ptr Sample)
gst_app_sink_pull_sample Ptr AppSink
appsink'
    Maybe Sample
maybeResult <- Ptr Sample
-> (Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Sample
result ((Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback)
-> (Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sample
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    Maybe Sample -> AppSinkPullPrerollCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Sample
maybeResult

#if defined(ENABLE_OVERLOADING)
data AppSinkPullSampleMethodInfo
instance (signature ~ (m (Maybe Gst.Sample.Sample)), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkPullSampleMethodInfo a signature where
    overloadedMethod = appSinkPullSample

instance O.OverloadedMethodInfo AppSinkPullSampleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkPullSample",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkPullSample"
        })


#endif

-- method AppSink::set_buffer_list_support
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "enable_lists"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "enable or disable buffer list support"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_set_buffer_list_support" gst_app_sink_set_buffer_list_support :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    CInt ->                                 -- enable_lists : TBasicType TBoolean
    IO ()

-- | Instruct /@appsink@/ to enable or disable buffer list support.
-- 
-- For backwards-compatibility reasons applications need to opt in
-- to indicate that they will be able to handle buffer lists.
-- 
-- /Since: 1.12/
appSinkSetBufferListSupport ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> Bool
    -- ^ /@enableLists@/: enable or disable buffer list support
    -> m ()
appSinkSetBufferListSupport :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> Bool -> m ()
appSinkSetBufferListSupport a
appsink Bool
enableLists = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    let enableLists' :: CInt
enableLists' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
enableLists
    Ptr AppSink -> CInt -> IO ()
gst_app_sink_set_buffer_list_support Ptr AppSink
appsink' CInt
enableLists'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AppSinkSetBufferListSupportMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkSetBufferListSupportMethodInfo a signature where
    overloadedMethod = appSinkSetBufferListSupport

instance O.OverloadedMethodInfo AppSinkSetBufferListSupportMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkSetBufferListSupport",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkSetBufferListSupport"
        })


#endif

-- method AppSink::set_caps
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "caps"
--           , argType = TInterface Name { namespace = "Gst" , name = "Caps" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "caps to set" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_set_caps" gst_app_sink_set_caps :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    Ptr Gst.Caps.Caps ->                    -- caps : TInterface (Name {namespace = "Gst", name = "Caps"})
    IO ()

-- | Set the capabilities on the appsink element.  This function takes
-- a copy of the caps structure. After calling this method, the sink will only
-- accept caps that match /@caps@/. If /@caps@/ is non-fixed, or incomplete,
-- you must check the caps on the samples to get the actual used caps.
appSinkSetCaps ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> Maybe (Gst.Caps.Caps)
    -- ^ /@caps@/: caps to set
    -> m ()
appSinkSetCaps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> Maybe Caps -> m ()
appSinkSetCaps a
appsink Maybe Caps
caps = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    Ptr Caps
maybeCaps <- case Maybe Caps
caps of
        Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
        Just Caps
jCaps -> do
            Ptr Caps
jCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jCaps
            Ptr Caps -> IO (Ptr Caps)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jCaps'
    Ptr AppSink -> Ptr Caps -> IO ()
gst_app_sink_set_caps Ptr AppSink
appsink' Ptr Caps
maybeCaps
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
caps Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AppSinkSetCapsMethodInfo
instance (signature ~ (Maybe (Gst.Caps.Caps) -> m ()), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkSetCapsMethodInfo a signature where
    overloadedMethod = appSinkSetCaps

instance O.OverloadedMethodInfo AppSinkSetCapsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkSetCaps",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkSetCaps"
        })


#endif

-- method AppSink::set_drop
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drop"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new state" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_set_drop" gst_app_sink_set_drop :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    CInt ->                                 -- drop : TBasicType TBoolean
    IO ()

-- | Instruct /@appsink@/ to drop old buffers when the maximum amount of queued
-- buffers is reached.
appSinkSetDrop ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> Bool
    -- ^ /@drop@/: the new state
    -> m ()
appSinkSetDrop :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> Bool -> m ()
appSinkSetDrop a
appsink Bool
drop = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    let drop' :: CInt
drop' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
drop
    Ptr AppSink -> CInt -> IO ()
gst_app_sink_set_drop Ptr AppSink
appsink' CInt
drop'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AppSinkSetDropMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkSetDropMethodInfo a signature where
    overloadedMethod = appSinkSetDrop

instance O.OverloadedMethodInfo AppSinkSetDropMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkSetDrop",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkSetDrop"
        })


#endif

-- method AppSink::set_emit_signals
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "emit"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new state" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_set_emit_signals" gst_app_sink_set_emit_signals :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    CInt ->                                 -- emit : TBasicType TBoolean
    IO ()

-- | Make appsink emit the \"new-preroll\" and \"new-sample\" signals. This option is
-- by default disabled because signal emission is expensive and unneeded when
-- the application prefers to operate in pull mode.
appSinkSetEmitSignals ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> Bool
    -- ^ /@emit@/: the new state
    -> m ()
appSinkSetEmitSignals :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> Bool -> m ()
appSinkSetEmitSignals a
appsink Bool
emit = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    let emit' :: CInt
emit' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
emit
    Ptr AppSink -> CInt -> IO ()
gst_app_sink_set_emit_signals Ptr AppSink
appsink' CInt
emit'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AppSinkSetEmitSignalsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkSetEmitSignalsMethodInfo a signature where
    overloadedMethod = appSinkSetEmitSignals

instance O.OverloadedMethodInfo AppSinkSetEmitSignalsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkSetEmitSignals",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkSetEmitSignals"
        })


#endif

-- method AppSink::set_max_buffers
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "max"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the maximum number of buffers to queue"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_set_max_buffers" gst_app_sink_set_max_buffers :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    Word32 ->                               -- max : TBasicType TUInt
    IO ()

-- | Set the maximum amount of buffers that can be queued in /@appsink@/. After this
-- amount of buffers are queued in appsink, any more buffers will block upstream
-- elements until a sample is pulled from /@appsink@/.
appSinkSetMaxBuffers ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> Word32
    -- ^ /@max@/: the maximum number of buffers to queue
    -> m ()
appSinkSetMaxBuffers :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> Word32 -> m ()
appSinkSetMaxBuffers a
appsink Word32
max = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    Ptr AppSink -> Word32 -> IO ()
gst_app_sink_set_max_buffers Ptr AppSink
appsink' Word32
max
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AppSinkSetMaxBuffersMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkSetMaxBuffersMethodInfo a signature where
    overloadedMethod = appSinkSetMaxBuffers

instance O.OverloadedMethodInfo AppSinkSetMaxBuffersMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkSetMaxBuffers",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkSetMaxBuffers"
        })


#endif

-- method AppSink::set_wait_on_eos
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "wait"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new state" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_set_wait_on_eos" gst_app_sink_set_wait_on_eos :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    CInt ->                                 -- wait : TBasicType TBoolean
    IO ()

-- | Instruct /@appsink@/ to wait for all buffers to be consumed when an EOS is received.
appSinkSetWaitOnEos ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> Bool
    -- ^ /@wait@/: the new state
    -> m ()
appSinkSetWaitOnEos :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> Bool -> m ()
appSinkSetWaitOnEos a
appsink Bool
wait = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    let wait' :: CInt
wait' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
wait
    Ptr AppSink -> CInt -> IO ()
gst_app_sink_set_wait_on_eos Ptr AppSink
appsink' CInt
wait'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data AppSinkSetWaitOnEosMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkSetWaitOnEosMethodInfo a signature where
    overloadedMethod = appSinkSetWaitOnEos

instance O.OverloadedMethodInfo AppSinkSetWaitOnEosMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkSetWaitOnEos",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkSetWaitOnEos"
        })


#endif

-- method AppSink::try_pull_preroll
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "timeout"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the maximum amount of time to wait for the preroll sample"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "Sample" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_try_pull_preroll" gst_app_sink_try_pull_preroll :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    Word64 ->                               -- timeout : TBasicType TUInt64
    IO (Ptr Gst.Sample.Sample)

-- | Get the last preroll sample in /@appsink@/. This was the sample that caused the
-- appsink to preroll in the PAUSED state.
-- 
-- This function is typically used when dealing with a pipeline in the PAUSED
-- state. Calling this function after doing a seek will give the sample right
-- after the seek position.
-- 
-- Calling this function will clear the internal reference to the preroll
-- buffer.
-- 
-- Note that the preroll sample will also be returned as the first sample
-- when calling 'GI.GstApp.Objects.AppSink.appSinkPullSample'.
-- 
-- If an EOS event was received before any buffers or the timeout expires,
-- this function returns 'P.Nothing'. Use gst_app_sink_is_eos () to check for the EOS
-- condition.
-- 
-- This function blocks until a preroll sample or EOS is received, the appsink
-- element is set to the READY\/NULL state, or the timeout expires.
-- 
-- /Since: 1.10/
appSinkTryPullPreroll ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> Word64
    -- ^ /@timeout@/: the maximum amount of time to wait for the preroll sample
    -> m (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or NULL when the appsink is stopped or EOS or the timeout expires.
    --          Call @/gst_sample_unref()/@ after usage.
appSinkTryPullPreroll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> Word64 -> m (Maybe Sample)
appSinkTryPullPreroll a
appsink Word64
timeout = AppSinkPullPrerollCallback -> m (Maybe Sample)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkPullPrerollCallback -> m (Maybe Sample))
-> AppSinkPullPrerollCallback -> m (Maybe Sample)
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    Ptr Sample
result <- Ptr AppSink -> Word64 -> IO (Ptr Sample)
gst_app_sink_try_pull_preroll Ptr AppSink
appsink' Word64
timeout
    Maybe Sample
maybeResult <- Ptr Sample
-> (Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Sample
result ((Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback)
-> (Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sample
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    Maybe Sample -> AppSinkPullPrerollCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Sample
maybeResult

#if defined(ENABLE_OVERLOADING)
data AppSinkTryPullPrerollMethodInfo
instance (signature ~ (Word64 -> m (Maybe Gst.Sample.Sample)), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkTryPullPrerollMethodInfo a signature where
    overloadedMethod = appSinkTryPullPreroll

instance O.OverloadedMethodInfo AppSinkTryPullPrerollMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkTryPullPreroll",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkTryPullPreroll"
        })


#endif

-- method AppSink::try_pull_sample
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "appsink"
--           , argType =
--               TInterface Name { namespace = "GstApp" , name = "AppSink" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstAppSink" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "timeout"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the maximum amount of time to wait for a sample"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "Sample" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_app_sink_try_pull_sample" gst_app_sink_try_pull_sample :: 
    Ptr AppSink ->                          -- appsink : TInterface (Name {namespace = "GstApp", name = "AppSink"})
    Word64 ->                               -- timeout : TBasicType TUInt64
    IO (Ptr Gst.Sample.Sample)

-- | This function blocks until a sample or EOS becomes available or the appsink
-- element is set to the READY\/NULL state or the timeout expires.
-- 
-- This function will only return samples when the appsink is in the PLAYING
-- state. All rendered buffers will be put in a queue so that the application
-- can pull samples at its own rate. Note that when the application does not
-- pull samples fast enough, the queued buffers could consume a lot of memory,
-- especially when dealing with raw video frames.
-- 
-- If an EOS event was received before any buffers or the timeout expires,
-- this function returns 'P.Nothing'. Use gst_app_sink_is_eos () to check for the EOS
-- condition.
-- 
-- /Since: 1.10/
appSinkTryPullSample ::
    (B.CallStack.HasCallStack, MonadIO m, IsAppSink a) =>
    a
    -- ^ /@appsink@/: a t'GI.GstApp.Objects.AppSink.AppSink'
    -> Word64
    -- ^ /@timeout@/: the maximum amount of time to wait for a sample
    -> m (Maybe Gst.Sample.Sample)
    -- ^ __Returns:__ a t'GI.Gst.Structs.Sample.Sample' or NULL when the appsink is stopped or EOS or the timeout expires.
    --          Call @/gst_sample_unref()/@ after usage.
appSinkTryPullSample :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAppSink a) =>
a -> Word64 -> m (Maybe Sample)
appSinkTryPullSample a
appsink Word64
timeout = AppSinkPullPrerollCallback -> m (Maybe Sample)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (AppSinkPullPrerollCallback -> m (Maybe Sample))
-> AppSinkPullPrerollCallback -> m (Maybe Sample)
forall a b. (a -> b) -> a -> b
$ do
    Ptr AppSink
appsink' <- a -> IO (Ptr AppSink)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
appsink
    Ptr Sample
result <- Ptr AppSink -> Word64 -> IO (Ptr Sample)
gst_app_sink_try_pull_sample Ptr AppSink
appsink' Word64
timeout
    Maybe Sample
maybeResult <- Ptr Sample
-> (Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Sample
result ((Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback)
-> (Ptr Sample -> IO Sample) -> AppSinkPullPrerollCallback
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sample
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
appsink
    Maybe Sample -> AppSinkPullPrerollCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Sample
maybeResult

#if defined(ENABLE_OVERLOADING)
data AppSinkTryPullSampleMethodInfo
instance (signature ~ (Word64 -> m (Maybe Gst.Sample.Sample)), MonadIO m, IsAppSink a) => O.OverloadedMethod AppSinkTryPullSampleMethodInfo a signature where
    overloadedMethod = appSinkTryPullSample

instance O.OverloadedMethodInfo AppSinkTryPullSampleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.GstApp.Objects.AppSink.appSinkTryPullSample",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstapp-1.0.28/docs/GI-GstApp-Objects-AppSink.html#v:appSinkTryPullSample"
        })


#endif