{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) 'GI.GstBase.Objects.BaseSink.BaseSink' is the base class for sink elements in GStreamer, such as xvimagesink or filesink. It is a layer on top of 'GI.Gst.Objects.Element.Element' that provides a simplified interface to plugin writers. 'GI.GstBase.Objects.BaseSink.BaseSink' handles many details for you, for example: preroll, clock synchronization, state changes, activation in push or pull mode, and queries. In most cases, when writing sink elements, there is no need to implement class methods from 'GI.Gst.Objects.Element.Element' or to set functions on pads, because the 'GI.GstBase.Objects.BaseSink.BaseSink' infrastructure should be sufficient. 'GI.GstBase.Objects.BaseSink.BaseSink' provides support for exactly one sink pad, which should be named \"sink\". A sink implementation (subclass of 'GI.GstBase.Objects.BaseSink.BaseSink') should install a pad template in its class_init function, like so: === /C code/ > >static void >my_element_class_init (GstMyElementClass *klass) >{ > GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); > > // sinktemplate should be a #GstStaticPadTemplate with direction > // %GST_PAD_SINK and name "sink" > gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); > > gst_element_class_set_static_metadata (gstelement_class, > "Sink name", > "Sink", > "My Sink element", > "The author "); >} 'GI.GstBase.Objects.BaseSink.BaseSink' will handle the prerolling correctly. This means that it will return 'GI.Gst.Enums.StateChangeReturnAsync' from a state change to PAUSED until the first buffer arrives in this element. The base class will call the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/preroll/@() vmethod with this preroll buffer and will then commit the state change to the next asynchronously pending state. When the element is set to PLAYING, 'GI.GstBase.Objects.BaseSink.BaseSink' will synchronise on the clock using the times returned from 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/get_times/@(). If this function returns 'GI.Gst.Constants.CLOCK_TIME_NONE' for the start time, no synchronisation will be done. Synchronisation can be disabled entirely by setting the object 'GI.GstBase.Objects.BaseSink.BaseSink':@/sync/@ property to 'False'. After synchronisation the virtual method 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() will be called. Subclasses should minimally implement this method. Subclasses that synchronise on the clock in the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method are supported as well. These classes typically receive a buffer in the render method and can then potentially block on the clock while rendering. A typical example is an audiosink. These subclasses can use 'GI.GstBase.Objects.BaseSink.baseSinkWaitPreroll' to perform the blocking wait. Upon receiving the EOS event in the PLAYING state, 'GI.GstBase.Objects.BaseSink.BaseSink' will wait for the clock to reach the time indicated by the stop time of the last 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/get_times/@() call before posting an EOS message. When the element receives EOS in PAUSED, preroll completes, the event is queued and an EOS message is posted when going to PLAYING. 'GI.GstBase.Objects.BaseSink.BaseSink' will internally use the 'GI.Gst.Enums.EventTypeSegment' events to schedule synchronisation and clipping of buffers. Buffers that fall completely outside of the current segment are dropped. Buffers that fall partially in the segment are rendered (and prerolled). Subclasses should do any subbuffer clipping themselves when needed. 'GI.GstBase.Objects.BaseSink.BaseSink' will by default report the current playback position in 'GI.Gst.Enums.FormatTime' based on the current clock time and segment information. If no clock has been set on the element, the query will be forwarded upstream. The 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/set_caps/@() function will be called when the subclass should configure itself to process a specific media type. The 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/start/@() and 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/stop/@() virtual methods will be called when resources should be allocated. Any 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/preroll/@(), 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() and 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/set_caps/@() function will be called between the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/start/@() and 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/stop/@() calls. The 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/event/@() virtual method will be called when an event is received by 'GI.GstBase.Objects.BaseSink.BaseSink'. Normally this method should only be overridden by very specific elements (such as file sinks) which need to handle the newsegment event specially. The 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/unlock/@() method is called when the elements should unblock any blocking operations they perform in the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method. This is mostly useful when the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method performs a blocking write on a file descriptor, for example. The 'GI.GstBase.Objects.BaseSink.BaseSink':@/max-lateness/@ property affects how the sink deals with buffers that arrive too late in the sink. A buffer arrives too late in the sink when the presentation time (as a combination of the last segment, buffer timestamp and element base_time) plus the duration is before the current time of the clock. If the frame is later than max-lateness, the sink will drop the buffer without calling the render method. This feature is disabled if sync is disabled, the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/get_times/@() method does not return a valid start time or max-lateness is set to -1 (the default). Subclasses can use 'GI.GstBase.Objects.BaseSink.baseSinkSetMaxLateness' to configure the max-lateness value. The 'GI.GstBase.Objects.BaseSink.BaseSink':@/qos/@ property will enable the quality-of-service features of the basesink which gather statistics about the real-time performance of the clock synchronisation. For each buffer received in the sink, statistics are gathered and a QOS event is sent upstream with these numbers. This information can then be used by upstream elements to reduce their processing rate, for example. The 'GI.GstBase.Objects.BaseSink.BaseSink':@/async/@ property can be used to instruct the sink to never perform an ASYNC state change. This feature is mostly usable when dealing with non-synchronized streams or sparse streams. -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GstBase.Objects.BaseSink ( -- * Exported types BaseSink(..) , IsBaseSink , toBaseSink , noBaseSink , -- * Methods -- ** doPreroll #method:doPreroll# #if ENABLE_OVERLOADING BaseSinkDoPrerollMethodInfo , #endif baseSinkDoPreroll , -- ** getBlocksize #method:getBlocksize# #if ENABLE_OVERLOADING BaseSinkGetBlocksizeMethodInfo , #endif baseSinkGetBlocksize , -- ** getDropOutOfSegment #method:getDropOutOfSegment# #if ENABLE_OVERLOADING BaseSinkGetDropOutOfSegmentMethodInfo , #endif baseSinkGetDropOutOfSegment , -- ** getLastSample #method:getLastSample# #if ENABLE_OVERLOADING BaseSinkGetLastSampleMethodInfo , #endif baseSinkGetLastSample , -- ** getLatency #method:getLatency# #if ENABLE_OVERLOADING BaseSinkGetLatencyMethodInfo , #endif baseSinkGetLatency , -- ** getMaxBitrate #method:getMaxBitrate# #if ENABLE_OVERLOADING BaseSinkGetMaxBitrateMethodInfo , #endif baseSinkGetMaxBitrate , -- ** getMaxLateness #method:getMaxLateness# #if ENABLE_OVERLOADING BaseSinkGetMaxLatenessMethodInfo , #endif baseSinkGetMaxLateness , -- ** getProcessingDeadline #method:getProcessingDeadline# #if ENABLE_OVERLOADING BaseSinkGetProcessingDeadlineMethodInfo , #endif baseSinkGetProcessingDeadline , -- ** getRenderDelay #method:getRenderDelay# #if ENABLE_OVERLOADING BaseSinkGetRenderDelayMethodInfo , #endif baseSinkGetRenderDelay , -- ** getSync #method:getSync# #if ENABLE_OVERLOADING BaseSinkGetSyncMethodInfo , #endif baseSinkGetSync , -- ** getThrottleTime #method:getThrottleTime# #if ENABLE_OVERLOADING BaseSinkGetThrottleTimeMethodInfo , #endif baseSinkGetThrottleTime , -- ** getTsOffset #method:getTsOffset# #if ENABLE_OVERLOADING BaseSinkGetTsOffsetMethodInfo , #endif baseSinkGetTsOffset , -- ** isAsyncEnabled #method:isAsyncEnabled# #if ENABLE_OVERLOADING BaseSinkIsAsyncEnabledMethodInfo , #endif baseSinkIsAsyncEnabled , -- ** isLastSampleEnabled #method:isLastSampleEnabled# #if ENABLE_OVERLOADING BaseSinkIsLastSampleEnabledMethodInfo , #endif baseSinkIsLastSampleEnabled , -- ** isQosEnabled #method:isQosEnabled# #if ENABLE_OVERLOADING BaseSinkIsQosEnabledMethodInfo , #endif baseSinkIsQosEnabled , -- ** queryLatency #method:queryLatency# #if ENABLE_OVERLOADING BaseSinkQueryLatencyMethodInfo , #endif baseSinkQueryLatency , -- ** setAsyncEnabled #method:setAsyncEnabled# #if ENABLE_OVERLOADING BaseSinkSetAsyncEnabledMethodInfo , #endif baseSinkSetAsyncEnabled , -- ** setBlocksize #method:setBlocksize# #if ENABLE_OVERLOADING BaseSinkSetBlocksizeMethodInfo , #endif baseSinkSetBlocksize , -- ** setDropOutOfSegment #method:setDropOutOfSegment# #if ENABLE_OVERLOADING BaseSinkSetDropOutOfSegmentMethodInfo , #endif baseSinkSetDropOutOfSegment , -- ** setLastSampleEnabled #method:setLastSampleEnabled# #if ENABLE_OVERLOADING BaseSinkSetLastSampleEnabledMethodInfo , #endif baseSinkSetLastSampleEnabled , -- ** setMaxBitrate #method:setMaxBitrate# #if ENABLE_OVERLOADING BaseSinkSetMaxBitrateMethodInfo , #endif baseSinkSetMaxBitrate , -- ** setMaxLateness #method:setMaxLateness# #if ENABLE_OVERLOADING BaseSinkSetMaxLatenessMethodInfo , #endif baseSinkSetMaxLateness , -- ** setProcessingDeadline #method:setProcessingDeadline# #if ENABLE_OVERLOADING BaseSinkSetProcessingDeadlineMethodInfo , #endif baseSinkSetProcessingDeadline , -- ** setQosEnabled #method:setQosEnabled# #if ENABLE_OVERLOADING BaseSinkSetQosEnabledMethodInfo , #endif baseSinkSetQosEnabled , -- ** setRenderDelay #method:setRenderDelay# #if ENABLE_OVERLOADING BaseSinkSetRenderDelayMethodInfo , #endif baseSinkSetRenderDelay , -- ** setSync #method:setSync# #if ENABLE_OVERLOADING BaseSinkSetSyncMethodInfo , #endif baseSinkSetSync , -- ** setThrottleTime #method:setThrottleTime# #if ENABLE_OVERLOADING BaseSinkSetThrottleTimeMethodInfo , #endif baseSinkSetThrottleTime , -- ** setTsOffset #method:setTsOffset# #if ENABLE_OVERLOADING BaseSinkSetTsOffsetMethodInfo , #endif baseSinkSetTsOffset , -- ** wait #method:wait# #if ENABLE_OVERLOADING BaseSinkWaitMethodInfo , #endif baseSinkWait , -- ** waitClock #method:waitClock# #if ENABLE_OVERLOADING BaseSinkWaitClockMethodInfo , #endif baseSinkWaitClock , -- ** waitPreroll #method:waitPreroll# #if ENABLE_OVERLOADING BaseSinkWaitPrerollMethodInfo , #endif baseSinkWaitPreroll , -- * Properties -- ** async #attr:async# {- | If set to 'True', the basesink will perform asynchronous state changes. When set to 'False', the sink will not signal the parent when it prerolls. Use this option when dealing with sparse streams or when synchronisation is not required. -} #if ENABLE_OVERLOADING BaseSinkAsyncPropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkAsync , #endif constructBaseSinkAsync , getBaseSinkAsync , setBaseSinkAsync , -- ** blocksize #attr:blocksize# {- | The amount of bytes to pull when operating in pull mode. -} #if ENABLE_OVERLOADING BaseSinkBlocksizePropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkBlocksize , #endif constructBaseSinkBlocksize , getBaseSinkBlocksize , setBaseSinkBlocksize , -- ** enableLastSample #attr:enableLastSample# {- | Enable the last-sample property. If 'False', basesink doesn\'t keep a reference to the last buffer arrived and the last-sample property is always set to 'Nothing'. This can be useful if you need buffers to be released as soon as possible, eg. if you\'re using a buffer pool. -} #if ENABLE_OVERLOADING BaseSinkEnableLastSamplePropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkEnableLastSample , #endif constructBaseSinkEnableLastSample , getBaseSinkEnableLastSample , setBaseSinkEnableLastSample , -- ** lastSample #attr:lastSample# {- | The last buffer that arrived in the sink and was used for preroll or for rendering. This property can be used to generate thumbnails. This property can be 'Nothing' when the sink has not yet received a buffer. -} #if ENABLE_OVERLOADING BaseSinkLastSamplePropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkLastSample , #endif getBaseSinkLastSample , -- ** maxBitrate #attr:maxBitrate# {- | Control the maximum amount of bits that will be rendered per second. Setting this property to a value bigger than 0 will make the sink delay rendering of the buffers when it would exceed to max-bitrate. /Since: 1.2/ -} #if ENABLE_OVERLOADING BaseSinkMaxBitratePropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkMaxBitrate , #endif constructBaseSinkMaxBitrate , getBaseSinkMaxBitrate , setBaseSinkMaxBitrate , -- ** maxLateness #attr:maxLateness# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING BaseSinkMaxLatenessPropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkMaxLateness , #endif constructBaseSinkMaxLateness , getBaseSinkMaxLateness , setBaseSinkMaxLateness , -- ** processingDeadline #attr:processingDeadline# {- | Maximum amount of time (in nanoseconds) that the pipeline can take for processing the buffer. This is added to the latency of live pipelines. /Since: 1.16/ -} #if ENABLE_OVERLOADING BaseSinkProcessingDeadlinePropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkProcessingDeadline , #endif constructBaseSinkProcessingDeadline , getBaseSinkProcessingDeadline , setBaseSinkProcessingDeadline , -- ** qos #attr:qos# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING BaseSinkQosPropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkQos , #endif constructBaseSinkQos , getBaseSinkQos , setBaseSinkQos , -- ** renderDelay #attr:renderDelay# {- | The additional delay between synchronisation and actual rendering of the media. This property will add additional latency to the device in order to make other sinks compensate for the delay. -} #if ENABLE_OVERLOADING BaseSinkRenderDelayPropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkRenderDelay , #endif constructBaseSinkRenderDelay , getBaseSinkRenderDelay , setBaseSinkRenderDelay , -- ** sync #attr:sync# {- | /No description available in the introspection data./ -} #if ENABLE_OVERLOADING BaseSinkSyncPropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkSync , #endif constructBaseSinkSync , getBaseSinkSync , setBaseSinkSync , -- ** throttleTime #attr:throttleTime# {- | The time to insert between buffers. This property can be used to control the maximum amount of buffers per second to render. Setting this property to a value bigger than 0 will make the sink create THROTTLE QoS events. -} #if ENABLE_OVERLOADING BaseSinkThrottleTimePropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkThrottleTime , #endif constructBaseSinkThrottleTime , getBaseSinkThrottleTime , setBaseSinkThrottleTime , -- ** tsOffset #attr:tsOffset# {- | Controls the final synchronisation, a negative value will render the buffer earlier while a positive value delays playback. This property can be used to fix synchronisation in bad files. -} #if ENABLE_OVERLOADING BaseSinkTsOffsetPropertyInfo , #endif #if ENABLE_OVERLOADING baseSinkTsOffset , #endif constructBaseSinkTsOffset , getBaseSinkTsOffset , setBaseSinkTsOffset , ) where import Data.GI.Base.ShortPrelude import qualified Data.GI.Base.ShortPrelude as SP import qualified Data.GI.Base.Overloading as O import qualified Prelude as P import qualified Data.GI.Base.Attributes as GI.Attributes import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GClosure as B.GClosure import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import qualified Foreign.Ptr as FP import qualified GHC.OverloadedLabels as OL import qualified GI.GObject.Objects.Object as GObject.Object import qualified GI.Gst.Enums as Gst.Enums import qualified GI.Gst.Objects.Element as Gst.Element import qualified GI.Gst.Objects.Object as Gst.Object import qualified GI.Gst.Structs.MiniObject as Gst.MiniObject import qualified GI.Gst.Structs.Sample as Gst.Sample -- | Memory-managed wrapper type. newtype BaseSink = BaseSink (ManagedPtr BaseSink) foreign import ccall "gst_base_sink_get_type" c_gst_base_sink_get_type :: IO GType instance GObject BaseSink where gobjectType = c_gst_base_sink_get_type -- | Type class for types which can be safely cast to `BaseSink`, for instance with `toBaseSink`. class (GObject o, O.IsDescendantOf BaseSink o) => IsBaseSink o instance (GObject o, O.IsDescendantOf BaseSink o) => IsBaseSink o instance O.HasParentTypes BaseSink type instance O.ParentTypes BaseSink = '[Gst.Element.Element, Gst.Object.Object, GObject.Object.Object] -- | Cast to `BaseSink`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`. toBaseSink :: (MonadIO m, IsBaseSink o) => o -> m BaseSink toBaseSink = liftIO . unsafeCastTo BaseSink -- | A convenience alias for `Nothing` :: `Maybe` `BaseSink`. noBaseSink :: Maybe BaseSink noBaseSink = Nothing #if ENABLE_OVERLOADING type family ResolveBaseSinkMethod (t :: Symbol) (o :: *) :: * where ResolveBaseSinkMethod "abortState" o = Gst.Element.ElementAbortStateMethodInfo ResolveBaseSinkMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo ResolveBaseSinkMethod "addPad" o = Gst.Element.ElementAddPadMethodInfo ResolveBaseSinkMethod "addPropertyDeepNotifyWatch" o = Gst.Element.ElementAddPropertyDeepNotifyWatchMethodInfo ResolveBaseSinkMethod "addPropertyNotifyWatch" o = Gst.Element.ElementAddPropertyNotifyWatchMethodInfo ResolveBaseSinkMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveBaseSinkMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveBaseSinkMethod "callAsync" o = Gst.Element.ElementCallAsyncMethodInfo ResolveBaseSinkMethod "changeState" o = Gst.Element.ElementChangeStateMethodInfo ResolveBaseSinkMethod "continueState" o = Gst.Element.ElementContinueStateMethodInfo ResolveBaseSinkMethod "createAllPads" o = Gst.Element.ElementCreateAllPadsMethodInfo ResolveBaseSinkMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo ResolveBaseSinkMethod "doPreroll" o = BaseSinkDoPrerollMethodInfo ResolveBaseSinkMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolveBaseSinkMethod "foreachPad" o = Gst.Element.ElementForeachPadMethodInfo ResolveBaseSinkMethod "foreachSinkPad" o = Gst.Element.ElementForeachSinkPadMethodInfo ResolveBaseSinkMethod "foreachSrcPad" o = Gst.Element.ElementForeachSrcPadMethodInfo ResolveBaseSinkMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolveBaseSinkMethod "getv" o = GObject.Object.ObjectGetvMethodInfo ResolveBaseSinkMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo ResolveBaseSinkMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo ResolveBaseSinkMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo ResolveBaseSinkMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo ResolveBaseSinkMethod "isAsyncEnabled" o = BaseSinkIsAsyncEnabledMethodInfo ResolveBaseSinkMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolveBaseSinkMethod "isLastSampleEnabled" o = BaseSinkIsLastSampleEnabledMethodInfo ResolveBaseSinkMethod "isLockedState" o = Gst.Element.ElementIsLockedStateMethodInfo ResolveBaseSinkMethod "isQosEnabled" o = BaseSinkIsQosEnabledMethodInfo ResolveBaseSinkMethod "iteratePads" o = Gst.Element.ElementIteratePadsMethodInfo ResolveBaseSinkMethod "iterateSinkPads" o = Gst.Element.ElementIterateSinkPadsMethodInfo ResolveBaseSinkMethod "iterateSrcPads" o = Gst.Element.ElementIterateSrcPadsMethodInfo ResolveBaseSinkMethod "link" o = Gst.Element.ElementLinkMethodInfo ResolveBaseSinkMethod "linkFiltered" o = Gst.Element.ElementLinkFilteredMethodInfo ResolveBaseSinkMethod "linkPads" o = Gst.Element.ElementLinkPadsMethodInfo ResolveBaseSinkMethod "linkPadsFiltered" o = Gst.Element.ElementLinkPadsFilteredMethodInfo ResolveBaseSinkMethod "linkPadsFull" o = Gst.Element.ElementLinkPadsFullMethodInfo ResolveBaseSinkMethod "lostState" o = Gst.Element.ElementLostStateMethodInfo ResolveBaseSinkMethod "messageFull" o = Gst.Element.ElementMessageFullMethodInfo ResolveBaseSinkMethod "messageFullWithDetails" o = Gst.Element.ElementMessageFullWithDetailsMethodInfo ResolveBaseSinkMethod "noMorePads" o = Gst.Element.ElementNoMorePadsMethodInfo ResolveBaseSinkMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo ResolveBaseSinkMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo ResolveBaseSinkMethod "postMessage" o = Gst.Element.ElementPostMessageMethodInfo ResolveBaseSinkMethod "provideClock" o = Gst.Element.ElementProvideClockMethodInfo ResolveBaseSinkMethod "query" o = Gst.Element.ElementQueryMethodInfo ResolveBaseSinkMethod "queryConvert" o = Gst.Element.ElementQueryConvertMethodInfo ResolveBaseSinkMethod "queryDuration" o = Gst.Element.ElementQueryDurationMethodInfo ResolveBaseSinkMethod "queryLatency" o = BaseSinkQueryLatencyMethodInfo ResolveBaseSinkMethod "queryPosition" o = Gst.Element.ElementQueryPositionMethodInfo ResolveBaseSinkMethod "ref" o = Gst.Object.ObjectRefMethodInfo ResolveBaseSinkMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo ResolveBaseSinkMethod "releaseRequestPad" o = Gst.Element.ElementReleaseRequestPadMethodInfo ResolveBaseSinkMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo ResolveBaseSinkMethod "removePad" o = Gst.Element.ElementRemovePadMethodInfo ResolveBaseSinkMethod "removePropertyNotifyWatch" o = Gst.Element.ElementRemovePropertyNotifyWatchMethodInfo ResolveBaseSinkMethod "requestPad" o = Gst.Element.ElementRequestPadMethodInfo ResolveBaseSinkMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo ResolveBaseSinkMethod "seek" o = Gst.Element.ElementSeekMethodInfo ResolveBaseSinkMethod "seekSimple" o = Gst.Element.ElementSeekSimpleMethodInfo ResolveBaseSinkMethod "sendEvent" o = Gst.Element.ElementSendEventMethodInfo ResolveBaseSinkMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolveBaseSinkMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolveBaseSinkMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo ResolveBaseSinkMethod "syncStateWithParent" o = Gst.Element.ElementSyncStateWithParentMethodInfo ResolveBaseSinkMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo ResolveBaseSinkMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolveBaseSinkMethod "unlink" o = Gst.Element.ElementUnlinkMethodInfo ResolveBaseSinkMethod "unlinkPads" o = Gst.Element.ElementUnlinkPadsMethodInfo ResolveBaseSinkMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo ResolveBaseSinkMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo ResolveBaseSinkMethod "wait" o = BaseSinkWaitMethodInfo ResolveBaseSinkMethod "waitClock" o = BaseSinkWaitClockMethodInfo ResolveBaseSinkMethod "waitPreroll" o = BaseSinkWaitPrerollMethodInfo ResolveBaseSinkMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolveBaseSinkMethod "getBaseTime" o = Gst.Element.ElementGetBaseTimeMethodInfo ResolveBaseSinkMethod "getBlocksize" o = BaseSinkGetBlocksizeMethodInfo ResolveBaseSinkMethod "getBus" o = Gst.Element.ElementGetBusMethodInfo ResolveBaseSinkMethod "getClock" o = Gst.Element.ElementGetClockMethodInfo ResolveBaseSinkMethod "getCompatiblePad" o = Gst.Element.ElementGetCompatiblePadMethodInfo ResolveBaseSinkMethod "getCompatiblePadTemplate" o = Gst.Element.ElementGetCompatiblePadTemplateMethodInfo ResolveBaseSinkMethod "getContext" o = Gst.Element.ElementGetContextMethodInfo ResolveBaseSinkMethod "getContextUnlocked" o = Gst.Element.ElementGetContextUnlockedMethodInfo ResolveBaseSinkMethod "getContexts" o = Gst.Element.ElementGetContextsMethodInfo ResolveBaseSinkMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo ResolveBaseSinkMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo ResolveBaseSinkMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolveBaseSinkMethod "getDropOutOfSegment" o = BaseSinkGetDropOutOfSegmentMethodInfo ResolveBaseSinkMethod "getFactory" o = Gst.Element.ElementGetFactoryMethodInfo ResolveBaseSinkMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo ResolveBaseSinkMethod "getLastSample" o = BaseSinkGetLastSampleMethodInfo ResolveBaseSinkMethod "getLatency" o = BaseSinkGetLatencyMethodInfo ResolveBaseSinkMethod "getMaxBitrate" o = BaseSinkGetMaxBitrateMethodInfo ResolveBaseSinkMethod "getMaxLateness" o = BaseSinkGetMaxLatenessMethodInfo ResolveBaseSinkMethod "getMetadata" o = Gst.Element.ElementGetMetadataMethodInfo ResolveBaseSinkMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo ResolveBaseSinkMethod "getPadTemplate" o = Gst.Element.ElementGetPadTemplateMethodInfo ResolveBaseSinkMethod "getPadTemplateList" o = Gst.Element.ElementGetPadTemplateListMethodInfo ResolveBaseSinkMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo ResolveBaseSinkMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo ResolveBaseSinkMethod "getProcessingDeadline" o = BaseSinkGetProcessingDeadlineMethodInfo ResolveBaseSinkMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolveBaseSinkMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolveBaseSinkMethod "getRenderDelay" o = BaseSinkGetRenderDelayMethodInfo ResolveBaseSinkMethod "getRequestPad" o = Gst.Element.ElementGetRequestPadMethodInfo ResolveBaseSinkMethod "getStartTime" o = Gst.Element.ElementGetStartTimeMethodInfo ResolveBaseSinkMethod "getState" o = Gst.Element.ElementGetStateMethodInfo ResolveBaseSinkMethod "getStaticPad" o = Gst.Element.ElementGetStaticPadMethodInfo ResolveBaseSinkMethod "getSync" o = BaseSinkGetSyncMethodInfo ResolveBaseSinkMethod "getThrottleTime" o = BaseSinkGetThrottleTimeMethodInfo ResolveBaseSinkMethod "getTsOffset" o = BaseSinkGetTsOffsetMethodInfo ResolveBaseSinkMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo ResolveBaseSinkMethod "setAsyncEnabled" o = BaseSinkSetAsyncEnabledMethodInfo ResolveBaseSinkMethod "setBaseTime" o = Gst.Element.ElementSetBaseTimeMethodInfo ResolveBaseSinkMethod "setBlocksize" o = BaseSinkSetBlocksizeMethodInfo ResolveBaseSinkMethod "setBus" o = Gst.Element.ElementSetBusMethodInfo ResolveBaseSinkMethod "setClock" o = Gst.Element.ElementSetClockMethodInfo ResolveBaseSinkMethod "setContext" o = Gst.Element.ElementSetContextMethodInfo ResolveBaseSinkMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo ResolveBaseSinkMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo ResolveBaseSinkMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo ResolveBaseSinkMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolveBaseSinkMethod "setDropOutOfSegment" o = BaseSinkSetDropOutOfSegmentMethodInfo ResolveBaseSinkMethod "setLastSampleEnabled" o = BaseSinkSetLastSampleEnabledMethodInfo ResolveBaseSinkMethod "setLockedState" o = Gst.Element.ElementSetLockedStateMethodInfo ResolveBaseSinkMethod "setMaxBitrate" o = BaseSinkSetMaxBitrateMethodInfo ResolveBaseSinkMethod "setMaxLateness" o = BaseSinkSetMaxLatenessMethodInfo ResolveBaseSinkMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo ResolveBaseSinkMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo ResolveBaseSinkMethod "setProcessingDeadline" o = BaseSinkSetProcessingDeadlineMethodInfo ResolveBaseSinkMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo ResolveBaseSinkMethod "setQosEnabled" o = BaseSinkSetQosEnabledMethodInfo ResolveBaseSinkMethod "setRenderDelay" o = BaseSinkSetRenderDelayMethodInfo ResolveBaseSinkMethod "setStartTime" o = Gst.Element.ElementSetStartTimeMethodInfo ResolveBaseSinkMethod "setState" o = Gst.Element.ElementSetStateMethodInfo ResolveBaseSinkMethod "setSync" o = BaseSinkSetSyncMethodInfo ResolveBaseSinkMethod "setThrottleTime" o = BaseSinkSetThrottleTimeMethodInfo ResolveBaseSinkMethod "setTsOffset" o = BaseSinkSetTsOffsetMethodInfo ResolveBaseSinkMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveBaseSinkMethod t BaseSink, O.MethodInfo info BaseSink p) => OL.IsLabel t (BaseSink -> p) where #if MIN_VERSION_base(4,10,0) fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #else fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #endif #endif -- VVV Prop "async" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Nothing) {- | Get the value of the “@async@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #async @ -} getBaseSinkAsync :: (MonadIO m, IsBaseSink o) => o -> m Bool getBaseSinkAsync obj = liftIO $ B.Properties.getObjectPropertyBool obj "async" {- | Set the value of the “@async@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #async 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkAsync :: (MonadIO m, IsBaseSink o) => o -> Bool -> m () setBaseSinkAsync obj val = liftIO $ B.Properties.setObjectPropertyBool obj "async" val {- | Construct a `GValueConstruct` with valid value for the “@async@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkAsync :: (IsBaseSink o) => Bool -> IO (GValueConstruct o) constructBaseSinkAsync val = B.Properties.constructObjectPropertyBool "async" val #if ENABLE_OVERLOADING data BaseSinkAsyncPropertyInfo instance AttrInfo BaseSinkAsyncPropertyInfo where type AttrAllowedOps BaseSinkAsyncPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkAsyncPropertyInfo = (~) Bool type AttrBaseTypeConstraint BaseSinkAsyncPropertyInfo = IsBaseSink type AttrGetType BaseSinkAsyncPropertyInfo = Bool type AttrLabel BaseSinkAsyncPropertyInfo = "async" type AttrOrigin BaseSinkAsyncPropertyInfo = BaseSink attrGet _ = getBaseSinkAsync attrSet _ = setBaseSinkAsync attrConstruct _ = constructBaseSinkAsync attrClear _ = undefined #endif -- VVV Prop "blocksize" -- Type: TBasicType TUInt -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) {- | Get the value of the “@blocksize@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #blocksize @ -} getBaseSinkBlocksize :: (MonadIO m, IsBaseSink o) => o -> m Word32 getBaseSinkBlocksize obj = liftIO $ B.Properties.getObjectPropertyUInt32 obj "blocksize" {- | Set the value of the “@blocksize@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #blocksize 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkBlocksize :: (MonadIO m, IsBaseSink o) => o -> Word32 -> m () setBaseSinkBlocksize obj val = liftIO $ B.Properties.setObjectPropertyUInt32 obj "blocksize" val {- | Construct a `GValueConstruct` with valid value for the “@blocksize@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkBlocksize :: (IsBaseSink o) => Word32 -> IO (GValueConstruct o) constructBaseSinkBlocksize val = B.Properties.constructObjectPropertyUInt32 "blocksize" val #if ENABLE_OVERLOADING data BaseSinkBlocksizePropertyInfo instance AttrInfo BaseSinkBlocksizePropertyInfo where type AttrAllowedOps BaseSinkBlocksizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkBlocksizePropertyInfo = (~) Word32 type AttrBaseTypeConstraint BaseSinkBlocksizePropertyInfo = IsBaseSink type AttrGetType BaseSinkBlocksizePropertyInfo = Word32 type AttrLabel BaseSinkBlocksizePropertyInfo = "blocksize" type AttrOrigin BaseSinkBlocksizePropertyInfo = BaseSink attrGet _ = getBaseSinkBlocksize attrSet _ = setBaseSinkBlocksize attrConstruct _ = constructBaseSinkBlocksize attrClear _ = undefined #endif -- VVV Prop "enable-last-sample" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Nothing) {- | Get the value of the “@enable-last-sample@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #enableLastSample @ -} getBaseSinkEnableLastSample :: (MonadIO m, IsBaseSink o) => o -> m Bool getBaseSinkEnableLastSample obj = liftIO $ B.Properties.getObjectPropertyBool obj "enable-last-sample" {- | Set the value of the “@enable-last-sample@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #enableLastSample 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkEnableLastSample :: (MonadIO m, IsBaseSink o) => o -> Bool -> m () setBaseSinkEnableLastSample obj val = liftIO $ B.Properties.setObjectPropertyBool obj "enable-last-sample" val {- | Construct a `GValueConstruct` with valid value for the “@enable-last-sample@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkEnableLastSample :: (IsBaseSink o) => Bool -> IO (GValueConstruct o) constructBaseSinkEnableLastSample val = B.Properties.constructObjectPropertyBool "enable-last-sample" val #if ENABLE_OVERLOADING data BaseSinkEnableLastSamplePropertyInfo instance AttrInfo BaseSinkEnableLastSamplePropertyInfo where type AttrAllowedOps BaseSinkEnableLastSamplePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkEnableLastSamplePropertyInfo = (~) Bool type AttrBaseTypeConstraint BaseSinkEnableLastSamplePropertyInfo = IsBaseSink type AttrGetType BaseSinkEnableLastSamplePropertyInfo = Bool type AttrLabel BaseSinkEnableLastSamplePropertyInfo = "enable-last-sample" type AttrOrigin BaseSinkEnableLastSamplePropertyInfo = BaseSink attrGet _ = getBaseSinkEnableLastSample attrSet _ = setBaseSinkEnableLastSample attrConstruct _ = constructBaseSinkEnableLastSample attrClear _ = undefined #endif -- VVV Prop "last-sample" -- Type: TInterface (Name {namespace = "Gst", name = "Sample"}) -- Flags: [PropertyReadable] -- Nullable: (Nothing,Nothing) {- | Get the value of the “@last-sample@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #lastSample @ -} getBaseSinkLastSample :: (MonadIO m, IsBaseSink o) => o -> m (Maybe Gst.Sample.Sample) getBaseSinkLastSample obj = liftIO $ B.Properties.getObjectPropertyBoxed obj "last-sample" Gst.Sample.Sample #if ENABLE_OVERLOADING data BaseSinkLastSamplePropertyInfo instance AttrInfo BaseSinkLastSamplePropertyInfo where type AttrAllowedOps BaseSinkLastSamplePropertyInfo = '[ 'AttrGet, 'AttrClear] type AttrSetTypeConstraint BaseSinkLastSamplePropertyInfo = (~) () type AttrBaseTypeConstraint BaseSinkLastSamplePropertyInfo = IsBaseSink type AttrGetType BaseSinkLastSamplePropertyInfo = (Maybe Gst.Sample.Sample) type AttrLabel BaseSinkLastSamplePropertyInfo = "last-sample" type AttrOrigin BaseSinkLastSamplePropertyInfo = BaseSink attrGet _ = getBaseSinkLastSample attrSet _ = undefined attrConstruct _ = undefined attrClear _ = undefined #endif -- VVV Prop "max-bitrate" -- Type: TBasicType TUInt64 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) {- | Get the value of the “@max-bitrate@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #maxBitrate @ -} getBaseSinkMaxBitrate :: (MonadIO m, IsBaseSink o) => o -> m Word64 getBaseSinkMaxBitrate obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "max-bitrate" {- | Set the value of the “@max-bitrate@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #maxBitrate 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkMaxBitrate :: (MonadIO m, IsBaseSink o) => o -> Word64 -> m () setBaseSinkMaxBitrate obj val = liftIO $ B.Properties.setObjectPropertyUInt64 obj "max-bitrate" val {- | Construct a `GValueConstruct` with valid value for the “@max-bitrate@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkMaxBitrate :: (IsBaseSink o) => Word64 -> IO (GValueConstruct o) constructBaseSinkMaxBitrate val = B.Properties.constructObjectPropertyUInt64 "max-bitrate" val #if ENABLE_OVERLOADING data BaseSinkMaxBitratePropertyInfo instance AttrInfo BaseSinkMaxBitratePropertyInfo where type AttrAllowedOps BaseSinkMaxBitratePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkMaxBitratePropertyInfo = (~) Word64 type AttrBaseTypeConstraint BaseSinkMaxBitratePropertyInfo = IsBaseSink type AttrGetType BaseSinkMaxBitratePropertyInfo = Word64 type AttrLabel BaseSinkMaxBitratePropertyInfo = "max-bitrate" type AttrOrigin BaseSinkMaxBitratePropertyInfo = BaseSink attrGet _ = getBaseSinkMaxBitrate attrSet _ = setBaseSinkMaxBitrate attrConstruct _ = constructBaseSinkMaxBitrate attrClear _ = undefined #endif -- VVV Prop "max-lateness" -- Type: TBasicType TInt64 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) {- | Get the value of the “@max-lateness@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #maxLateness @ -} getBaseSinkMaxLateness :: (MonadIO m, IsBaseSink o) => o -> m Int64 getBaseSinkMaxLateness obj = liftIO $ B.Properties.getObjectPropertyInt64 obj "max-lateness" {- | Set the value of the “@max-lateness@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #maxLateness 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkMaxLateness :: (MonadIO m, IsBaseSink o) => o -> Int64 -> m () setBaseSinkMaxLateness obj val = liftIO $ B.Properties.setObjectPropertyInt64 obj "max-lateness" val {- | Construct a `GValueConstruct` with valid value for the “@max-lateness@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkMaxLateness :: (IsBaseSink o) => Int64 -> IO (GValueConstruct o) constructBaseSinkMaxLateness val = B.Properties.constructObjectPropertyInt64 "max-lateness" val #if ENABLE_OVERLOADING data BaseSinkMaxLatenessPropertyInfo instance AttrInfo BaseSinkMaxLatenessPropertyInfo where type AttrAllowedOps BaseSinkMaxLatenessPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkMaxLatenessPropertyInfo = (~) Int64 type AttrBaseTypeConstraint BaseSinkMaxLatenessPropertyInfo = IsBaseSink type AttrGetType BaseSinkMaxLatenessPropertyInfo = Int64 type AttrLabel BaseSinkMaxLatenessPropertyInfo = "max-lateness" type AttrOrigin BaseSinkMaxLatenessPropertyInfo = BaseSink attrGet _ = getBaseSinkMaxLateness attrSet _ = setBaseSinkMaxLateness attrConstruct _ = constructBaseSinkMaxLateness attrClear _ = undefined #endif -- VVV Prop "processing-deadline" -- Type: TBasicType TUInt64 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) {- | Get the value of the “@processing-deadline@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #processingDeadline @ -} getBaseSinkProcessingDeadline :: (MonadIO m, IsBaseSink o) => o -> m Word64 getBaseSinkProcessingDeadline obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "processing-deadline" {- | Set the value of the “@processing-deadline@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #processingDeadline 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkProcessingDeadline :: (MonadIO m, IsBaseSink o) => o -> Word64 -> m () setBaseSinkProcessingDeadline obj val = liftIO $ B.Properties.setObjectPropertyUInt64 obj "processing-deadline" val {- | Construct a `GValueConstruct` with valid value for the “@processing-deadline@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkProcessingDeadline :: (IsBaseSink o) => Word64 -> IO (GValueConstruct o) constructBaseSinkProcessingDeadline val = B.Properties.constructObjectPropertyUInt64 "processing-deadline" val #if ENABLE_OVERLOADING data BaseSinkProcessingDeadlinePropertyInfo instance AttrInfo BaseSinkProcessingDeadlinePropertyInfo where type AttrAllowedOps BaseSinkProcessingDeadlinePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkProcessingDeadlinePropertyInfo = (~) Word64 type AttrBaseTypeConstraint BaseSinkProcessingDeadlinePropertyInfo = IsBaseSink type AttrGetType BaseSinkProcessingDeadlinePropertyInfo = Word64 type AttrLabel BaseSinkProcessingDeadlinePropertyInfo = "processing-deadline" type AttrOrigin BaseSinkProcessingDeadlinePropertyInfo = BaseSink attrGet _ = getBaseSinkProcessingDeadline attrSet _ = setBaseSinkProcessingDeadline attrConstruct _ = constructBaseSinkProcessingDeadline attrClear _ = undefined #endif -- VVV Prop "qos" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Nothing) {- | Get the value of the “@qos@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #qos @ -} getBaseSinkQos :: (MonadIO m, IsBaseSink o) => o -> m Bool getBaseSinkQos obj = liftIO $ B.Properties.getObjectPropertyBool obj "qos" {- | Set the value of the “@qos@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #qos 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkQos :: (MonadIO m, IsBaseSink o) => o -> Bool -> m () setBaseSinkQos obj val = liftIO $ B.Properties.setObjectPropertyBool obj "qos" val {- | Construct a `GValueConstruct` with valid value for the “@qos@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkQos :: (IsBaseSink o) => Bool -> IO (GValueConstruct o) constructBaseSinkQos val = B.Properties.constructObjectPropertyBool "qos" val #if ENABLE_OVERLOADING data BaseSinkQosPropertyInfo instance AttrInfo BaseSinkQosPropertyInfo where type AttrAllowedOps BaseSinkQosPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkQosPropertyInfo = (~) Bool type AttrBaseTypeConstraint BaseSinkQosPropertyInfo = IsBaseSink type AttrGetType BaseSinkQosPropertyInfo = Bool type AttrLabel BaseSinkQosPropertyInfo = "qos" type AttrOrigin BaseSinkQosPropertyInfo = BaseSink attrGet _ = getBaseSinkQos attrSet _ = setBaseSinkQos attrConstruct _ = constructBaseSinkQos attrClear _ = undefined #endif -- VVV Prop "render-delay" -- Type: TBasicType TUInt64 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) {- | Get the value of the “@render-delay@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #renderDelay @ -} getBaseSinkRenderDelay :: (MonadIO m, IsBaseSink o) => o -> m Word64 getBaseSinkRenderDelay obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "render-delay" {- | Set the value of the “@render-delay@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #renderDelay 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkRenderDelay :: (MonadIO m, IsBaseSink o) => o -> Word64 -> m () setBaseSinkRenderDelay obj val = liftIO $ B.Properties.setObjectPropertyUInt64 obj "render-delay" val {- | Construct a `GValueConstruct` with valid value for the “@render-delay@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkRenderDelay :: (IsBaseSink o) => Word64 -> IO (GValueConstruct o) constructBaseSinkRenderDelay val = B.Properties.constructObjectPropertyUInt64 "render-delay" val #if ENABLE_OVERLOADING data BaseSinkRenderDelayPropertyInfo instance AttrInfo BaseSinkRenderDelayPropertyInfo where type AttrAllowedOps BaseSinkRenderDelayPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkRenderDelayPropertyInfo = (~) Word64 type AttrBaseTypeConstraint BaseSinkRenderDelayPropertyInfo = IsBaseSink type AttrGetType BaseSinkRenderDelayPropertyInfo = Word64 type AttrLabel BaseSinkRenderDelayPropertyInfo = "render-delay" type AttrOrigin BaseSinkRenderDelayPropertyInfo = BaseSink attrGet _ = getBaseSinkRenderDelay attrSet _ = setBaseSinkRenderDelay attrConstruct _ = constructBaseSinkRenderDelay attrClear _ = undefined #endif -- VVV Prop "sync" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) {- | Get the value of the “@sync@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #sync @ -} getBaseSinkSync :: (MonadIO m, IsBaseSink o) => o -> m Bool getBaseSinkSync obj = liftIO $ B.Properties.getObjectPropertyBool obj "sync" {- | Set the value of the “@sync@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #sync 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkSync :: (MonadIO m, IsBaseSink o) => o -> Bool -> m () setBaseSinkSync obj val = liftIO $ B.Properties.setObjectPropertyBool obj "sync" val {- | Construct a `GValueConstruct` with valid value for the “@sync@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkSync :: (IsBaseSink o) => Bool -> IO (GValueConstruct o) constructBaseSinkSync val = B.Properties.constructObjectPropertyBool "sync" val #if ENABLE_OVERLOADING data BaseSinkSyncPropertyInfo instance AttrInfo BaseSinkSyncPropertyInfo where type AttrAllowedOps BaseSinkSyncPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkSyncPropertyInfo = (~) Bool type AttrBaseTypeConstraint BaseSinkSyncPropertyInfo = IsBaseSink type AttrGetType BaseSinkSyncPropertyInfo = Bool type AttrLabel BaseSinkSyncPropertyInfo = "sync" type AttrOrigin BaseSinkSyncPropertyInfo = BaseSink attrGet _ = getBaseSinkSync attrSet _ = setBaseSinkSync attrConstruct _ = constructBaseSinkSync attrClear _ = undefined #endif -- VVV Prop "throttle-time" -- Type: TBasicType TUInt64 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) {- | Get the value of the “@throttle-time@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #throttleTime @ -} getBaseSinkThrottleTime :: (MonadIO m, IsBaseSink o) => o -> m Word64 getBaseSinkThrottleTime obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "throttle-time" {- | Set the value of the “@throttle-time@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #throttleTime 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkThrottleTime :: (MonadIO m, IsBaseSink o) => o -> Word64 -> m () setBaseSinkThrottleTime obj val = liftIO $ B.Properties.setObjectPropertyUInt64 obj "throttle-time" val {- | Construct a `GValueConstruct` with valid value for the “@throttle-time@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkThrottleTime :: (IsBaseSink o) => Word64 -> IO (GValueConstruct o) constructBaseSinkThrottleTime val = B.Properties.constructObjectPropertyUInt64 "throttle-time" val #if ENABLE_OVERLOADING data BaseSinkThrottleTimePropertyInfo instance AttrInfo BaseSinkThrottleTimePropertyInfo where type AttrAllowedOps BaseSinkThrottleTimePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkThrottleTimePropertyInfo = (~) Word64 type AttrBaseTypeConstraint BaseSinkThrottleTimePropertyInfo = IsBaseSink type AttrGetType BaseSinkThrottleTimePropertyInfo = Word64 type AttrLabel BaseSinkThrottleTimePropertyInfo = "throttle-time" type AttrOrigin BaseSinkThrottleTimePropertyInfo = BaseSink attrGet _ = getBaseSinkThrottleTime attrSet _ = setBaseSinkThrottleTime attrConstruct _ = constructBaseSinkThrottleTime attrClear _ = undefined #endif -- VVV Prop "ts-offset" -- Type: TBasicType TInt64 -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) {- | Get the value of the “@ts-offset@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' baseSink #tsOffset @ -} getBaseSinkTsOffset :: (MonadIO m, IsBaseSink o) => o -> m Int64 getBaseSinkTsOffset obj = liftIO $ B.Properties.getObjectPropertyInt64 obj "ts-offset" {- | Set the value of the “@ts-offset@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' baseSink [ #tsOffset 'Data.GI.Base.Attributes.:=' value ] @ -} setBaseSinkTsOffset :: (MonadIO m, IsBaseSink o) => o -> Int64 -> m () setBaseSinkTsOffset obj val = liftIO $ B.Properties.setObjectPropertyInt64 obj "ts-offset" val {- | Construct a `GValueConstruct` with valid value for the “@ts-offset@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructBaseSinkTsOffset :: (IsBaseSink o) => Int64 -> IO (GValueConstruct o) constructBaseSinkTsOffset val = B.Properties.constructObjectPropertyInt64 "ts-offset" val #if ENABLE_OVERLOADING data BaseSinkTsOffsetPropertyInfo instance AttrInfo BaseSinkTsOffsetPropertyInfo where type AttrAllowedOps BaseSinkTsOffsetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BaseSinkTsOffsetPropertyInfo = (~) Int64 type AttrBaseTypeConstraint BaseSinkTsOffsetPropertyInfo = IsBaseSink type AttrGetType BaseSinkTsOffsetPropertyInfo = Int64 type AttrLabel BaseSinkTsOffsetPropertyInfo = "ts-offset" type AttrOrigin BaseSinkTsOffsetPropertyInfo = BaseSink attrGet _ = getBaseSinkTsOffset attrSet _ = setBaseSinkTsOffset attrConstruct _ = constructBaseSinkTsOffset attrClear _ = undefined #endif #if ENABLE_OVERLOADING instance O.HasAttributeList BaseSink type instance O.AttributeList BaseSink = BaseSinkAttributeList type BaseSinkAttributeList = ('[ '("async", BaseSinkAsyncPropertyInfo), '("blocksize", BaseSinkBlocksizePropertyInfo), '("enableLastSample", BaseSinkEnableLastSamplePropertyInfo), '("lastSample", BaseSinkLastSamplePropertyInfo), '("maxBitrate", BaseSinkMaxBitratePropertyInfo), '("maxLateness", BaseSinkMaxLatenessPropertyInfo), '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("processingDeadline", BaseSinkProcessingDeadlinePropertyInfo), '("qos", BaseSinkQosPropertyInfo), '("renderDelay", BaseSinkRenderDelayPropertyInfo), '("sync", BaseSinkSyncPropertyInfo), '("throttleTime", BaseSinkThrottleTimePropertyInfo), '("tsOffset", BaseSinkTsOffsetPropertyInfo)] :: [(Symbol, *)]) #endif #if ENABLE_OVERLOADING baseSinkAsync :: AttrLabelProxy "async" baseSinkAsync = AttrLabelProxy baseSinkBlocksize :: AttrLabelProxy "blocksize" baseSinkBlocksize = AttrLabelProxy baseSinkEnableLastSample :: AttrLabelProxy "enableLastSample" baseSinkEnableLastSample = AttrLabelProxy baseSinkLastSample :: AttrLabelProxy "lastSample" baseSinkLastSample = AttrLabelProxy baseSinkMaxBitrate :: AttrLabelProxy "maxBitrate" baseSinkMaxBitrate = AttrLabelProxy baseSinkMaxLateness :: AttrLabelProxy "maxLateness" baseSinkMaxLateness = AttrLabelProxy baseSinkProcessingDeadline :: AttrLabelProxy "processingDeadline" baseSinkProcessingDeadline = AttrLabelProxy baseSinkQos :: AttrLabelProxy "qos" baseSinkQos = AttrLabelProxy baseSinkRenderDelay :: AttrLabelProxy "renderDelay" baseSinkRenderDelay = AttrLabelProxy baseSinkSync :: AttrLabelProxy "sync" baseSinkSync = AttrLabelProxy baseSinkThrottleTime :: AttrLabelProxy "throttleTime" baseSinkThrottleTime = AttrLabelProxy baseSinkTsOffset :: AttrLabelProxy "tsOffset" baseSinkTsOffset = AttrLabelProxy #endif #if ENABLE_OVERLOADING type instance O.SignalList BaseSink = BaseSinkSignalList type BaseSinkSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("noMorePads", Gst.Element.ElementNoMorePadsSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("padAdded", Gst.Element.ElementPadAddedSignalInfo), '("padRemoved", Gst.Element.ElementPadRemovedSignalInfo)] :: [(Symbol, *)]) #endif -- method BaseSink::do_preroll -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "obj", argType = TInterface (Name {namespace = "Gst", name = "MiniObject"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the mini object that caused the preroll", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "FlowReturn"})) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_do_preroll" gst_base_sink_do_preroll :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Ptr Gst.MiniObject.MiniObject -> -- obj : TInterface (Name {namespace = "Gst", name = "MiniObject"}) IO CInt {- | If the /@sink@/ spawns its own thread for pulling buffers from upstream it should call this method after it has pulled a buffer. If the element needed to preroll, this function will perform the preroll and will then block until the element state is changed. This function should be called with the PREROLL_LOCK held. -} baseSinkDoPreroll :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Gst.MiniObject.MiniObject {- ^ /@obj@/: the mini object that caused the preroll -} -> m Gst.Enums.FlowReturn {- ^ __Returns:__ 'GI.Gst.Enums.FlowReturnOk' if the preroll completed and processing can continue. Any other return value should be returned from the render vmethod. -} baseSinkDoPreroll sink obj = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink obj' <- unsafeManagedPtrGetPtr obj result <- gst_base_sink_do_preroll sink' obj' let result' = (toEnum . fromIntegral) result touchManagedPtr sink touchManagedPtr obj return result' #if ENABLE_OVERLOADING data BaseSinkDoPrerollMethodInfo instance (signature ~ (Gst.MiniObject.MiniObject -> m Gst.Enums.FlowReturn), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkDoPrerollMethodInfo a signature where overloadedMethod _ = baseSinkDoPreroll #endif -- method BaseSink::get_blocksize -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_blocksize" gst_base_sink_get_blocksize :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO Word32 {- | Get the number of bytes that the sink will pull when it is operating in pull mode. -} baseSinkGetBlocksize :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> m Word32 {- ^ __Returns:__ the number of bytes /@sink@/ will pull in pull mode. -} baseSinkGetBlocksize sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_blocksize sink' touchManagedPtr sink return result #if ENABLE_OVERLOADING data BaseSinkGetBlocksizeMethodInfo instance (signature ~ (m Word32), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetBlocksizeMethodInfo a signature where overloadedMethod _ = baseSinkGetBlocksize #endif -- method BaseSink::get_drop_out_of_segment -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_drop_out_of_segment" gst_base_sink_get_drop_out_of_segment :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO CInt {- | Checks if /@sink@/ is currently configured to drop buffers which are outside the current segment /Since: 1.12/ -} baseSinkGetDropOutOfSegment :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Bool {- ^ __Returns:__ 'True' if the sink is configured to drop buffers outside the current segment. -} baseSinkGetDropOutOfSegment sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_drop_out_of_segment sink' let result' = (/= 0) result touchManagedPtr sink return result' #if ENABLE_OVERLOADING data BaseSinkGetDropOutOfSegmentMethodInfo instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetDropOutOfSegmentMethodInfo a signature where overloadedMethod _ = baseSinkGetDropOutOfSegment #endif -- method BaseSink::get_last_sample -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "Sample"})) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_last_sample" gst_base_sink_get_last_sample :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO (Ptr Gst.Sample.Sample) {- | Get the last sample that arrived in the sink and was used for preroll or for rendering. This property can be used to generate thumbnails. The 'GI.Gst.Structs.Caps.Caps' on the sample can be used to determine the type of the buffer. Free-function: gst_sample_unref -} baseSinkGetLastSample :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m (Maybe Gst.Sample.Sample) {- ^ __Returns:__ a 'GI.Gst.Structs.Sample.Sample'. @/gst_sample_unref()/@ after usage. This function returns 'Nothing' when no buffer has arrived in the sink yet or when the sink is not in PAUSED or PLAYING. -} baseSinkGetLastSample sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_last_sample sink' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapBoxed Gst.Sample.Sample) result' return result'' touchManagedPtr sink return maybeResult #if ENABLE_OVERLOADING data BaseSinkGetLastSampleMethodInfo instance (signature ~ (m (Maybe Gst.Sample.Sample)), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetLastSampleMethodInfo a signature where overloadedMethod _ = baseSinkGetLastSample #endif -- method BaseSink::get_latency -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_latency" gst_base_sink_get_latency :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO Word64 {- | Get the currently configured latency. -} baseSinkGetLatency :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Word64 {- ^ __Returns:__ The configured latency. -} baseSinkGetLatency sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_latency sink' touchManagedPtr sink return result #if ENABLE_OVERLOADING data BaseSinkGetLatencyMethodInfo instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetLatencyMethodInfo a signature where overloadedMethod _ = baseSinkGetLatency #endif -- method BaseSink::get_max_bitrate -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_max_bitrate" gst_base_sink_get_max_bitrate :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO Word64 {- | Get the maximum amount of bits per second that the sink will render. /Since: 1.2/ -} baseSinkGetMaxBitrate :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> m Word64 {- ^ __Returns:__ the maximum number of bits per second /@sink@/ will render. -} baseSinkGetMaxBitrate sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_max_bitrate sink' touchManagedPtr sink return result #if ENABLE_OVERLOADING data BaseSinkGetMaxBitrateMethodInfo instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetMaxBitrateMethodInfo a signature where overloadedMethod _ = baseSinkGetMaxBitrate #endif -- method BaseSink::get_max_lateness -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt64) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_max_lateness" gst_base_sink_get_max_lateness :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO Int64 {- | Gets the max lateness value. See 'GI.GstBase.Objects.BaseSink.baseSinkSetMaxLateness' for more details. -} baseSinkGetMaxLateness :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Int64 {- ^ __Returns:__ The maximum time in nanoseconds that a buffer can be late before it is dropped and not rendered. A value of -1 means an unlimited time. -} baseSinkGetMaxLateness sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_max_lateness sink' touchManagedPtr sink return result #if ENABLE_OVERLOADING data BaseSinkGetMaxLatenessMethodInfo instance (signature ~ (m Int64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetMaxLatenessMethodInfo a signature where overloadedMethod _ = baseSinkGetMaxLateness #endif -- method BaseSink::get_processing_deadline -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_processing_deadline" gst_base_sink_get_processing_deadline :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO Word64 {- | Get the processing deadline of /@sink@/. see 'GI.GstBase.Objects.BaseSink.baseSinkSetProcessingDeadline' for more information about the processing deadline. /Since: 1.16/ -} baseSinkGetProcessingDeadline :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> m Word64 {- ^ __Returns:__ the processing deadline -} baseSinkGetProcessingDeadline sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_processing_deadline sink' touchManagedPtr sink return result #if ENABLE_OVERLOADING data BaseSinkGetProcessingDeadlineMethodInfo instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetProcessingDeadlineMethodInfo a signature where overloadedMethod _ = baseSinkGetProcessingDeadline #endif -- method BaseSink::get_render_delay -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_render_delay" gst_base_sink_get_render_delay :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO Word64 {- | Get the render delay of /@sink@/. see 'GI.GstBase.Objects.BaseSink.baseSinkSetRenderDelay' for more information about the render delay. -} baseSinkGetRenderDelay :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> m Word64 {- ^ __Returns:__ the render delay of /@sink@/. -} baseSinkGetRenderDelay sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_render_delay sink' touchManagedPtr sink return result #if ENABLE_OVERLOADING data BaseSinkGetRenderDelayMethodInfo instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetRenderDelayMethodInfo a signature where overloadedMethod _ = baseSinkGetRenderDelay #endif -- method BaseSink::get_sync -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_sync" gst_base_sink_get_sync :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO CInt {- | Checks if /@sink@/ is currently configured to synchronize against the clock. -} baseSinkGetSync :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Bool {- ^ __Returns:__ 'True' if the sink is configured to synchronize against the clock. -} baseSinkGetSync sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_sync sink' let result' = (/= 0) result touchManagedPtr sink return result' #if ENABLE_OVERLOADING data BaseSinkGetSyncMethodInfo instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetSyncMethodInfo a signature where overloadedMethod _ = baseSinkGetSync #endif -- method BaseSink::get_throttle_time -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_throttle_time" gst_base_sink_get_throttle_time :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO Word64 {- | Get the time that will be inserted between frames to control the maximum buffers per second. -} baseSinkGetThrottleTime :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> m Word64 {- ^ __Returns:__ the number of nanoseconds /@sink@/ will put between frames. -} baseSinkGetThrottleTime sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_throttle_time sink' touchManagedPtr sink return result #if ENABLE_OVERLOADING data BaseSinkGetThrottleTimeMethodInfo instance (signature ~ (m Word64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetThrottleTimeMethodInfo a signature where overloadedMethod _ = baseSinkGetThrottleTime #endif -- method BaseSink::get_ts_offset -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt64) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_get_ts_offset" gst_base_sink_get_ts_offset :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO Int64 {- | Get the synchronisation offset of /@sink@/. -} baseSinkGetTsOffset :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Int64 {- ^ __Returns:__ The synchronisation offset. -} baseSinkGetTsOffset sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_get_ts_offset sink' touchManagedPtr sink return result #if ENABLE_OVERLOADING data BaseSinkGetTsOffsetMethodInfo instance (signature ~ (m Int64), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkGetTsOffsetMethodInfo a signature where overloadedMethod _ = baseSinkGetTsOffset #endif -- method BaseSink::is_async_enabled -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_is_async_enabled" gst_base_sink_is_async_enabled :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO CInt {- | Checks if /@sink@/ is currently configured to perform asynchronous state changes to PAUSED. -} baseSinkIsAsyncEnabled :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Bool {- ^ __Returns:__ 'True' if the sink is configured to perform asynchronous state changes. -} baseSinkIsAsyncEnabled sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_is_async_enabled sink' let result' = (/= 0) result touchManagedPtr sink return result' #if ENABLE_OVERLOADING data BaseSinkIsAsyncEnabledMethodInfo instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkIsAsyncEnabledMethodInfo a signature where overloadedMethod _ = baseSinkIsAsyncEnabled #endif -- method BaseSink::is_last_sample_enabled -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_is_last_sample_enabled" gst_base_sink_is_last_sample_enabled :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO CInt {- | Checks if /@sink@/ is currently configured to store the last received sample in the last-sample property. -} baseSinkIsLastSampleEnabled :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Bool {- ^ __Returns:__ 'True' if the sink is configured to store the last received sample. -} baseSinkIsLastSampleEnabled sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_is_last_sample_enabled sink' let result' = (/= 0) result touchManagedPtr sink return result' #if ENABLE_OVERLOADING data BaseSinkIsLastSampleEnabledMethodInfo instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkIsLastSampleEnabledMethodInfo a signature where overloadedMethod _ = baseSinkIsLastSampleEnabled #endif -- method BaseSink::is_qos_enabled -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_is_qos_enabled" gst_base_sink_is_qos_enabled :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO CInt {- | Checks if /@sink@/ is currently configured to send Quality-of-Service events upstream. -} baseSinkIsQosEnabled :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Bool {- ^ __Returns:__ 'True' if the sink is configured to perform Quality-of-Service. -} baseSinkIsQosEnabled sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_is_qos_enabled sink' let result' = (/= 0) result touchManagedPtr sink return result' #if ENABLE_OVERLOADING data BaseSinkIsQosEnabledMethodInfo instance (signature ~ (m Bool), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkIsQosEnabledMethodInfo a signature where overloadedMethod _ = baseSinkIsQosEnabled #endif -- method BaseSink::query_latency -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "live", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if the sink is live", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "upstream_live", argType = TBasicType TBoolean, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if an upstream element is live", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "min_latency", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the min latency of the upstream elements", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "max_latency", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the max latency of the upstream elements", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_query_latency" gst_base_sink_query_latency :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Ptr CInt -> -- live : TBasicType TBoolean Ptr CInt -> -- upstream_live : TBasicType TBoolean Ptr Word64 -> -- min_latency : TBasicType TUInt64 Ptr Word64 -> -- max_latency : TBasicType TUInt64 IO CInt {- | Query the sink for the latency parameters. The latency will be queried from the upstream elements. /@live@/ will be 'True' if /@sink@/ is configured to synchronize against the clock. /@upstreamLive@/ will be 'True' if an upstream element is live. If both /@live@/ and /@upstreamLive@/ are 'True', the sink will want to compensate for the latency introduced by the upstream elements by setting the /@minLatency@/ to a strictly positive value. This function is mostly used by subclasses. -} baseSinkQueryLatency :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m ((Bool, Bool, Bool, Word64, Word64)) {- ^ __Returns:__ 'True' if the query succeeded. -} baseSinkQueryLatency sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink live <- allocMem :: IO (Ptr CInt) upstreamLive <- allocMem :: IO (Ptr CInt) minLatency <- allocMem :: IO (Ptr Word64) maxLatency <- allocMem :: IO (Ptr Word64) result <- gst_base_sink_query_latency sink' live upstreamLive minLatency maxLatency let result' = (/= 0) result live' <- peek live let live'' = (/= 0) live' upstreamLive' <- peek upstreamLive let upstreamLive'' = (/= 0) upstreamLive' minLatency' <- peek minLatency maxLatency' <- peek maxLatency touchManagedPtr sink freeMem live freeMem upstreamLive freeMem minLatency freeMem maxLatency return (result', live'', upstreamLive'', minLatency', maxLatency') #if ENABLE_OVERLOADING data BaseSinkQueryLatencyMethodInfo instance (signature ~ (m ((Bool, Bool, Bool, Word64, Word64))), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkQueryLatencyMethodInfo a signature where overloadedMethod _ = baseSinkQueryLatency #endif -- method BaseSink::set_async_enabled -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new async value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_async_enabled" gst_base_sink_set_async_enabled :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) CInt -> -- enabled : TBasicType TBoolean IO () {- | Configures /@sink@/ to perform all state changes asynchronously. When async is disabled, the sink will immediately go to PAUSED instead of waiting for a preroll buffer. This feature is useful if the sink does not synchronize against the clock or when it is dealing with sparse streams. -} baseSinkSetAsyncEnabled :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Bool {- ^ /@enabled@/: the new async value. -} -> m () baseSinkSetAsyncEnabled sink enabled = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink let enabled' = (fromIntegral . fromEnum) enabled gst_base_sink_set_async_enabled sink' enabled' touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetAsyncEnabledMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetAsyncEnabledMethodInfo a signature where overloadedMethod _ = baseSinkSetAsyncEnabled #endif -- method BaseSink::set_blocksize -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "blocksize", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the blocksize in bytes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_blocksize" gst_base_sink_set_blocksize :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Word32 -> -- blocksize : TBasicType TUInt IO () {- | Set the number of bytes that the sink will pull when it is operating in pull mode. -} baseSinkSetBlocksize :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> Word32 {- ^ /@blocksize@/: the blocksize in bytes -} -> m () baseSinkSetBlocksize sink blocksize = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink gst_base_sink_set_blocksize sink' blocksize touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetBlocksizeMethodInfo instance (signature ~ (Word32 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetBlocksizeMethodInfo a signature where overloadedMethod _ = baseSinkSetBlocksize #endif -- method BaseSink::set_drop_out_of_segment -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "drop_out_of_segment", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "drop buffers outside the segment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_drop_out_of_segment" gst_base_sink_set_drop_out_of_segment :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) CInt -> -- drop_out_of_segment : TBasicType TBoolean IO () {- | Configure /@sink@/ to drop buffers which are outside the current segment /Since: 1.12/ -} baseSinkSetDropOutOfSegment :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Bool {- ^ /@dropOutOfSegment@/: drop buffers outside the segment -} -> m () baseSinkSetDropOutOfSegment sink dropOutOfSegment = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink let dropOutOfSegment' = (fromIntegral . fromEnum) dropOutOfSegment gst_base_sink_set_drop_out_of_segment sink' dropOutOfSegment' touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetDropOutOfSegmentMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetDropOutOfSegmentMethodInfo a signature where overloadedMethod _ = baseSinkSetDropOutOfSegment #endif -- method BaseSink::set_last_sample_enabled -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new enable-last-sample value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_last_sample_enabled" gst_base_sink_set_last_sample_enabled :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) CInt -> -- enabled : TBasicType TBoolean IO () {- | Configures /@sink@/ to store the last received sample in the last-sample property. -} baseSinkSetLastSampleEnabled :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Bool {- ^ /@enabled@/: the new enable-last-sample value. -} -> m () baseSinkSetLastSampleEnabled sink enabled = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink let enabled' = (fromIntegral . fromEnum) enabled gst_base_sink_set_last_sample_enabled sink' enabled' touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetLastSampleEnabledMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetLastSampleEnabledMethodInfo a signature where overloadedMethod _ = baseSinkSetLastSampleEnabled #endif -- method BaseSink::set_max_bitrate -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_bitrate", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the max_bitrate in bits per second", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_max_bitrate" gst_base_sink_set_max_bitrate :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Word64 -> -- max_bitrate : TBasicType TUInt64 IO () {- | Set the maximum amount of bits per second that the sink will render. /Since: 1.2/ -} baseSinkSetMaxBitrate :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> Word64 {- ^ /@maxBitrate@/: the max_bitrate in bits per second -} -> m () baseSinkSetMaxBitrate sink maxBitrate = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink gst_base_sink_set_max_bitrate sink' maxBitrate touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetMaxBitrateMethodInfo instance (signature ~ (Word64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetMaxBitrateMethodInfo a signature where overloadedMethod _ = baseSinkSetMaxBitrate #endif -- method BaseSink::set_max_lateness -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_lateness", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new max lateness value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_max_lateness" gst_base_sink_set_max_lateness :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Int64 -> -- max_lateness : TBasicType TInt64 IO () {- | Sets the new max lateness value to /@maxLateness@/. This value is used to decide if a buffer should be dropped or not based on the buffer timestamp and the current clock time. A value of -1 means an unlimited time. -} baseSinkSetMaxLateness :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Int64 {- ^ /@maxLateness@/: the new max lateness value. -} -> m () baseSinkSetMaxLateness sink maxLateness = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink gst_base_sink_set_max_lateness sink' maxLateness touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetMaxLatenessMethodInfo instance (signature ~ (Int64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetMaxLatenessMethodInfo a signature where overloadedMethod _ = baseSinkSetMaxLateness #endif -- method BaseSink::set_processing_deadline -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "processing_deadline", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new processing deadline in nanoseconds.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_processing_deadline" gst_base_sink_set_processing_deadline :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Word64 -> -- processing_deadline : TBasicType TUInt64 IO () {- | Maximum amount of time (in nanoseconds) that the pipeline can take for processing the buffer. This is added to the latency of live pipelines. This function is usually called by subclasses. /Since: 1.16/ -} baseSinkSetProcessingDeadline :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> Word64 {- ^ /@processingDeadline@/: the new processing deadline in nanoseconds. -} -> m () baseSinkSetProcessingDeadline sink processingDeadline = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink gst_base_sink_set_processing_deadline sink' processingDeadline touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetProcessingDeadlineMethodInfo instance (signature ~ (Word64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetProcessingDeadlineMethodInfo a signature where overloadedMethod _ = baseSinkSetProcessingDeadline #endif -- method BaseSink::set_qos_enabled -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new qos value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_qos_enabled" gst_base_sink_set_qos_enabled :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) CInt -> -- enabled : TBasicType TBoolean IO () {- | Configures /@sink@/ to send Quality-of-Service events upstream. -} baseSinkSetQosEnabled :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Bool {- ^ /@enabled@/: the new qos value. -} -> m () baseSinkSetQosEnabled sink enabled = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink let enabled' = (fromIntegral . fromEnum) enabled gst_base_sink_set_qos_enabled sink' enabled' touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetQosEnabledMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetQosEnabledMethodInfo a signature where overloadedMethod _ = baseSinkSetQosEnabled #endif -- method BaseSink::set_render_delay -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "delay", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new delay", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_render_delay" gst_base_sink_set_render_delay :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Word64 -> -- delay : TBasicType TUInt64 IO () {- | Set the render delay in /@sink@/ to /@delay@/. The render delay is the time between actual rendering of a buffer and its synchronisation time. Some devices might delay media rendering which can be compensated for with this function. After calling this function, this sink will report additional latency and other sinks will adjust their latency to delay the rendering of their media. This function is usually called by subclasses. -} baseSinkSetRenderDelay :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> Word64 {- ^ /@delay@/: the new delay -} -> m () baseSinkSetRenderDelay sink delay = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink gst_base_sink_set_render_delay sink' delay touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetRenderDelayMethodInfo instance (signature ~ (Word64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetRenderDelayMethodInfo a signature where overloadedMethod _ = baseSinkSetRenderDelay #endif -- method BaseSink::set_sync -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sync", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new sync value.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_sync" gst_base_sink_set_sync :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) CInt -> -- sync : TBasicType TBoolean IO () {- | Configures /@sink@/ to synchronize on the clock or not. When /@sync@/ is 'False', incoming samples will be played as fast as possible. If /@sync@/ is 'True', the timestamps of the incoming buffers will be used to schedule the exact render time of its contents. -} baseSinkSetSync :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Bool {- ^ /@sync@/: the new sync value. -} -> m () baseSinkSetSync sink sync = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink let sync' = (fromIntegral . fromEnum) sync gst_base_sink_set_sync sink' sync' touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetSyncMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetSyncMethodInfo a signature where overloadedMethod _ = baseSinkSetSync #endif -- method BaseSink::set_throttle_time -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBaseSink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "throttle", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the throttle time in nanoseconds", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_throttle_time" gst_base_sink_set_throttle_time :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Word64 -> -- throttle : TBasicType TUInt64 IO () {- | Set the time that will be inserted between rendered buffers. This can be used to control the maximum buffers per second that the sink will render. -} baseSinkSetThrottleTime :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: a 'GI.GstBase.Objects.BaseSink.BaseSink' -} -> Word64 {- ^ /@throttle@/: the throttle time in nanoseconds -} -> m () baseSinkSetThrottleTime sink throttle = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink gst_base_sink_set_throttle_time sink' throttle touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetThrottleTimeMethodInfo instance (signature ~ (Word64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetThrottleTimeMethodInfo a signature where overloadedMethod _ = baseSinkSetThrottleTime #endif -- method BaseSink::set_ts_offset -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "offset", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new offset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_set_ts_offset" gst_base_sink_set_ts_offset :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Int64 -> -- offset : TBasicType TInt64 IO () {- | Adjust the synchronisation of /@sink@/ with /@offset@/. A negative value will render buffers earlier than their timestamp. A positive value will delay rendering. This function can be used to fix playback of badly timestamped buffers. -} baseSinkSetTsOffset :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Int64 {- ^ /@offset@/: the new offset -} -> m () baseSinkSetTsOffset sink offset = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink gst_base_sink_set_ts_offset sink' offset touchManagedPtr sink return () #if ENABLE_OVERLOADING data BaseSinkSetTsOffsetMethodInfo instance (signature ~ (Int64 -> m ()), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkSetTsOffsetMethodInfo a signature where overloadedMethod _ = baseSinkSetTsOffset #endif -- method BaseSink::wait -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "time", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the running_time to be reached", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "jitter", argType = TBasicType TInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the jitter to be filled with time diff, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "FlowReturn"})) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_wait" gst_base_sink_wait :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Word64 -> -- time : TBasicType TUInt64 Ptr Int64 -> -- jitter : TBasicType TInt64 IO CInt {- | This function will wait for preroll to complete and will then block until /@time@/ is reached. It is usually called by subclasses that use their own internal synchronisation but want to let some synchronization (like EOS) be handled by the base class. This function should only be called with the PREROLL_LOCK held (like when receiving an EOS event in the ::event vmethod or when handling buffers in ::render). The /@time@/ argument should be the running_time of when the timeout should happen and will be adjusted with any latency and offset configured in the sink. -} baseSinkWait :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Word64 {- ^ /@time@/: the running_time to be reached -} -> m ((Gst.Enums.FlowReturn, Int64)) {- ^ __Returns:__ 'GI.Gst.Enums.FlowReturn' -} baseSinkWait sink time = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink jitter <- allocMem :: IO (Ptr Int64) result <- gst_base_sink_wait sink' time jitter let result' = (toEnum . fromIntegral) result jitter' <- peek jitter touchManagedPtr sink freeMem jitter return (result', jitter') #if ENABLE_OVERLOADING data BaseSinkWaitMethodInfo instance (signature ~ (Word64 -> m ((Gst.Enums.FlowReturn, Int64))), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkWaitMethodInfo a signature where overloadedMethod _ = baseSinkWait #endif -- method BaseSink::wait_clock -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "time", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the running_time to be reached", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "jitter", argType = TBasicType TInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the jitter to be filled with time diff, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "ClockReturn"})) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_wait_clock" gst_base_sink_wait_clock :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) Word64 -> -- time : TBasicType TUInt64 Ptr Int64 -> -- jitter : TBasicType TInt64 IO CUInt {- | This function will block until /@time@/ is reached. It is usually called by subclasses that use their own internal synchronisation. If /@time@/ is not valid, no synchronisation is done and 'GI.Gst.Enums.ClockReturnBadtime' is returned. Likewise, if synchronisation is disabled in the element or there is no clock, no synchronisation is done and 'GI.Gst.Enums.ClockReturnBadtime' is returned. This function should only be called with the PREROLL_LOCK held, like when receiving an EOS event in the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/event/@() vmethod or when receiving a buffer in the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() vmethod. The /@time@/ argument should be the running_time of when this method should return and is not adjusted with any latency or offset configured in the sink. -} baseSinkWaitClock :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> Word64 {- ^ /@time@/: the running_time to be reached -} -> m ((Gst.Enums.ClockReturn, Int64)) {- ^ __Returns:__ 'GI.Gst.Enums.ClockReturn' -} baseSinkWaitClock sink time = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink jitter <- allocMem :: IO (Ptr Int64) result <- gst_base_sink_wait_clock sink' time jitter let result' = (toEnum . fromIntegral) result jitter' <- peek jitter touchManagedPtr sink freeMem jitter return (result', jitter') #if ENABLE_OVERLOADING data BaseSinkWaitClockMethodInfo instance (signature ~ (Word64 -> m ((Gst.Enums.ClockReturn, Int64))), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkWaitClockMethodInfo a signature where overloadedMethod _ = baseSinkWaitClock #endif -- method BaseSink::wait_preroll -- method type : OrdinaryMethod -- Args : [Arg {argCName = "sink", argType = TInterface (Name {namespace = "GstBase", name = "BaseSink"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the sink", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "FlowReturn"})) -- throws : False -- Skip return : False foreign import ccall "gst_base_sink_wait_preroll" gst_base_sink_wait_preroll :: Ptr BaseSink -> -- sink : TInterface (Name {namespace = "GstBase", name = "BaseSink"}) IO CInt {- | If the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method performs its own synchronisation against the clock it must unblock when going from PLAYING to the PAUSED state and call this method before continuing to render the remaining data. If the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method can block on something else than the clock, it must also be ready to unblock immediately on the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/unlock/@() method and cause the 'GI.GstBase.Structs.BaseSinkClass.BaseSinkClass'.@/render/@() method to immediately call this function. In this case, the subclass must be prepared to continue rendering where it left off if this function returns 'GI.Gst.Enums.FlowReturnOk'. This function will block until a state change to PLAYING happens (in which case this function returns 'GI.Gst.Enums.FlowReturnOk') or the processing must be stopped due to a state change to READY or a FLUSH event (in which case this function returns 'GI.Gst.Enums.FlowReturnFlushing'). This function should only be called with the PREROLL_LOCK held, like in the render function. -} baseSinkWaitPreroll :: (B.CallStack.HasCallStack, MonadIO m, IsBaseSink a) => a {- ^ /@sink@/: the sink -} -> m Gst.Enums.FlowReturn {- ^ __Returns:__ 'GI.Gst.Enums.FlowReturnOk' if the preroll completed and processing can continue. Any other return value should be returned from the render vmethod. -} baseSinkWaitPreroll sink = liftIO $ do sink' <- unsafeManagedPtrCastPtr sink result <- gst_base_sink_wait_preroll sink' let result' = (toEnum . fromIntegral) result touchManagedPtr sink return result' #if ENABLE_OVERLOADING data BaseSinkWaitPrerollMethodInfo instance (signature ~ (m Gst.Enums.FlowReturn), MonadIO m, IsBaseSink a) => O.MethodInfo BaseSinkWaitPrerollMethodInfo a signature where overloadedMethod _ = baseSinkWaitPreroll #endif