{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) This base class is for video decoders turning encoded data into raw video frames. The GstVideoDecoder base class and derived subclasses should cooperate as follows: == Configuration * Initially, GstVideoDecoder calls /@start@/ when the decoder element is activated, which allows the subclass to perform any global setup. * GstVideoDecoder calls /@setFormat@/ to inform the subclass of caps describing input video data that it is about to receive, including possibly configuration data. While unlikely, it might be called more than once, if changing input parameters require reconfiguration. * Incoming data buffers are processed as needed, described in Data Processing below. * GstVideoDecoder calls /@stop@/ at end of all processing. == Data processing * The base class gathers input data, and optionally allows subclass to parse this into subsequently manageable chunks, typically corresponding to and referred to as \'frames\'. * Each input frame is provided in turn to the subclass\' /@handleFrame@/ callback. The ownership of the frame is given to the /@handleFrame@/ callback. * If codec processing results in decoded data, the subclass should call /@gstVideoDecoderFinishFrame@/ to have decoded data pushed. downstream. Otherwise, the subclass must call /@gstVideoDecoderDropFrame@/, to allow the base class to do timestamp and offset tracking, and possibly to requeue the frame for a later attempt in the case of reverse playback. == Shutdown phase * The GstVideoDecoder class calls /@stop@/ to inform the subclass that data parsing will be stopped. == Additional Notes * Seeking\/Flushing * When the pipeline is seeked or otherwise flushed, the subclass is informed via a call to its /@reset@/ callback, with the hard parameter set to true. This indicates the subclass should drop any internal data queues and timestamps and prepare for a fresh set of buffers to arrive for parsing and decoding. * End Of Stream * At end-of-stream, the subclass /@parse@/ function may be called some final times with the at_eos parameter set to true, indicating that the element should not expect any more data to be arriving, and it should parse and remaining frames and call 'GI.GstVideo.Objects.VideoDecoder.videoDecoderHaveFrame' if possible. The subclass is responsible for providing pad template caps for source and sink pads. The pads need to be named \"sink\" and \"src\". It also needs to provide information about the ouptput caps, when they are known. This may be when the base class calls the subclass\' /@setFormat@/ function, though it might be during decoding, before calling /@gstVideoDecoderFinishFrame@/. This is done via /@gstVideoDecoderSetOutputState@/ The subclass is also responsible for providing (presentation) timestamps (likely based on corresponding input ones). If that is not applicable or possible, the base class provides limited framerate based interpolation. Similarly, the base class provides some limited (legacy) seeking support if specifically requested by the subclass, as full-fledged support should rather be left to upstream demuxer, parser or alike. This simple approach caters for seeking and duration reporting using estimated input bitrates. To enable it, a subclass should call /@gstVideoDecoderSetEstimateRate@/ to enable handling of incoming byte-streams. The base class provides some support for reverse playback, in particular in case incoming data is not packetized or upstream does not provide fragments on keyframe boundaries. However, the subclass should then be prepared for the parsing and frame processing stage to occur separately (in normal forward processing, the latter immediately follows the former), The subclass also needs to ensure the parsing stage properly marks keyframes, unless it knows the upstream elements will do so properly for incoming data. The bare minimum that a functional subclass needs to implement is: * Provide pad templates * Inform the base class of output caps via /@gstVideoDecoderSetOutputState@/ * Parse input data, if it is not considered packetized from upstream Data will be provided to /@parse@/ which should invoke /@gstVideoDecoderAddToFrame@/ and /@gstVideoDecoderHaveFrame@/ to separate the data belonging to each video frame. * Accept data in /@handleFrame@/ and provide decoded results to /@gstVideoDecoderFinishFrame@/, or call /@gstVideoDecoderDropFrame@/. -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GstVideo.Objects.VideoDecoder ( -- * Exported types VideoDecoder(..) , IsVideoDecoder , toVideoDecoder , noVideoDecoder , -- * Methods -- ** addToFrame #method:addToFrame# #if ENABLE_OVERLOADING VideoDecoderAddToFrameMethodInfo , #endif videoDecoderAddToFrame , -- ** allocateOutputBuffer #method:allocateOutputBuffer# #if ENABLE_OVERLOADING VideoDecoderAllocateOutputBufferMethodInfo, #endif videoDecoderAllocateOutputBuffer , -- ** allocateOutputFrame #method:allocateOutputFrame# #if ENABLE_OVERLOADING VideoDecoderAllocateOutputFrameMethodInfo, #endif videoDecoderAllocateOutputFrame , -- ** allocateOutputFrameWithParams #method:allocateOutputFrameWithParams# #if ENABLE_OVERLOADING VideoDecoderAllocateOutputFrameWithParamsMethodInfo, #endif videoDecoderAllocateOutputFrameWithParams, -- ** dropFrame #method:dropFrame# #if ENABLE_OVERLOADING VideoDecoderDropFrameMethodInfo , #endif videoDecoderDropFrame , -- ** finishFrame #method:finishFrame# #if ENABLE_OVERLOADING VideoDecoderFinishFrameMethodInfo , #endif videoDecoderFinishFrame , -- ** getAllocator #method:getAllocator# #if ENABLE_OVERLOADING VideoDecoderGetAllocatorMethodInfo , #endif videoDecoderGetAllocator , -- ** getBufferPool #method:getBufferPool# #if ENABLE_OVERLOADING VideoDecoderGetBufferPoolMethodInfo , #endif videoDecoderGetBufferPool , -- ** getEstimateRate #method:getEstimateRate# #if ENABLE_OVERLOADING VideoDecoderGetEstimateRateMethodInfo , #endif videoDecoderGetEstimateRate , -- ** getFrame #method:getFrame# #if ENABLE_OVERLOADING VideoDecoderGetFrameMethodInfo , #endif videoDecoderGetFrame , -- ** getFrames #method:getFrames# #if ENABLE_OVERLOADING VideoDecoderGetFramesMethodInfo , #endif videoDecoderGetFrames , -- ** getLatency #method:getLatency# #if ENABLE_OVERLOADING VideoDecoderGetLatencyMethodInfo , #endif videoDecoderGetLatency , -- ** getMaxDecodeTime #method:getMaxDecodeTime# #if ENABLE_OVERLOADING VideoDecoderGetMaxDecodeTimeMethodInfo , #endif videoDecoderGetMaxDecodeTime , -- ** getMaxErrors #method:getMaxErrors# #if ENABLE_OVERLOADING VideoDecoderGetMaxErrorsMethodInfo , #endif videoDecoderGetMaxErrors , -- ** getNeedsFormat #method:getNeedsFormat# #if ENABLE_OVERLOADING VideoDecoderGetNeedsFormatMethodInfo , #endif videoDecoderGetNeedsFormat , -- ** getOldestFrame #method:getOldestFrame# #if ENABLE_OVERLOADING VideoDecoderGetOldestFrameMethodInfo , #endif videoDecoderGetOldestFrame , -- ** getOutputState #method:getOutputState# #if ENABLE_OVERLOADING VideoDecoderGetOutputStateMethodInfo , #endif videoDecoderGetOutputState , -- ** getPacketized #method:getPacketized# #if ENABLE_OVERLOADING VideoDecoderGetPacketizedMethodInfo , #endif videoDecoderGetPacketized , -- ** getPendingFrameSize #method:getPendingFrameSize# #if ENABLE_OVERLOADING VideoDecoderGetPendingFrameSizeMethodInfo, #endif videoDecoderGetPendingFrameSize , -- ** getQosProportion #method:getQosProportion# #if ENABLE_OVERLOADING VideoDecoderGetQosProportionMethodInfo , #endif videoDecoderGetQosProportion , -- ** haveFrame #method:haveFrame# #if ENABLE_OVERLOADING VideoDecoderHaveFrameMethodInfo , #endif videoDecoderHaveFrame , -- ** mergeTags #method:mergeTags# #if ENABLE_OVERLOADING VideoDecoderMergeTagsMethodInfo , #endif videoDecoderMergeTags , -- ** negotiate #method:negotiate# #if ENABLE_OVERLOADING VideoDecoderNegotiateMethodInfo , #endif videoDecoderNegotiate , -- ** proxyGetcaps #method:proxyGetcaps# #if ENABLE_OVERLOADING VideoDecoderProxyGetcapsMethodInfo , #endif videoDecoderProxyGetcaps , -- ** releaseFrame #method:releaseFrame# #if ENABLE_OVERLOADING VideoDecoderReleaseFrameMethodInfo , #endif videoDecoderReleaseFrame , -- ** setEstimateRate #method:setEstimateRate# #if ENABLE_OVERLOADING VideoDecoderSetEstimateRateMethodInfo , #endif videoDecoderSetEstimateRate , -- ** setInterlacedOutputState #method:setInterlacedOutputState# #if ENABLE_OVERLOADING VideoDecoderSetInterlacedOutputStateMethodInfo, #endif videoDecoderSetInterlacedOutputState , -- ** setLatency #method:setLatency# #if ENABLE_OVERLOADING VideoDecoderSetLatencyMethodInfo , #endif videoDecoderSetLatency , -- ** setMaxErrors #method:setMaxErrors# #if ENABLE_OVERLOADING VideoDecoderSetMaxErrorsMethodInfo , #endif videoDecoderSetMaxErrors , -- ** setNeedsFormat #method:setNeedsFormat# #if ENABLE_OVERLOADING VideoDecoderSetNeedsFormatMethodInfo , #endif videoDecoderSetNeedsFormat , -- ** setOutputState #method:setOutputState# #if ENABLE_OVERLOADING VideoDecoderSetOutputStateMethodInfo , #endif videoDecoderSetOutputState , -- ** setPacketized #method:setPacketized# #if ENABLE_OVERLOADING VideoDecoderSetPacketizedMethodInfo , #endif videoDecoderSetPacketized , -- ** setUseDefaultPadAcceptcaps #method:setUseDefaultPadAcceptcaps# #if ENABLE_OVERLOADING VideoDecoderSetUseDefaultPadAcceptcapsMethodInfo, #endif videoDecoderSetUseDefaultPadAcceptcaps , ) 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.Allocator as Gst.Allocator import qualified GI.Gst.Objects.BufferPool as Gst.BufferPool import qualified GI.Gst.Objects.Element as Gst.Element import qualified GI.Gst.Objects.Object as Gst.Object import qualified GI.Gst.Structs.AllocationParams as Gst.AllocationParams import qualified GI.Gst.Structs.Buffer as Gst.Buffer import qualified GI.Gst.Structs.BufferPoolAcquireParams as Gst.BufferPoolAcquireParams import qualified GI.Gst.Structs.Caps as Gst.Caps import qualified GI.Gst.Structs.TagList as Gst.TagList import {-# SOURCE #-} qualified GI.GstVideo.Enums as GstVideo.Enums import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoCodecFrame as GstVideo.VideoCodecFrame import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoCodecState as GstVideo.VideoCodecState -- | Memory-managed wrapper type. newtype VideoDecoder = VideoDecoder (ManagedPtr VideoDecoder) foreign import ccall "gst_video_decoder_get_type" c_gst_video_decoder_get_type :: IO GType instance GObject VideoDecoder where gobjectType = c_gst_video_decoder_get_type -- | Type class for types which can be safely cast to `VideoDecoder`, for instance with `toVideoDecoder`. class (GObject o, O.IsDescendantOf VideoDecoder o) => IsVideoDecoder o instance (GObject o, O.IsDescendantOf VideoDecoder o) => IsVideoDecoder o instance O.HasParentTypes VideoDecoder type instance O.ParentTypes VideoDecoder = '[Gst.Element.Element, Gst.Object.Object, GObject.Object.Object] -- | Cast to `VideoDecoder`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`. toVideoDecoder :: (MonadIO m, IsVideoDecoder o) => o -> m VideoDecoder toVideoDecoder = liftIO . unsafeCastTo VideoDecoder -- | A convenience alias for `Nothing` :: `Maybe` `VideoDecoder`. noVideoDecoder :: Maybe VideoDecoder noVideoDecoder = Nothing #if ENABLE_OVERLOADING type family ResolveVideoDecoderMethod (t :: Symbol) (o :: *) :: * where ResolveVideoDecoderMethod "abortState" o = Gst.Element.ElementAbortStateMethodInfo ResolveVideoDecoderMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo ResolveVideoDecoderMethod "addPad" o = Gst.Element.ElementAddPadMethodInfo ResolveVideoDecoderMethod "addPropertyDeepNotifyWatch" o = Gst.Element.ElementAddPropertyDeepNotifyWatchMethodInfo ResolveVideoDecoderMethod "addPropertyNotifyWatch" o = Gst.Element.ElementAddPropertyNotifyWatchMethodInfo ResolveVideoDecoderMethod "addToFrame" o = VideoDecoderAddToFrameMethodInfo ResolveVideoDecoderMethod "allocateOutputBuffer" o = VideoDecoderAllocateOutputBufferMethodInfo ResolveVideoDecoderMethod "allocateOutputFrame" o = VideoDecoderAllocateOutputFrameMethodInfo ResolveVideoDecoderMethod "allocateOutputFrameWithParams" o = VideoDecoderAllocateOutputFrameWithParamsMethodInfo ResolveVideoDecoderMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveVideoDecoderMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveVideoDecoderMethod "callAsync" o = Gst.Element.ElementCallAsyncMethodInfo ResolveVideoDecoderMethod "changeState" o = Gst.Element.ElementChangeStateMethodInfo ResolveVideoDecoderMethod "continueState" o = Gst.Element.ElementContinueStateMethodInfo ResolveVideoDecoderMethod "createAllPads" o = Gst.Element.ElementCreateAllPadsMethodInfo ResolveVideoDecoderMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo ResolveVideoDecoderMethod "dropFrame" o = VideoDecoderDropFrameMethodInfo ResolveVideoDecoderMethod "finishFrame" o = VideoDecoderFinishFrameMethodInfo ResolveVideoDecoderMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolveVideoDecoderMethod "foreachPad" o = Gst.Element.ElementForeachPadMethodInfo ResolveVideoDecoderMethod "foreachSinkPad" o = Gst.Element.ElementForeachSinkPadMethodInfo ResolveVideoDecoderMethod "foreachSrcPad" o = Gst.Element.ElementForeachSrcPadMethodInfo ResolveVideoDecoderMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolveVideoDecoderMethod "getv" o = GObject.Object.ObjectGetvMethodInfo ResolveVideoDecoderMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo ResolveVideoDecoderMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo ResolveVideoDecoderMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo ResolveVideoDecoderMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo ResolveVideoDecoderMethod "haveFrame" o = VideoDecoderHaveFrameMethodInfo ResolveVideoDecoderMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolveVideoDecoderMethod "isLockedState" o = Gst.Element.ElementIsLockedStateMethodInfo ResolveVideoDecoderMethod "iteratePads" o = Gst.Element.ElementIteratePadsMethodInfo ResolveVideoDecoderMethod "iterateSinkPads" o = Gst.Element.ElementIterateSinkPadsMethodInfo ResolveVideoDecoderMethod "iterateSrcPads" o = Gst.Element.ElementIterateSrcPadsMethodInfo ResolveVideoDecoderMethod "link" o = Gst.Element.ElementLinkMethodInfo ResolveVideoDecoderMethod "linkFiltered" o = Gst.Element.ElementLinkFilteredMethodInfo ResolveVideoDecoderMethod "linkPads" o = Gst.Element.ElementLinkPadsMethodInfo ResolveVideoDecoderMethod "linkPadsFiltered" o = Gst.Element.ElementLinkPadsFilteredMethodInfo ResolveVideoDecoderMethod "linkPadsFull" o = Gst.Element.ElementLinkPadsFullMethodInfo ResolveVideoDecoderMethod "lostState" o = Gst.Element.ElementLostStateMethodInfo ResolveVideoDecoderMethod "mergeTags" o = VideoDecoderMergeTagsMethodInfo ResolveVideoDecoderMethod "messageFull" o = Gst.Element.ElementMessageFullMethodInfo ResolveVideoDecoderMethod "messageFullWithDetails" o = Gst.Element.ElementMessageFullWithDetailsMethodInfo ResolveVideoDecoderMethod "negotiate" o = VideoDecoderNegotiateMethodInfo ResolveVideoDecoderMethod "noMorePads" o = Gst.Element.ElementNoMorePadsMethodInfo ResolveVideoDecoderMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo ResolveVideoDecoderMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo ResolveVideoDecoderMethod "postMessage" o = Gst.Element.ElementPostMessageMethodInfo ResolveVideoDecoderMethod "provideClock" o = Gst.Element.ElementProvideClockMethodInfo ResolveVideoDecoderMethod "proxyGetcaps" o = VideoDecoderProxyGetcapsMethodInfo ResolveVideoDecoderMethod "query" o = Gst.Element.ElementQueryMethodInfo ResolveVideoDecoderMethod "queryConvert" o = Gst.Element.ElementQueryConvertMethodInfo ResolveVideoDecoderMethod "queryDuration" o = Gst.Element.ElementQueryDurationMethodInfo ResolveVideoDecoderMethod "queryPosition" o = Gst.Element.ElementQueryPositionMethodInfo ResolveVideoDecoderMethod "ref" o = Gst.Object.ObjectRefMethodInfo ResolveVideoDecoderMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo ResolveVideoDecoderMethod "releaseFrame" o = VideoDecoderReleaseFrameMethodInfo ResolveVideoDecoderMethod "releaseRequestPad" o = Gst.Element.ElementReleaseRequestPadMethodInfo ResolveVideoDecoderMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo ResolveVideoDecoderMethod "removePad" o = Gst.Element.ElementRemovePadMethodInfo ResolveVideoDecoderMethod "removePropertyNotifyWatch" o = Gst.Element.ElementRemovePropertyNotifyWatchMethodInfo ResolveVideoDecoderMethod "requestPad" o = Gst.Element.ElementRequestPadMethodInfo ResolveVideoDecoderMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo ResolveVideoDecoderMethod "seek" o = Gst.Element.ElementSeekMethodInfo ResolveVideoDecoderMethod "seekSimple" o = Gst.Element.ElementSeekSimpleMethodInfo ResolveVideoDecoderMethod "sendEvent" o = Gst.Element.ElementSendEventMethodInfo ResolveVideoDecoderMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolveVideoDecoderMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolveVideoDecoderMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo ResolveVideoDecoderMethod "syncStateWithParent" o = Gst.Element.ElementSyncStateWithParentMethodInfo ResolveVideoDecoderMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo ResolveVideoDecoderMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolveVideoDecoderMethod "unlink" o = Gst.Element.ElementUnlinkMethodInfo ResolveVideoDecoderMethod "unlinkPads" o = Gst.Element.ElementUnlinkPadsMethodInfo ResolveVideoDecoderMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo ResolveVideoDecoderMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo ResolveVideoDecoderMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolveVideoDecoderMethod "getAllocator" o = VideoDecoderGetAllocatorMethodInfo ResolveVideoDecoderMethod "getBaseTime" o = Gst.Element.ElementGetBaseTimeMethodInfo ResolveVideoDecoderMethod "getBufferPool" o = VideoDecoderGetBufferPoolMethodInfo ResolveVideoDecoderMethod "getBus" o = Gst.Element.ElementGetBusMethodInfo ResolveVideoDecoderMethod "getClock" o = Gst.Element.ElementGetClockMethodInfo ResolveVideoDecoderMethod "getCompatiblePad" o = Gst.Element.ElementGetCompatiblePadMethodInfo ResolveVideoDecoderMethod "getCompatiblePadTemplate" o = Gst.Element.ElementGetCompatiblePadTemplateMethodInfo ResolveVideoDecoderMethod "getContext" o = Gst.Element.ElementGetContextMethodInfo ResolveVideoDecoderMethod "getContextUnlocked" o = Gst.Element.ElementGetContextUnlockedMethodInfo ResolveVideoDecoderMethod "getContexts" o = Gst.Element.ElementGetContextsMethodInfo ResolveVideoDecoderMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo ResolveVideoDecoderMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo ResolveVideoDecoderMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolveVideoDecoderMethod "getEstimateRate" o = VideoDecoderGetEstimateRateMethodInfo ResolveVideoDecoderMethod "getFactory" o = Gst.Element.ElementGetFactoryMethodInfo ResolveVideoDecoderMethod "getFrame" o = VideoDecoderGetFrameMethodInfo ResolveVideoDecoderMethod "getFrames" o = VideoDecoderGetFramesMethodInfo ResolveVideoDecoderMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo ResolveVideoDecoderMethod "getLatency" o = VideoDecoderGetLatencyMethodInfo ResolveVideoDecoderMethod "getMaxDecodeTime" o = VideoDecoderGetMaxDecodeTimeMethodInfo ResolveVideoDecoderMethod "getMaxErrors" o = VideoDecoderGetMaxErrorsMethodInfo ResolveVideoDecoderMethod "getMetadata" o = Gst.Element.ElementGetMetadataMethodInfo ResolveVideoDecoderMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo ResolveVideoDecoderMethod "getNeedsFormat" o = VideoDecoderGetNeedsFormatMethodInfo ResolveVideoDecoderMethod "getOldestFrame" o = VideoDecoderGetOldestFrameMethodInfo ResolveVideoDecoderMethod "getOutputState" o = VideoDecoderGetOutputStateMethodInfo ResolveVideoDecoderMethod "getPacketized" o = VideoDecoderGetPacketizedMethodInfo ResolveVideoDecoderMethod "getPadTemplate" o = Gst.Element.ElementGetPadTemplateMethodInfo ResolveVideoDecoderMethod "getPadTemplateList" o = Gst.Element.ElementGetPadTemplateListMethodInfo ResolveVideoDecoderMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo ResolveVideoDecoderMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo ResolveVideoDecoderMethod "getPendingFrameSize" o = VideoDecoderGetPendingFrameSizeMethodInfo ResolveVideoDecoderMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolveVideoDecoderMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolveVideoDecoderMethod "getQosProportion" o = VideoDecoderGetQosProportionMethodInfo ResolveVideoDecoderMethod "getRequestPad" o = Gst.Element.ElementGetRequestPadMethodInfo ResolveVideoDecoderMethod "getStartTime" o = Gst.Element.ElementGetStartTimeMethodInfo ResolveVideoDecoderMethod "getState" o = Gst.Element.ElementGetStateMethodInfo ResolveVideoDecoderMethod "getStaticPad" o = Gst.Element.ElementGetStaticPadMethodInfo ResolveVideoDecoderMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo ResolveVideoDecoderMethod "setBaseTime" o = Gst.Element.ElementSetBaseTimeMethodInfo ResolveVideoDecoderMethod "setBus" o = Gst.Element.ElementSetBusMethodInfo ResolveVideoDecoderMethod "setClock" o = Gst.Element.ElementSetClockMethodInfo ResolveVideoDecoderMethod "setContext" o = Gst.Element.ElementSetContextMethodInfo ResolveVideoDecoderMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo ResolveVideoDecoderMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo ResolveVideoDecoderMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo ResolveVideoDecoderMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolveVideoDecoderMethod "setEstimateRate" o = VideoDecoderSetEstimateRateMethodInfo ResolveVideoDecoderMethod "setInterlacedOutputState" o = VideoDecoderSetInterlacedOutputStateMethodInfo ResolveVideoDecoderMethod "setLatency" o = VideoDecoderSetLatencyMethodInfo ResolveVideoDecoderMethod "setLockedState" o = Gst.Element.ElementSetLockedStateMethodInfo ResolveVideoDecoderMethod "setMaxErrors" o = VideoDecoderSetMaxErrorsMethodInfo ResolveVideoDecoderMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo ResolveVideoDecoderMethod "setNeedsFormat" o = VideoDecoderSetNeedsFormatMethodInfo ResolveVideoDecoderMethod "setOutputState" o = VideoDecoderSetOutputStateMethodInfo ResolveVideoDecoderMethod "setPacketized" o = VideoDecoderSetPacketizedMethodInfo ResolveVideoDecoderMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo ResolveVideoDecoderMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo ResolveVideoDecoderMethod "setStartTime" o = Gst.Element.ElementSetStartTimeMethodInfo ResolveVideoDecoderMethod "setState" o = Gst.Element.ElementSetStateMethodInfo ResolveVideoDecoderMethod "setUseDefaultPadAcceptcaps" o = VideoDecoderSetUseDefaultPadAcceptcapsMethodInfo ResolveVideoDecoderMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveVideoDecoderMethod t VideoDecoder, O.MethodInfo info VideoDecoder p) => OL.IsLabel t (VideoDecoder -> 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 #if ENABLE_OVERLOADING instance O.HasAttributeList VideoDecoder type instance O.AttributeList VideoDecoder = VideoDecoderAttributeList type VideoDecoderAttributeList = ('[ '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo)] :: [(Symbol, *)]) #endif #if ENABLE_OVERLOADING #endif #if ENABLE_OVERLOADING type instance O.SignalList VideoDecoder = VideoDecoderSignalList type VideoDecoderSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("noMorePads", Gst.Element.ElementNoMorePadsSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("padAdded", Gst.Element.ElementPadAddedSignalInfo), '("padRemoved", Gst.Element.ElementPadRemovedSignalInfo)] :: [(Symbol, *)]) #endif -- method VideoDecoder::add_to_frame -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_bytes", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of bytes to add", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_add_to_frame" gst_video_decoder_add_to_frame :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Int32 -> -- n_bytes : TBasicType TInt IO () {- | Removes next /@nBytes@/ of input data and adds it to currently parsed frame. -} videoDecoderAddToFrame :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Int32 {- ^ /@nBytes@/: the number of bytes to add -} -> m () videoDecoderAddToFrame decoder nBytes = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder gst_video_decoder_add_to_frame decoder' nBytes touchManagedPtr decoder return () #if ENABLE_OVERLOADING data VideoDecoderAddToFrameMethodInfo instance (signature ~ (Int32 -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderAddToFrameMethodInfo a signature where overloadedMethod _ = videoDecoderAddToFrame #endif -- method VideoDecoder::allocate_output_buffer -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "Buffer"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_allocate_output_buffer" gst_video_decoder_allocate_output_buffer :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO (Ptr Gst.Buffer.Buffer) {- | Helper function that allocates a buffer to hold a video frame for /@decoder@/\'s current 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState'. You should use 'GI.GstVideo.Objects.VideoDecoder.videoDecoderAllocateOutputFrame' instead of this function, if possible at all. -} videoDecoderAllocateOutputBuffer :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Gst.Buffer.Buffer {- ^ __Returns:__ allocated buffer, or NULL if no buffer could be allocated (e.g. when downstream is flushing or shutting down) -} videoDecoderAllocateOutputBuffer decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_allocate_output_buffer decoder' checkUnexpectedReturnNULL "videoDecoderAllocateOutputBuffer" result result' <- (wrapBoxed Gst.Buffer.Buffer) result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderAllocateOutputBufferMethodInfo instance (signature ~ (m Gst.Buffer.Buffer), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderAllocateOutputBufferMethodInfo a signature where overloadedMethod _ = videoDecoderAllocateOutputBuffer #endif -- method VideoDecoder::allocate_output_frame -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame", argType = TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoCodecFrame", 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_video_decoder_allocate_output_frame" gst_video_decoder_allocate_output_frame :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr GstVideo.VideoCodecFrame.VideoCodecFrame -> -- frame : TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}) IO CInt {- | Helper function that allocates a buffer to hold a video frame for /@decoder@/\'s current 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState'. Subclass should already have configured video state and set src pad caps. The buffer allocated here is owned by the frame and you should only keep references to the frame, not the buffer. -} videoDecoderAllocateOutputFrame :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> GstVideo.VideoCodecFrame.VideoCodecFrame {- ^ /@frame@/: a 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' -} -> m Gst.Enums.FlowReturn {- ^ __Returns:__ 'GI.Gst.Enums.FlowReturnOk' if an output buffer could be allocated -} videoDecoderAllocateOutputFrame decoder frame = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder frame' <- unsafeManagedPtrGetPtr frame result <- gst_video_decoder_allocate_output_frame decoder' frame' let result' = (toEnum . fromIntegral) result touchManagedPtr decoder touchManagedPtr frame return result' #if ENABLE_OVERLOADING data VideoDecoderAllocateOutputFrameMethodInfo instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m Gst.Enums.FlowReturn), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderAllocateOutputFrameMethodInfo a signature where overloadedMethod _ = videoDecoderAllocateOutputFrame #endif -- method VideoDecoder::allocate_output_frame_with_params -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame", argType = TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoCodecFrame", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "params", argType = TInterface (Name {namespace = "Gst", name = "BufferPoolAcquireParams"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstBufferPoolAcquireParams", 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_video_decoder_allocate_output_frame_with_params" gst_video_decoder_allocate_output_frame_with_params :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr GstVideo.VideoCodecFrame.VideoCodecFrame -> -- frame : TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}) Ptr Gst.BufferPoolAcquireParams.BufferPoolAcquireParams -> -- params : TInterface (Name {namespace = "Gst", name = "BufferPoolAcquireParams"}) IO CInt {- | Same as @/gst_video_decoder_allocate_output_frame/@ except it allows passing 'GI.Gst.Structs.BufferPoolAcquireParams.BufferPoolAcquireParams' to the sub call gst_buffer_pool_acquire_buffer. /Since: 1.12/ -} videoDecoderAllocateOutputFrameWithParams :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> GstVideo.VideoCodecFrame.VideoCodecFrame {- ^ /@frame@/: a 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' -} -> Gst.BufferPoolAcquireParams.BufferPoolAcquireParams {- ^ /@params@/: a 'GI.Gst.Structs.BufferPoolAcquireParams.BufferPoolAcquireParams' -} -> m Gst.Enums.FlowReturn {- ^ __Returns:__ 'GI.Gst.Enums.FlowReturnOk' if an output buffer could be allocated -} videoDecoderAllocateOutputFrameWithParams decoder frame params = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder frame' <- unsafeManagedPtrGetPtr frame params' <- unsafeManagedPtrGetPtr params result <- gst_video_decoder_allocate_output_frame_with_params decoder' frame' params' let result' = (toEnum . fromIntegral) result touchManagedPtr decoder touchManagedPtr frame touchManagedPtr params return result' #if ENABLE_OVERLOADING data VideoDecoderAllocateOutputFrameWithParamsMethodInfo instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> Gst.BufferPoolAcquireParams.BufferPoolAcquireParams -> m Gst.Enums.FlowReturn), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderAllocateOutputFrameWithParamsMethodInfo a signature where overloadedMethod _ = videoDecoderAllocateOutputFrameWithParams #endif -- method VideoDecoder::drop_frame -- method type : OrdinaryMethod -- Args : [Arg {argCName = "dec", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame", argType = TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GstVideoCodecFrame to drop", 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_video_decoder_drop_frame" gst_video_decoder_drop_frame :: Ptr VideoDecoder -> -- dec : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr GstVideo.VideoCodecFrame.VideoCodecFrame -> -- frame : TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}) IO CInt {- | Similar to 'GI.GstVideo.Objects.VideoDecoder.videoDecoderFinishFrame', but drops /@frame@/ in any case and posts a QoS message with the frame\'s details on the bus. In any case, the frame is considered finished and released. -} videoDecoderDropFrame :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@dec@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> GstVideo.VideoCodecFrame.VideoCodecFrame {- ^ /@frame@/: the 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' to drop -} -> m Gst.Enums.FlowReturn {- ^ __Returns:__ a 'GI.Gst.Enums.FlowReturn', usually GST_FLOW_OK. -} videoDecoderDropFrame dec frame = liftIO $ do dec' <- unsafeManagedPtrCastPtr dec frame' <- B.ManagedPtr.disownBoxed frame result <- gst_video_decoder_drop_frame dec' frame' let result' = (toEnum . fromIntegral) result touchManagedPtr dec touchManagedPtr frame return result' #if ENABLE_OVERLOADING data VideoDecoderDropFrameMethodInfo instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m Gst.Enums.FlowReturn), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderDropFrameMethodInfo a signature where overloadedMethod _ = videoDecoderDropFrame #endif -- method VideoDecoder::finish_frame -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame", argType = TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a decoded #GstVideoCodecFrame", 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_video_decoder_finish_frame" gst_video_decoder_finish_frame :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr GstVideo.VideoCodecFrame.VideoCodecFrame -> -- frame : TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}) IO CInt {- | /@frame@/ should have a valid decoded data buffer, whose metadata fields are then appropriately set according to frame data and pushed downstream. If no output data is provided, /@frame@/ is considered skipped. In any case, the frame is considered finished and released. After calling this function the output buffer of the frame is to be considered read-only. This function will also change the metadata of the buffer. -} videoDecoderFinishFrame :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> GstVideo.VideoCodecFrame.VideoCodecFrame {- ^ /@frame@/: a decoded 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' -} -> m Gst.Enums.FlowReturn {- ^ __Returns:__ a 'GI.Gst.Enums.FlowReturn' resulting from sending data downstream -} videoDecoderFinishFrame decoder frame = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder frame' <- B.ManagedPtr.disownBoxed frame result <- gst_video_decoder_finish_frame decoder' frame' let result' = (toEnum . fromIntegral) result touchManagedPtr decoder touchManagedPtr frame return result' #if ENABLE_OVERLOADING data VideoDecoderFinishFrameMethodInfo instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m Gst.Enums.FlowReturn), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderFinishFrameMethodInfo a signature where overloadedMethod _ = videoDecoderFinishFrame #endif -- method VideoDecoder::get_allocator -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "allocator", argType = TInterface (Name {namespace = "Gst", name = "Allocator"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GstAllocator\nused", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "params", argType = TInterface (Name {namespace = "Gst", name = "AllocationParams"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the\n#GstAllocationParams of @allocator", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferEverything}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_allocator" gst_video_decoder_get_allocator :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr (Ptr Gst.Allocator.Allocator) -> -- allocator : TInterface (Name {namespace = "Gst", name = "Allocator"}) Ptr Gst.AllocationParams.AllocationParams -> -- params : TInterface (Name {namespace = "Gst", name = "AllocationParams"}) IO () {- | Lets 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' sub-classes to know the memory /@allocator@/ used by the base class and its /@params@/. Unref the /@allocator@/ after use it. -} videoDecoderGetAllocator :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams)) videoDecoderGetAllocator decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder allocator <- allocMem :: IO (Ptr (Ptr Gst.Allocator.Allocator)) params <- callocBoxedBytes 64 :: IO (Ptr Gst.AllocationParams.AllocationParams) gst_video_decoder_get_allocator decoder' allocator params allocator' <- peek allocator allocator'' <- (wrapObject Gst.Allocator.Allocator) allocator' params' <- (wrapBoxed Gst.AllocationParams.AllocationParams) params touchManagedPtr decoder freeMem allocator return (allocator'', params') #if ENABLE_OVERLOADING data VideoDecoderGetAllocatorMethodInfo instance (signature ~ (m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetAllocatorMethodInfo a signature where overloadedMethod _ = videoDecoderGetAllocator #endif -- method VideoDecoder::get_buffer_pool -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "BufferPool"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_buffer_pool" gst_video_decoder_get_buffer_pool :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO (Ptr Gst.BufferPool.BufferPool) {- | /No description available in the introspection data./ -} videoDecoderGetBufferPool :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Gst.BufferPool.BufferPool {- ^ __Returns:__ the instance of the 'GI.Gst.Objects.BufferPool.BufferPool' used by the decoder; free it after use it -} videoDecoderGetBufferPool decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_get_buffer_pool decoder' checkUnexpectedReturnNULL "videoDecoderGetBufferPool" result result' <- (wrapObject Gst.BufferPool.BufferPool) result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderGetBufferPoolMethodInfo instance (signature ~ (m Gst.BufferPool.BufferPool), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetBufferPoolMethodInfo a signature where overloadedMethod _ = videoDecoderGetBufferPool #endif -- method VideoDecoder::get_estimate_rate -- method type : OrdinaryMethod -- Args : [Arg {argCName = "dec", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_estimate_rate" gst_video_decoder_get_estimate_rate :: Ptr VideoDecoder -> -- dec : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO Int32 {- | /No description available in the introspection data./ -} videoDecoderGetEstimateRate :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@dec@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Int32 {- ^ __Returns:__ currently configured byte to time conversion setting -} videoDecoderGetEstimateRate dec = liftIO $ do dec' <- unsafeManagedPtrCastPtr dec result <- gst_video_decoder_get_estimate_rate dec' touchManagedPtr dec return result #if ENABLE_OVERLOADING data VideoDecoderGetEstimateRateMethodInfo instance (signature ~ (m Int32), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetEstimateRateMethodInfo a signature where overloadedMethod _ = videoDecoderGetEstimateRate #endif -- method VideoDecoder::get_frame -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame_number", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "system_frame_number of a frame", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_frame" gst_video_decoder_get_frame :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Int32 -> -- frame_number : TBasicType TInt IO (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame) {- | Get a pending unfinished 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' -} videoDecoderGetFrame :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Int32 {- ^ /@frameNumber@/: system_frame_number of a frame -} -> m GstVideo.VideoCodecFrame.VideoCodecFrame {- ^ __Returns:__ pending unfinished 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' identified by /@frameNumber@/. -} videoDecoderGetFrame decoder frameNumber = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_get_frame decoder' frameNumber checkUnexpectedReturnNULL "videoDecoderGetFrame" result result' <- (wrapBoxed GstVideo.VideoCodecFrame.VideoCodecFrame) result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderGetFrameMethodInfo instance (signature ~ (Int32 -> m GstVideo.VideoCodecFrame.VideoCodecFrame), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetFrameMethodInfo a signature where overloadedMethod _ = videoDecoderGetFrame #endif -- method VideoDecoder::get_frames -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGList (TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}))) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_frames" gst_video_decoder_get_frames :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO (Ptr (GList (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame))) {- | Get all pending unfinished 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' -} videoDecoderGetFrames :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m [GstVideo.VideoCodecFrame.VideoCodecFrame] {- ^ __Returns:__ pending unfinished 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame'. -} videoDecoderGetFrames decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_get_frames decoder' result' <- unpackGList result result'' <- mapM (wrapBoxed GstVideo.VideoCodecFrame.VideoCodecFrame) result' g_list_free result touchManagedPtr decoder return result'' #if ENABLE_OVERLOADING data VideoDecoderGetFramesMethodInfo instance (signature ~ (m [GstVideo.VideoCodecFrame.VideoCodecFrame]), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetFramesMethodInfo a signature where overloadedMethod _ = videoDecoderGetFrames #endif -- method VideoDecoder::get_latency -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "min_latency", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "address of variable in which to store the\n configured minimum latency, or %NULL", 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 "address of variable in which to store the\n configured mximum latency, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_latency" gst_video_decoder_get_latency :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr Word64 -> -- min_latency : TBasicType TUInt64 Ptr Word64 -> -- max_latency : TBasicType TUInt64 IO () {- | Query the configured decoder latency. Results will be returned via /@minLatency@/ and /@maxLatency@/. -} videoDecoderGetLatency :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m ((Word64, Word64)) videoDecoderGetLatency decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder minLatency <- allocMem :: IO (Ptr Word64) maxLatency <- allocMem :: IO (Ptr Word64) gst_video_decoder_get_latency decoder' minLatency maxLatency minLatency' <- peek minLatency maxLatency' <- peek maxLatency touchManagedPtr decoder freeMem minLatency freeMem maxLatency return (minLatency', maxLatency') #if ENABLE_OVERLOADING data VideoDecoderGetLatencyMethodInfo instance (signature ~ (m ((Word64, Word64))), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetLatencyMethodInfo a signature where overloadedMethod _ = videoDecoderGetLatency #endif -- method VideoDecoder::get_max_decode_time -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame", argType = TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoCodecFrame", 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_video_decoder_get_max_decode_time" gst_video_decoder_get_max_decode_time :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr GstVideo.VideoCodecFrame.VideoCodecFrame -> -- frame : TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}) IO Int64 {- | Determines maximum possible decoding time for /@frame@/ that will allow it to decode and arrive in time (as determined by QoS events). In particular, a negative result means decoding in time is no longer possible and should therefore occur as soon\/skippy as possible. -} videoDecoderGetMaxDecodeTime :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> GstVideo.VideoCodecFrame.VideoCodecFrame {- ^ /@frame@/: a 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' -} -> m Int64 {- ^ __Returns:__ max decoding time. -} videoDecoderGetMaxDecodeTime decoder frame = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder frame' <- unsafeManagedPtrGetPtr frame result <- gst_video_decoder_get_max_decode_time decoder' frame' touchManagedPtr decoder touchManagedPtr frame return result #if ENABLE_OVERLOADING data VideoDecoderGetMaxDecodeTimeMethodInfo instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m Int64), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetMaxDecodeTimeMethodInfo a signature where overloadedMethod _ = videoDecoderGetMaxDecodeTime #endif -- method VideoDecoder::get_max_errors -- method type : OrdinaryMethod -- Args : [Arg {argCName = "dec", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_max_errors" gst_video_decoder_get_max_errors :: Ptr VideoDecoder -> -- dec : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO Int32 {- | /No description available in the introspection data./ -} videoDecoderGetMaxErrors :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@dec@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Int32 {- ^ __Returns:__ currently configured decoder tolerated error count. -} videoDecoderGetMaxErrors dec = liftIO $ do dec' <- unsafeManagedPtrCastPtr dec result <- gst_video_decoder_get_max_errors dec' touchManagedPtr dec return result #if ENABLE_OVERLOADING data VideoDecoderGetMaxErrorsMethodInfo instance (signature ~ (m Int32), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetMaxErrorsMethodInfo a signature where overloadedMethod _ = videoDecoderGetMaxErrors #endif -- method VideoDecoder::get_needs_format -- method type : OrdinaryMethod -- Args : [Arg {argCName = "dec", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", 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_video_decoder_get_needs_format" gst_video_decoder_get_needs_format :: Ptr VideoDecoder -> -- dec : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO CInt {- | Queries decoder required format handling. /Since: 1.4/ -} videoDecoderGetNeedsFormat :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@dec@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Bool {- ^ __Returns:__ 'True' if required format handling is enabled. -} videoDecoderGetNeedsFormat dec = liftIO $ do dec' <- unsafeManagedPtrCastPtr dec result <- gst_video_decoder_get_needs_format dec' let result' = (/= 0) result touchManagedPtr dec return result' #if ENABLE_OVERLOADING data VideoDecoderGetNeedsFormatMethodInfo instance (signature ~ (m Bool), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetNeedsFormatMethodInfo a signature where overloadedMethod _ = videoDecoderGetNeedsFormat #endif -- method VideoDecoder::get_oldest_frame -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_oldest_frame" gst_video_decoder_get_oldest_frame :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame) {- | Get the oldest pending unfinished 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' -} videoDecoderGetOldestFrame :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m GstVideo.VideoCodecFrame.VideoCodecFrame {- ^ __Returns:__ oldest pending unfinished 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame'. -} videoDecoderGetOldestFrame decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_get_oldest_frame decoder' checkUnexpectedReturnNULL "videoDecoderGetOldestFrame" result result' <- (wrapBoxed GstVideo.VideoCodecFrame.VideoCodecFrame) result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderGetOldestFrameMethodInfo instance (signature ~ (m GstVideo.VideoCodecFrame.VideoCodecFrame), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetOldestFrameMethodInfo a signature where overloadedMethod _ = videoDecoderGetOldestFrame #endif -- method VideoDecoder::get_output_state -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoCodecState"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_output_state" gst_video_decoder_get_output_state :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO (Ptr GstVideo.VideoCodecState.VideoCodecState) {- | Get the 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState' currently describing the output stream. -} videoDecoderGetOutputState :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m GstVideo.VideoCodecState.VideoCodecState {- ^ __Returns:__ 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState' describing format of video data. -} videoDecoderGetOutputState decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_get_output_state decoder' checkUnexpectedReturnNULL "videoDecoderGetOutputState" result result' <- (wrapBoxed GstVideo.VideoCodecState.VideoCodecState) result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderGetOutputStateMethodInfo instance (signature ~ (m GstVideo.VideoCodecState.VideoCodecState), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetOutputStateMethodInfo a signature where overloadedMethod _ = videoDecoderGetOutputState #endif -- method VideoDecoder::get_packetized -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", 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_video_decoder_get_packetized" gst_video_decoder_get_packetized :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO CInt {- | Queries whether input data is considered packetized or not by the base class. -} videoDecoderGetPacketized :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Bool {- ^ __Returns:__ TRUE if input data is considered packetized. -} videoDecoderGetPacketized decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_get_packetized decoder' let result' = (/= 0) result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderGetPacketizedMethodInfo instance (signature ~ (m Bool), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetPacketizedMethodInfo a signature where overloadedMethod _ = videoDecoderGetPacketized #endif -- method VideoDecoder::get_pending_frame_size -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", 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_video_decoder_get_pending_frame_size" gst_video_decoder_get_pending_frame_size :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO Word64 {- | Returns the number of bytes previously added to the current frame by calling 'GI.GstVideo.Objects.VideoDecoder.videoDecoderAddToFrame'. /Since: 1.4/ -} videoDecoderGetPendingFrameSize :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Word64 {- ^ __Returns:__ The number of bytes pending for the current frame -} videoDecoderGetPendingFrameSize decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_get_pending_frame_size decoder' touchManagedPtr decoder return result #if ENABLE_OVERLOADING data VideoDecoderGetPendingFrameSizeMethodInfo instance (signature ~ (m Word64), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetPendingFrameSizeMethodInfo a signature where overloadedMethod _ = videoDecoderGetPendingFrameSize #endif -- method VideoDecoder::get_qos_proportion -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder\n current QoS proportion, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TDouble) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_get_qos_proportion" gst_video_decoder_get_qos_proportion :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO CDouble {- | /No description available in the introspection data./ /Since: 1.0.3/ -} videoDecoderGetQosProportion :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' current QoS proportion, or 'Nothing' -} -> m Double {- ^ __Returns:__ The current QoS proportion. -} videoDecoderGetQosProportion decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_get_qos_proportion decoder' let result' = realToFrac result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderGetQosProportionMethodInfo instance (signature ~ (m Double), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetQosProportionMethodInfo a signature where overloadedMethod _ = videoDecoderGetQosProportion #endif -- method VideoDecoder::have_frame -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", 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_video_decoder_have_frame" gst_video_decoder_have_frame :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO CInt {- | Gathers all data collected for currently parsed frame, gathers corresponding metadata and passes it along for further processing, i.e. /@handleFrame@/. -} videoDecoderHaveFrame :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Gst.Enums.FlowReturn {- ^ __Returns:__ a 'GI.Gst.Enums.FlowReturn' -} videoDecoderHaveFrame decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_have_frame decoder' let result' = (toEnum . fromIntegral) result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderHaveFrameMethodInfo instance (signature ~ (m Gst.Enums.FlowReturn), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderHaveFrameMethodInfo a signature where overloadedMethod _ = videoDecoderHaveFrame #endif -- method VideoDecoder::merge_tags -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tags", argType = TInterface (Name {namespace = "Gst", name = "TagList"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #GstTagList to merge, or NULL to unset\n previously-set tags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TInterface (Name {namespace = "Gst", name = "TagMergeMode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_merge_tags" gst_video_decoder_merge_tags :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr Gst.TagList.TagList -> -- tags : TInterface (Name {namespace = "Gst", name = "TagList"}) CUInt -> -- mode : TInterface (Name {namespace = "Gst", name = "TagMergeMode"}) IO () {- | Sets the audio decoder tags and how they should be merged with any upstream stream tags. This will override any tags previously-set with @/gst_audio_decoder_merge_tags()/@. Note that this is provided for convenience, and the subclass is not required to use this and can still do tag handling on its own. MT safe. -} videoDecoderMergeTags :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Maybe (Gst.TagList.TagList) {- ^ /@tags@/: a 'GI.Gst.Structs.TagList.TagList' to merge, or NULL to unset previously-set tags -} -> Gst.Enums.TagMergeMode {- ^ /@mode@/: the 'GI.Gst.Enums.TagMergeMode' to use, usually @/GST_TAG_MERGE_REPLACE/@ -} -> m () videoDecoderMergeTags decoder tags mode = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder maybeTags <- case tags of Nothing -> return nullPtr Just jTags -> do jTags' <- unsafeManagedPtrGetPtr jTags return jTags' let mode' = (fromIntegral . fromEnum) mode gst_video_decoder_merge_tags decoder' maybeTags mode' touchManagedPtr decoder whenJust tags touchManagedPtr return () #if ENABLE_OVERLOADING data VideoDecoderMergeTagsMethodInfo instance (signature ~ (Maybe (Gst.TagList.TagList) -> Gst.Enums.TagMergeMode -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderMergeTagsMethodInfo a signature where overloadedMethod _ = videoDecoderMergeTags #endif -- method VideoDecoder::negotiate -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", 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_video_decoder_negotiate" gst_video_decoder_negotiate :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) IO CInt {- | Negotiate with downstream elements to currently configured 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState'. Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if negotiate fails. -} videoDecoderNegotiate :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> m Bool {- ^ __Returns:__ 'True' if the negotiation succeeded, else 'False'. -} videoDecoderNegotiate decoder = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder result <- gst_video_decoder_negotiate decoder' let result' = (/= 0) result touchManagedPtr decoder return result' #if ENABLE_OVERLOADING data VideoDecoderNegotiateMethodInfo instance (signature ~ (m Bool), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderNegotiateMethodInfo a signature where overloadedMethod _ = videoDecoderNegotiate #endif -- method VideoDecoder::proxy_getcaps -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "caps", argType = TInterface (Name {namespace = "Gst", name = "Caps"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "initial caps", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "filter", argType = TInterface (Name {namespace = "Gst", name = "Caps"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "filter caps", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "Caps"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_proxy_getcaps" gst_video_decoder_proxy_getcaps :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr Gst.Caps.Caps -> -- caps : TInterface (Name {namespace = "Gst", name = "Caps"}) Ptr Gst.Caps.Caps -> -- filter : TInterface (Name {namespace = "Gst", name = "Caps"}) IO (Ptr Gst.Caps.Caps) {- | Returns caps that express /@caps@/ (or sink template caps if /@caps@/ == NULL) restricted to resolution\/format\/... combinations supported by downstream elements. /Since: 1.6/ -} videoDecoderProxyGetcaps :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Maybe (Gst.Caps.Caps) {- ^ /@caps@/: initial caps -} -> Maybe (Gst.Caps.Caps) {- ^ /@filter@/: filter caps -} -> m Gst.Caps.Caps {- ^ __Returns:__ a 'GI.Gst.Structs.Caps.Caps' owned by caller -} videoDecoderProxyGetcaps decoder caps filter = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder maybeCaps <- case caps of Nothing -> return nullPtr Just jCaps -> do jCaps' <- unsafeManagedPtrGetPtr jCaps return jCaps' maybeFilter <- case filter of Nothing -> return nullPtr Just jFilter -> do jFilter' <- unsafeManagedPtrGetPtr jFilter return jFilter' result <- gst_video_decoder_proxy_getcaps decoder' maybeCaps maybeFilter checkUnexpectedReturnNULL "videoDecoderProxyGetcaps" result result' <- (wrapBoxed Gst.Caps.Caps) result touchManagedPtr decoder whenJust caps touchManagedPtr whenJust filter touchManagedPtr return result' #if ENABLE_OVERLOADING data VideoDecoderProxyGetcapsMethodInfo instance (signature ~ (Maybe (Gst.Caps.Caps) -> Maybe (Gst.Caps.Caps) -> m Gst.Caps.Caps), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderProxyGetcapsMethodInfo a signature where overloadedMethod _ = videoDecoderProxyGetcaps #endif -- method VideoDecoder::release_frame -- method type : OrdinaryMethod -- Args : [Arg {argCName = "dec", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame", argType = TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GstVideoCodecFrame to release", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_release_frame" gst_video_decoder_release_frame :: Ptr VideoDecoder -> -- dec : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Ptr GstVideo.VideoCodecFrame.VideoCodecFrame -> -- frame : TInterface (Name {namespace = "GstVideo", name = "VideoCodecFrame"}) IO () {- | Similar to 'GI.GstVideo.Objects.VideoDecoder.videoDecoderDropFrame', but simply releases /@frame@/ without any processing other than removing it from list of pending frames, after which it is considered finished and released. /Since: 1.2.2/ -} videoDecoderReleaseFrame :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@dec@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> GstVideo.VideoCodecFrame.VideoCodecFrame {- ^ /@frame@/: the 'GI.GstVideo.Structs.VideoCodecFrame.VideoCodecFrame' to release -} -> m () videoDecoderReleaseFrame dec frame = liftIO $ do dec' <- unsafeManagedPtrCastPtr dec frame' <- B.ManagedPtr.disownBoxed frame gst_video_decoder_release_frame dec' frame' touchManagedPtr dec touchManagedPtr frame return () #if ENABLE_OVERLOADING data VideoDecoderReleaseFrameMethodInfo instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderReleaseFrameMethodInfo a signature where overloadedMethod _ = videoDecoderReleaseFrame #endif -- method VideoDecoder::set_estimate_rate -- method type : OrdinaryMethod -- Args : [Arg {argCName = "dec", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", 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 "whether to enable byte to time conversion", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_set_estimate_rate" gst_video_decoder_set_estimate_rate :: Ptr VideoDecoder -> -- dec : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) CInt -> -- enabled : TBasicType TBoolean IO () {- | Allows baseclass to perform byte to time estimated conversion. -} videoDecoderSetEstimateRate :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@dec@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Bool {- ^ /@enabled@/: whether to enable byte to time conversion -} -> m () videoDecoderSetEstimateRate dec enabled = liftIO $ do dec' <- unsafeManagedPtrCastPtr dec let enabled' = (fromIntegral . fromEnum) enabled gst_video_decoder_set_estimate_rate dec' enabled' touchManagedPtr dec return () #if ENABLE_OVERLOADING data VideoDecoderSetEstimateRateMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetEstimateRateMethodInfo a signature where overloadedMethod _ = videoDecoderSetEstimateRate #endif -- method VideoDecoder::set_interlaced_output_state -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fmt", argType = TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoFormat", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "mode", argType = TInterface (Name {namespace = "GstVideo", name = "VideoInterlaceMode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GstVideoInterlaceMode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The width in pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The height in pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "reference", argType = TInterface (Name {namespace = "GstVideo", name = "VideoCodecState"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "An optional reference #GstVideoCodecState", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoCodecState"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_set_interlaced_output_state" gst_video_decoder_set_interlaced_output_state :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) CUInt -> -- fmt : TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}) CUInt -> -- mode : TInterface (Name {namespace = "GstVideo", name = "VideoInterlaceMode"}) Word32 -> -- width : TBasicType TUInt Word32 -> -- height : TBasicType TUInt Ptr GstVideo.VideoCodecState.VideoCodecState -> -- reference : TInterface (Name {namespace = "GstVideo", name = "VideoCodecState"}) IO (Ptr GstVideo.VideoCodecState.VideoCodecState) {- | Same as @/gst_video_decoder_set_output_state/@() but also allows you to also set the interlacing mode. /Since: 1.16./ -} videoDecoderSetInterlacedOutputState :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> GstVideo.Enums.VideoFormat {- ^ /@fmt@/: a 'GI.GstVideo.Enums.VideoFormat' -} -> GstVideo.Enums.VideoInterlaceMode {- ^ /@mode@/: A 'GI.GstVideo.Enums.VideoInterlaceMode' -} -> Word32 {- ^ /@width@/: The width in pixels -} -> Word32 {- ^ /@height@/: The height in pixels -} -> Maybe (GstVideo.VideoCodecState.VideoCodecState) {- ^ /@reference@/: An optional reference 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState' -} -> m GstVideo.VideoCodecState.VideoCodecState {- ^ __Returns:__ the newly configured output state. -} videoDecoderSetInterlacedOutputState decoder fmt mode width height reference = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder let fmt' = (fromIntegral . fromEnum) fmt let mode' = (fromIntegral . fromEnum) mode maybeReference <- case reference of Nothing -> return nullPtr Just jReference -> do jReference' <- unsafeManagedPtrGetPtr jReference return jReference' result <- gst_video_decoder_set_interlaced_output_state decoder' fmt' mode' width height maybeReference checkUnexpectedReturnNULL "videoDecoderSetInterlacedOutputState" result result' <- (wrapBoxed GstVideo.VideoCodecState.VideoCodecState) result touchManagedPtr decoder whenJust reference touchManagedPtr return result' #if ENABLE_OVERLOADING data VideoDecoderSetInterlacedOutputStateMethodInfo instance (signature ~ (GstVideo.Enums.VideoFormat -> GstVideo.Enums.VideoInterlaceMode -> Word32 -> Word32 -> Maybe (GstVideo.VideoCodecState.VideoCodecState) -> m GstVideo.VideoCodecState.VideoCodecState), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetInterlacedOutputStateMethodInfo a signature where overloadedMethod _ = videoDecoderSetInterlacedOutputState #endif -- method VideoDecoder::set_latency -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "min_latency", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "minimum latency", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "max_latency", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "maximum latency", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_set_latency" gst_video_decoder_set_latency :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Word64 -> -- min_latency : TBasicType TUInt64 Word64 -> -- max_latency : TBasicType TUInt64 IO () {- | Lets 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' sub-classes tell the baseclass what the decoder latency is. Will also post a LATENCY message on the bus so the pipeline can reconfigure its global latency. -} videoDecoderSetLatency :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Word64 {- ^ /@minLatency@/: minimum latency -} -> Word64 {- ^ /@maxLatency@/: maximum latency -} -> m () videoDecoderSetLatency decoder minLatency maxLatency = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder gst_video_decoder_set_latency decoder' minLatency maxLatency touchManagedPtr decoder return () #if ENABLE_OVERLOADING data VideoDecoderSetLatencyMethodInfo instance (signature ~ (Word64 -> Word64 -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetLatencyMethodInfo a signature where overloadedMethod _ = videoDecoderSetLatency #endif -- method VideoDecoder::set_max_errors -- method type : OrdinaryMethod -- Args : [Arg {argCName = "dec", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "max tolerated errors", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_set_max_errors" gst_video_decoder_set_max_errors :: Ptr VideoDecoder -> -- dec : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) Int32 -> -- num : TBasicType TInt IO () {- | Sets numbers of tolerated decoder errors, where a tolerated one is then only warned about, but more than tolerated will lead to fatal error. You can set -1 for never returning fatal errors. Default is set to GST_VIDEO_DECODER_MAX_ERRORS. The \'-1\' option was added in 1.4 -} videoDecoderSetMaxErrors :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@dec@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Int32 {- ^ /@num@/: max tolerated errors -} -> m () videoDecoderSetMaxErrors dec num = liftIO $ do dec' <- unsafeManagedPtrCastPtr dec gst_video_decoder_set_max_errors dec' num touchManagedPtr dec return () #if ENABLE_OVERLOADING data VideoDecoderSetMaxErrorsMethodInfo instance (signature ~ (Int32 -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetMaxErrorsMethodInfo a signature where overloadedMethod _ = videoDecoderSetMaxErrors #endif -- method VideoDecoder::set_needs_format -- method type : OrdinaryMethod -- Args : [Arg {argCName = "dec", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "new state", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_set_needs_format" gst_video_decoder_set_needs_format :: Ptr VideoDecoder -> -- dec : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) CInt -> -- enabled : TBasicType TBoolean IO () {- | Configures decoder format needs. If enabled, subclass needs to be negotiated with format caps before it can process any data. It will then never be handed any data before it has been configured. Otherwise, it might be handed data without having been configured and is then expected being able to do so either by default or based on the input data. /Since: 1.4/ -} videoDecoderSetNeedsFormat :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@dec@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Bool {- ^ /@enabled@/: new state -} -> m () videoDecoderSetNeedsFormat dec enabled = liftIO $ do dec' <- unsafeManagedPtrCastPtr dec let enabled' = (fromIntegral . fromEnum) enabled gst_video_decoder_set_needs_format dec' enabled' touchManagedPtr dec return () #if ENABLE_OVERLOADING data VideoDecoderSetNeedsFormatMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetNeedsFormatMethodInfo a signature where overloadedMethod _ = videoDecoderSetNeedsFormat #endif -- method VideoDecoder::set_output_state -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fmt", argType = TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoFormat", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The width in pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The height in pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "reference", argType = TInterface (Name {namespace = "GstVideo", name = "VideoCodecState"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "An optional reference #GstVideoCodecState", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoCodecState"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_set_output_state" gst_video_decoder_set_output_state :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) CUInt -> -- fmt : TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}) Word32 -> -- width : TBasicType TUInt Word32 -> -- height : TBasicType TUInt Ptr GstVideo.VideoCodecState.VideoCodecState -> -- reference : TInterface (Name {namespace = "GstVideo", name = "VideoCodecState"}) IO (Ptr GstVideo.VideoCodecState.VideoCodecState) {- | Creates a new 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState' with the specified /@fmt@/, /@width@/ and /@height@/ as the output state for the decoder. Any previously set output state on /@decoder@/ will be replaced by the newly created one. If the subclass wishes to copy over existing fields (like pixel aspec ratio, or framerate) from an existing 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState', it can be provided as a /@reference@/. If the subclass wishes to override some fields from the output state (like pixel-aspect-ratio or framerate) it can do so on the returned 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState'. The new output state will only take effect (set on pads and buffers) starting from the next call to @/gst_video_decoder_finish_frame/@(). -} videoDecoderSetOutputState :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> GstVideo.Enums.VideoFormat {- ^ /@fmt@/: a 'GI.GstVideo.Enums.VideoFormat' -} -> Word32 {- ^ /@width@/: The width in pixels -} -> Word32 {- ^ /@height@/: The height in pixels -} -> Maybe (GstVideo.VideoCodecState.VideoCodecState) {- ^ /@reference@/: An optional reference 'GI.GstVideo.Structs.VideoCodecState.VideoCodecState' -} -> m GstVideo.VideoCodecState.VideoCodecState {- ^ __Returns:__ the newly configured output state. -} videoDecoderSetOutputState decoder fmt width height reference = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder let fmt' = (fromIntegral . fromEnum) fmt maybeReference <- case reference of Nothing -> return nullPtr Just jReference -> do jReference' <- unsafeManagedPtrGetPtr jReference return jReference' result <- gst_video_decoder_set_output_state decoder' fmt' width height maybeReference checkUnexpectedReturnNULL "videoDecoderSetOutputState" result result' <- (wrapBoxed GstVideo.VideoCodecState.VideoCodecState) result touchManagedPtr decoder whenJust reference touchManagedPtr return result' #if ENABLE_OVERLOADING data VideoDecoderSetOutputStateMethodInfo instance (signature ~ (GstVideo.Enums.VideoFormat -> Word32 -> Word32 -> Maybe (GstVideo.VideoCodecState.VideoCodecState) -> m GstVideo.VideoCodecState.VideoCodecState), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetOutputStateMethodInfo a signature where overloadedMethod _ = videoDecoderSetOutputState #endif -- method VideoDecoder::set_packetized -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "packetized", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether the input data should be considered as packetized.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_set_packetized" gst_video_decoder_set_packetized :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) CInt -> -- packetized : TBasicType TBoolean IO () {- | Allows baseclass to consider input data as packetized or not. If the input is packetized, then the /@parse@/ method will not be called. -} videoDecoderSetPacketized :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Bool {- ^ /@packetized@/: whether the input data should be considered as packetized. -} -> m () videoDecoderSetPacketized decoder packetized = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder let packetized' = (fromIntegral . fromEnum) packetized gst_video_decoder_set_packetized decoder' packetized' touchManagedPtr decoder return () #if ENABLE_OVERLOADING data VideoDecoderSetPacketizedMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetPacketizedMethodInfo a signature where overloadedMethod _ = videoDecoderSetPacketized #endif -- method VideoDecoder::set_use_default_pad_acceptcaps -- method type : OrdinaryMethod -- Args : [Arg {argCName = "decoder", argType = TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoDecoder", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "use", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if the default pad accept-caps query handling should be used", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_decoder_set_use_default_pad_acceptcaps" gst_video_decoder_set_use_default_pad_acceptcaps :: Ptr VideoDecoder -> -- decoder : TInterface (Name {namespace = "GstVideo", name = "VideoDecoder"}) CInt -> -- use : TBasicType TBoolean IO () {- | Lets 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' sub-classes decide if they want the sink pad to use the default pad query handler to reply to accept-caps queries. By setting this to true it is possible to further customize the default handler with @/GST_PAD_SET_ACCEPT_INTERSECT/@ and @/GST_PAD_SET_ACCEPT_TEMPLATE/@ /Since: 1.6/ -} videoDecoderSetUseDefaultPadAcceptcaps :: (B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) => a {- ^ /@decoder@/: a 'GI.GstVideo.Objects.VideoDecoder.VideoDecoder' -} -> Bool {- ^ /@use@/: if the default pad accept-caps query handling should be used -} -> m () videoDecoderSetUseDefaultPadAcceptcaps decoder use = liftIO $ do decoder' <- unsafeManagedPtrCastPtr decoder let use' = (fromIntegral . fromEnum) use gst_video_decoder_set_use_default_pad_acceptcaps decoder' use' touchManagedPtr decoder return () #if ENABLE_OVERLOADING data VideoDecoderSetUseDefaultPadAcceptcapsMethodInfo instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetUseDefaultPadAcceptcapsMethodInfo a signature where overloadedMethod _ = videoDecoderSetUseDefaultPadAcceptcaps #endif