{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstVideo.Objects.VideoDecoder
(
VideoDecoder(..) ,
IsVideoDecoder ,
toVideoDecoder ,
noVideoDecoder ,
#if defined(ENABLE_OVERLOADING)
ResolveVideoDecoderMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
VideoDecoderAddToFrameMethodInfo ,
#endif
videoDecoderAddToFrame ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderAllocateOutputBufferMethodInfo,
#endif
videoDecoderAllocateOutputBuffer ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderAllocateOutputFrameMethodInfo,
#endif
videoDecoderAllocateOutputFrame ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderAllocateOutputFrameWithParamsMethodInfo,
#endif
videoDecoderAllocateOutputFrameWithParams,
#if defined(ENABLE_OVERLOADING)
VideoDecoderDropFrameMethodInfo ,
#endif
videoDecoderDropFrame ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderFinishFrameMethodInfo ,
#endif
videoDecoderFinishFrame ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetAllocatorMethodInfo ,
#endif
videoDecoderGetAllocator ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetBufferPoolMethodInfo ,
#endif
videoDecoderGetBufferPool ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetEstimateRateMethodInfo ,
#endif
videoDecoderGetEstimateRate ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetFrameMethodInfo ,
#endif
videoDecoderGetFrame ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetFramesMethodInfo ,
#endif
videoDecoderGetFrames ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetLatencyMethodInfo ,
#endif
videoDecoderGetLatency ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetMaxDecodeTimeMethodInfo ,
#endif
videoDecoderGetMaxDecodeTime ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetMaxErrorsMethodInfo ,
#endif
videoDecoderGetMaxErrors ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetNeedsFormatMethodInfo ,
#endif
videoDecoderGetNeedsFormat ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetOldestFrameMethodInfo ,
#endif
videoDecoderGetOldestFrame ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetOutputStateMethodInfo ,
#endif
videoDecoderGetOutputState ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetPacketizedMethodInfo ,
#endif
videoDecoderGetPacketized ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetPendingFrameSizeMethodInfo,
#endif
videoDecoderGetPendingFrameSize ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderGetQosProportionMethodInfo ,
#endif
videoDecoderGetQosProportion ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderHaveFrameMethodInfo ,
#endif
videoDecoderHaveFrame ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderMergeTagsMethodInfo ,
#endif
videoDecoderMergeTags ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderNegotiateMethodInfo ,
#endif
videoDecoderNegotiate ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderProxyGetcapsMethodInfo ,
#endif
videoDecoderProxyGetcaps ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderReleaseFrameMethodInfo ,
#endif
videoDecoderReleaseFrame ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderSetEstimateRateMethodInfo ,
#endif
videoDecoderSetEstimateRate ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderSetInterlacedOutputStateMethodInfo,
#endif
videoDecoderSetInterlacedOutputState ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderSetLatencyMethodInfo ,
#endif
videoDecoderSetLatency ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderSetMaxErrorsMethodInfo ,
#endif
videoDecoderSetMaxErrors ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderSetNeedsFormatMethodInfo ,
#endif
videoDecoderSetNeedsFormat ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderSetOutputStateMethodInfo ,
#endif
videoDecoderSetOutputState ,
#if defined(ENABLE_OVERLOADING)
VideoDecoderSetPacketizedMethodInfo ,
#endif
videoDecoderSetPacketized ,
#if defined(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.GI.Base.Signals as B.Signals
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
newtype VideoDecoder = VideoDecoder (ManagedPtr VideoDecoder)
deriving (VideoDecoder -> VideoDecoder -> Bool
(VideoDecoder -> VideoDecoder -> Bool)
-> (VideoDecoder -> VideoDecoder -> Bool) -> Eq VideoDecoder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoDecoder -> VideoDecoder -> Bool
$c/= :: VideoDecoder -> VideoDecoder -> Bool
== :: VideoDecoder -> VideoDecoder -> Bool
$c== :: VideoDecoder -> VideoDecoder -> Bool
Eq)
foreign import ccall "gst_video_decoder_get_type"
c_gst_video_decoder_get_type :: IO GType
instance GObject VideoDecoder where
gobjectType :: IO GType
gobjectType = IO GType
c_gst_video_decoder_get_type
instance B.GValue.IsGValue VideoDecoder where
toGValue :: VideoDecoder -> IO GValue
toGValue o :: VideoDecoder
o = do
GType
gtype <- IO GType
c_gst_video_decoder_get_type
VideoDecoder -> (Ptr VideoDecoder -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr VideoDecoder
o (GType
-> (GValue -> Ptr VideoDecoder -> IO ())
-> Ptr VideoDecoder
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr VideoDecoder -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO VideoDecoder
fromGValue gv :: GValue
gv = do
Ptr VideoDecoder
ptr <- GValue -> IO (Ptr VideoDecoder)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr VideoDecoder)
(ManagedPtr VideoDecoder -> VideoDecoder)
-> Ptr VideoDecoder -> IO VideoDecoder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr VideoDecoder -> VideoDecoder
VideoDecoder Ptr VideoDecoder
ptr
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]
toVideoDecoder :: (MonadIO m, IsVideoDecoder o) => o -> m VideoDecoder
toVideoDecoder :: o -> m VideoDecoder
toVideoDecoder = IO VideoDecoder -> m VideoDecoder
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoDecoder -> m VideoDecoder)
-> (o -> IO VideoDecoder) -> o -> m VideoDecoder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr VideoDecoder -> VideoDecoder) -> o -> IO VideoDecoder
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr VideoDecoder -> VideoDecoder
VideoDecoder
noVideoDecoder :: Maybe VideoDecoder
noVideoDecoder :: Maybe VideoDecoder
noVideoDecoder = Maybe VideoDecoder
forall a. Maybe a
Nothing
#if defined(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 "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
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 @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(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 defined(ENABLE_OVERLOADING)
#endif
#if defined(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
foreign import ccall "gst_video_decoder_add_to_frame" gst_video_decoder_add_to_frame ::
Ptr VideoDecoder ->
Int32 ->
IO ()
videoDecoderAddToFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Int32
-> m ()
videoDecoderAddToFrame :: a -> Int32 -> m ()
videoDecoderAddToFrame decoder :: a
decoder nBytes :: Int32
nBytes = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoDecoder -> Int32 -> IO ()
gst_video_decoder_add_to_frame Ptr VideoDecoder
decoder' Int32
nBytes
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoDecoderAddToFrameMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderAddToFrameMethodInfo a signature where
overloadedMethod = videoDecoderAddToFrame
#endif
foreign import ccall "gst_video_decoder_allocate_output_buffer" gst_video_decoder_allocate_output_buffer ::
Ptr VideoDecoder ->
IO (Ptr Gst.Buffer.Buffer)
videoDecoderAllocateOutputBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Gst.Buffer.Buffer
videoDecoderAllocateOutputBuffer :: a -> m Buffer
videoDecoderAllocateOutputBuffer decoder :: a
decoder = IO Buffer -> m Buffer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Buffer -> m Buffer) -> IO Buffer -> m Buffer
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr Buffer
result <- Ptr VideoDecoder -> IO (Ptr Buffer)
gst_video_decoder_allocate_output_buffer Ptr VideoDecoder
decoder'
Text -> Ptr Buffer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "videoDecoderAllocateOutputBuffer" Ptr Buffer
result
Buffer
result' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderAllocateOutputBufferMethodInfo
instance (signature ~ (m Gst.Buffer.Buffer), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderAllocateOutputBufferMethodInfo a signature where
overloadedMethod = videoDecoderAllocateOutputBuffer
#endif
foreign import ccall "gst_video_decoder_allocate_output_frame" gst_video_decoder_allocate_output_frame ::
Ptr VideoDecoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
IO CInt
videoDecoderAllocateOutputFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> m Gst.Enums.FlowReturn
videoDecoderAllocateOutputFrame :: a -> VideoCodecFrame -> m FlowReturn
videoDecoderAllocateOutputFrame decoder :: a
decoder frame :: VideoCodecFrame
frame = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecFrame
frame
CInt
result <- Ptr VideoDecoder -> Ptr VideoCodecFrame -> IO CInt
gst_video_decoder_allocate_output_frame Ptr VideoDecoder
decoder' Ptr VideoCodecFrame
frame'
let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(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
foreign import ccall "gst_video_decoder_allocate_output_frame_with_params" gst_video_decoder_allocate_output_frame_with_params ::
Ptr VideoDecoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
Ptr Gst.BufferPoolAcquireParams.BufferPoolAcquireParams ->
IO CInt
videoDecoderAllocateOutputFrameWithParams ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> Gst.BufferPoolAcquireParams.BufferPoolAcquireParams
-> m Gst.Enums.FlowReturn
videoDecoderAllocateOutputFrameWithParams :: a -> VideoCodecFrame -> BufferPoolAcquireParams -> m FlowReturn
videoDecoderAllocateOutputFrameWithParams decoder :: a
decoder frame :: VideoCodecFrame
frame params :: BufferPoolAcquireParams
params = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecFrame
frame
Ptr BufferPoolAcquireParams
params' <- BufferPoolAcquireParams -> IO (Ptr BufferPoolAcquireParams)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BufferPoolAcquireParams
params
CInt
result <- Ptr VideoDecoder
-> Ptr VideoCodecFrame -> Ptr BufferPoolAcquireParams -> IO CInt
gst_video_decoder_allocate_output_frame_with_params Ptr VideoDecoder
decoder' Ptr VideoCodecFrame
frame' Ptr BufferPoolAcquireParams
params'
let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
BufferPoolAcquireParams -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BufferPoolAcquireParams
params
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(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
foreign import ccall "gst_video_decoder_drop_frame" gst_video_decoder_drop_frame ::
Ptr VideoDecoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
IO CInt
videoDecoderDropFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> m Gst.Enums.FlowReturn
videoDecoderDropFrame :: a -> VideoCodecFrame -> m FlowReturn
videoDecoderDropFrame dec :: a
dec frame :: VideoCodecFrame
frame = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
dec' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, BoxedObject a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed VideoCodecFrame
frame
CInt
result <- Ptr VideoDecoder -> Ptr VideoCodecFrame -> IO CInt
gst_video_decoder_drop_frame Ptr VideoDecoder
dec' Ptr VideoCodecFrame
frame'
let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(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
foreign import ccall "gst_video_decoder_finish_frame" gst_video_decoder_finish_frame ::
Ptr VideoDecoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
IO CInt
videoDecoderFinishFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> m Gst.Enums.FlowReturn
videoDecoderFinishFrame :: a -> VideoCodecFrame -> m FlowReturn
videoDecoderFinishFrame decoder :: a
decoder frame :: VideoCodecFrame
frame = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, BoxedObject a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed VideoCodecFrame
frame
CInt
result <- Ptr VideoDecoder -> Ptr VideoCodecFrame -> IO CInt
gst_video_decoder_finish_frame Ptr VideoDecoder
decoder' Ptr VideoCodecFrame
frame'
let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(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
foreign import ccall "gst_video_decoder_get_allocator" gst_video_decoder_get_allocator ::
Ptr VideoDecoder ->
Ptr (Ptr Gst.Allocator.Allocator) ->
Ptr Gst.AllocationParams.AllocationParams ->
IO ()
videoDecoderGetAllocator ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))
videoDecoderGetAllocator :: a -> m (Allocator, AllocationParams)
videoDecoderGetAllocator decoder :: a
decoder = IO (Allocator, AllocationParams) -> m (Allocator, AllocationParams)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Allocator, AllocationParams)
-> m (Allocator, AllocationParams))
-> IO (Allocator, AllocationParams)
-> m (Allocator, AllocationParams)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr (Ptr Allocator)
allocator <- IO (Ptr (Ptr Allocator))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr Gst.Allocator.Allocator))
Ptr AllocationParams
params <- Int -> IO (Ptr AllocationParams)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 64 :: IO (Ptr Gst.AllocationParams.AllocationParams)
Ptr VideoDecoder
-> Ptr (Ptr Allocator) -> Ptr AllocationParams -> IO ()
gst_video_decoder_get_allocator Ptr VideoDecoder
decoder' Ptr (Ptr Allocator)
allocator Ptr AllocationParams
params
Ptr Allocator
allocator' <- Ptr (Ptr Allocator) -> IO (Ptr Allocator)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Allocator)
allocator
Allocator
allocator'' <- ((ManagedPtr Allocator -> Allocator)
-> Ptr Allocator -> IO Allocator
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Allocator -> Allocator
Gst.Allocator.Allocator) Ptr Allocator
allocator'
AllocationParams
params' <- ((ManagedPtr AllocationParams -> AllocationParams)
-> Ptr AllocationParams -> IO AllocationParams
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr AllocationParams -> AllocationParams
Gst.AllocationParams.AllocationParams) Ptr AllocationParams
params
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Ptr (Ptr Allocator) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Allocator)
allocator
(Allocator, AllocationParams) -> IO (Allocator, AllocationParams)
forall (m :: * -> *) a. Monad m => a -> m a
return (Allocator
allocator'', AllocationParams
params')
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetAllocatorMethodInfo
instance (signature ~ (m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetAllocatorMethodInfo a signature where
overloadedMethod = videoDecoderGetAllocator
#endif
foreign import ccall "gst_video_decoder_get_buffer_pool" gst_video_decoder_get_buffer_pool ::
Ptr VideoDecoder ->
IO (Ptr Gst.BufferPool.BufferPool)
videoDecoderGetBufferPool ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Gst.BufferPool.BufferPool
videoDecoderGetBufferPool :: a -> m BufferPool
videoDecoderGetBufferPool decoder :: a
decoder = IO BufferPool -> m BufferPool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BufferPool -> m BufferPool) -> IO BufferPool -> m BufferPool
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr BufferPool
result <- Ptr VideoDecoder -> IO (Ptr BufferPool)
gst_video_decoder_get_buffer_pool Ptr VideoDecoder
decoder'
Text -> Ptr BufferPool -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "videoDecoderGetBufferPool" Ptr BufferPool
result
BufferPool
result' <- ((ManagedPtr BufferPool -> BufferPool)
-> Ptr BufferPool -> IO BufferPool
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BufferPool -> BufferPool
Gst.BufferPool.BufferPool) Ptr BufferPool
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
BufferPool -> IO BufferPool
forall (m :: * -> *) a. Monad m => a -> m a
return BufferPool
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetBufferPoolMethodInfo
instance (signature ~ (m Gst.BufferPool.BufferPool), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetBufferPoolMethodInfo a signature where
overloadedMethod = videoDecoderGetBufferPool
#endif
foreign import ccall "gst_video_decoder_get_estimate_rate" gst_video_decoder_get_estimate_rate ::
Ptr VideoDecoder ->
IO Int32
videoDecoderGetEstimateRate ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Int32
videoDecoderGetEstimateRate :: a -> m Int32
videoDecoderGetEstimateRate dec :: a
dec = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
dec' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Int32
result <- Ptr VideoDecoder -> IO Int32
gst_video_decoder_get_estimate_rate Ptr VideoDecoder
dec'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetEstimateRateMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetEstimateRateMethodInfo a signature where
overloadedMethod = videoDecoderGetEstimateRate
#endif
foreign import ccall "gst_video_decoder_get_frame" gst_video_decoder_get_frame ::
Ptr VideoDecoder ->
Int32 ->
IO (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame)
videoDecoderGetFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Int32
-> m GstVideo.VideoCodecFrame.VideoCodecFrame
videoDecoderGetFrame :: a -> Int32 -> m VideoCodecFrame
videoDecoderGetFrame decoder :: a
decoder frameNumber :: Int32
frameNumber = IO VideoCodecFrame -> m VideoCodecFrame
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCodecFrame -> m VideoCodecFrame)
-> IO VideoCodecFrame -> m VideoCodecFrame
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoCodecFrame
result <- Ptr VideoDecoder -> Int32 -> IO (Ptr VideoCodecFrame)
gst_video_decoder_get_frame Ptr VideoDecoder
decoder' Int32
frameNumber
Text -> Ptr VideoCodecFrame -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "videoDecoderGetFrame" Ptr VideoCodecFrame
result
VideoCodecFrame
result' <- ((ManagedPtr VideoCodecFrame -> VideoCodecFrame)
-> Ptr VideoCodecFrame -> IO VideoCodecFrame
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecFrame -> VideoCodecFrame
GstVideo.VideoCodecFrame.VideoCodecFrame) Ptr VideoCodecFrame
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
VideoCodecFrame -> IO VideoCodecFrame
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecFrame
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetFrameMethodInfo
instance (signature ~ (Int32 -> m GstVideo.VideoCodecFrame.VideoCodecFrame), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetFrameMethodInfo a signature where
overloadedMethod = videoDecoderGetFrame
#endif
foreign import ccall "gst_video_decoder_get_frames" gst_video_decoder_get_frames ::
Ptr VideoDecoder ->
IO (Ptr (GList (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame)))
videoDecoderGetFrames ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m [GstVideo.VideoCodecFrame.VideoCodecFrame]
videoDecoderGetFrames :: a -> m [VideoCodecFrame]
videoDecoderGetFrames decoder :: a
decoder = IO [VideoCodecFrame] -> m [VideoCodecFrame]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [VideoCodecFrame] -> m [VideoCodecFrame])
-> IO [VideoCodecFrame] -> m [VideoCodecFrame]
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr (GList (Ptr VideoCodecFrame))
result <- Ptr VideoDecoder -> IO (Ptr (GList (Ptr VideoCodecFrame)))
gst_video_decoder_get_frames Ptr VideoDecoder
decoder'
[Ptr VideoCodecFrame]
result' <- Ptr (GList (Ptr VideoCodecFrame)) -> IO [Ptr VideoCodecFrame]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr VideoCodecFrame))
result
[VideoCodecFrame]
result'' <- (Ptr VideoCodecFrame -> IO VideoCodecFrame)
-> [Ptr VideoCodecFrame] -> IO [VideoCodecFrame]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr VideoCodecFrame -> VideoCodecFrame)
-> Ptr VideoCodecFrame -> IO VideoCodecFrame
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecFrame -> VideoCodecFrame
GstVideo.VideoCodecFrame.VideoCodecFrame) [Ptr VideoCodecFrame]
result'
Ptr (GList (Ptr VideoCodecFrame)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr VideoCodecFrame))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
[VideoCodecFrame] -> IO [VideoCodecFrame]
forall (m :: * -> *) a. Monad m => a -> m a
return [VideoCodecFrame]
result''
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetFramesMethodInfo
instance (signature ~ (m [GstVideo.VideoCodecFrame.VideoCodecFrame]), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetFramesMethodInfo a signature where
overloadedMethod = videoDecoderGetFrames
#endif
foreign import ccall "gst_video_decoder_get_latency" gst_video_decoder_get_latency ::
Ptr VideoDecoder ->
Ptr Word64 ->
Ptr Word64 ->
IO ()
videoDecoderGetLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m ((Word64, Word64))
videoDecoderGetLatency :: a -> m (Word64, Word64)
videoDecoderGetLatency decoder :: a
decoder = IO (Word64, Word64) -> m (Word64, Word64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word64, Word64) -> m (Word64, Word64))
-> IO (Word64, Word64) -> m (Word64, Word64)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr Word64
minLatency <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Word64
maxLatency <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr VideoDecoder -> Ptr Word64 -> Ptr Word64 -> IO ()
gst_video_decoder_get_latency Ptr VideoDecoder
decoder' Ptr Word64
minLatency Ptr Word64
maxLatency
Word64
minLatency' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
minLatency
Word64
maxLatency' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
maxLatency
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
minLatency
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
maxLatency
(Word64, Word64) -> IO (Word64, Word64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word64
minLatency', Word64
maxLatency')
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetLatencyMethodInfo
instance (signature ~ (m ((Word64, Word64))), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetLatencyMethodInfo a signature where
overloadedMethod = videoDecoderGetLatency
#endif
foreign import ccall "gst_video_decoder_get_max_decode_time" gst_video_decoder_get_max_decode_time ::
Ptr VideoDecoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
IO Int64
videoDecoderGetMaxDecodeTime ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> m Int64
videoDecoderGetMaxDecodeTime :: a -> VideoCodecFrame -> m Int64
videoDecoderGetMaxDecodeTime decoder :: a
decoder frame :: VideoCodecFrame
frame = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecFrame
frame
Int64
result <- Ptr VideoDecoder -> Ptr VideoCodecFrame -> IO Int64
gst_video_decoder_get_max_decode_time Ptr VideoDecoder
decoder' Ptr VideoCodecFrame
frame'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
Int64 -> IO Int64
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetMaxDecodeTimeMethodInfo
instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m Int64), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetMaxDecodeTimeMethodInfo a signature where
overloadedMethod = videoDecoderGetMaxDecodeTime
#endif
foreign import ccall "gst_video_decoder_get_max_errors" gst_video_decoder_get_max_errors ::
Ptr VideoDecoder ->
IO Int32
videoDecoderGetMaxErrors ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Int32
videoDecoderGetMaxErrors :: a -> m Int32
videoDecoderGetMaxErrors dec :: a
dec = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
dec' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Int32
result <- Ptr VideoDecoder -> IO Int32
gst_video_decoder_get_max_errors Ptr VideoDecoder
dec'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetMaxErrorsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetMaxErrorsMethodInfo a signature where
overloadedMethod = videoDecoderGetMaxErrors
#endif
foreign import ccall "gst_video_decoder_get_needs_format" gst_video_decoder_get_needs_format ::
Ptr VideoDecoder ->
IO CInt
videoDecoderGetNeedsFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Bool
videoDecoderGetNeedsFormat :: a -> m Bool
videoDecoderGetNeedsFormat dec :: a
dec = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
dec' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
CInt
result <- Ptr VideoDecoder -> IO CInt
gst_video_decoder_get_needs_format Ptr VideoDecoder
dec'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetNeedsFormatMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetNeedsFormatMethodInfo a signature where
overloadedMethod = videoDecoderGetNeedsFormat
#endif
foreign import ccall "gst_video_decoder_get_oldest_frame" gst_video_decoder_get_oldest_frame ::
Ptr VideoDecoder ->
IO (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame)
videoDecoderGetOldestFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m GstVideo.VideoCodecFrame.VideoCodecFrame
videoDecoderGetOldestFrame :: a -> m VideoCodecFrame
videoDecoderGetOldestFrame decoder :: a
decoder = IO VideoCodecFrame -> m VideoCodecFrame
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCodecFrame -> m VideoCodecFrame)
-> IO VideoCodecFrame -> m VideoCodecFrame
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoCodecFrame
result <- Ptr VideoDecoder -> IO (Ptr VideoCodecFrame)
gst_video_decoder_get_oldest_frame Ptr VideoDecoder
decoder'
Text -> Ptr VideoCodecFrame -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "videoDecoderGetOldestFrame" Ptr VideoCodecFrame
result
VideoCodecFrame
result' <- ((ManagedPtr VideoCodecFrame -> VideoCodecFrame)
-> Ptr VideoCodecFrame -> IO VideoCodecFrame
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecFrame -> VideoCodecFrame
GstVideo.VideoCodecFrame.VideoCodecFrame) Ptr VideoCodecFrame
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
VideoCodecFrame -> IO VideoCodecFrame
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecFrame
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetOldestFrameMethodInfo
instance (signature ~ (m GstVideo.VideoCodecFrame.VideoCodecFrame), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetOldestFrameMethodInfo a signature where
overloadedMethod = videoDecoderGetOldestFrame
#endif
foreign import ccall "gst_video_decoder_get_output_state" gst_video_decoder_get_output_state ::
Ptr VideoDecoder ->
IO (Ptr GstVideo.VideoCodecState.VideoCodecState)
videoDecoderGetOutputState ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m GstVideo.VideoCodecState.VideoCodecState
videoDecoderGetOutputState :: a -> m VideoCodecState
videoDecoderGetOutputState decoder :: a
decoder = IO VideoCodecState -> m VideoCodecState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCodecState -> m VideoCodecState)
-> IO VideoCodecState -> m VideoCodecState
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoCodecState
result <- Ptr VideoDecoder -> IO (Ptr VideoCodecState)
gst_video_decoder_get_output_state Ptr VideoDecoder
decoder'
Text -> Ptr VideoCodecState -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "videoDecoderGetOutputState" Ptr VideoCodecState
result
VideoCodecState
result' <- ((ManagedPtr VideoCodecState -> VideoCodecState)
-> Ptr VideoCodecState -> IO VideoCodecState
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecState -> VideoCodecState
GstVideo.VideoCodecState.VideoCodecState) Ptr VideoCodecState
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
VideoCodecState -> IO VideoCodecState
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecState
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetOutputStateMethodInfo
instance (signature ~ (m GstVideo.VideoCodecState.VideoCodecState), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetOutputStateMethodInfo a signature where
overloadedMethod = videoDecoderGetOutputState
#endif
foreign import ccall "gst_video_decoder_get_packetized" gst_video_decoder_get_packetized ::
Ptr VideoDecoder ->
IO CInt
videoDecoderGetPacketized ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Bool
videoDecoderGetPacketized :: a -> m Bool
videoDecoderGetPacketized decoder :: a
decoder = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
CInt
result <- Ptr VideoDecoder -> IO CInt
gst_video_decoder_get_packetized Ptr VideoDecoder
decoder'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetPacketizedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetPacketizedMethodInfo a signature where
overloadedMethod = videoDecoderGetPacketized
#endif
foreign import ccall "gst_video_decoder_get_pending_frame_size" gst_video_decoder_get_pending_frame_size ::
Ptr VideoDecoder ->
IO Word64
videoDecoderGetPendingFrameSize ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Word64
videoDecoderGetPendingFrameSize :: a -> m Word64
videoDecoderGetPendingFrameSize decoder :: a
decoder = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Word64
result <- Ptr VideoDecoder -> IO Word64
gst_video_decoder_get_pending_frame_size Ptr VideoDecoder
decoder'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetPendingFrameSizeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetPendingFrameSizeMethodInfo a signature where
overloadedMethod = videoDecoderGetPendingFrameSize
#endif
foreign import ccall "gst_video_decoder_get_qos_proportion" gst_video_decoder_get_qos_proportion ::
Ptr VideoDecoder ->
IO CDouble
videoDecoderGetQosProportion ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Double
videoDecoderGetQosProportion :: a -> m Double
videoDecoderGetQosProportion decoder :: a
decoder = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
CDouble
result <- Ptr VideoDecoder -> IO CDouble
gst_video_decoder_get_qos_proportion Ptr VideoDecoder
decoder'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderGetQosProportionMethodInfo
instance (signature ~ (m Double), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderGetQosProportionMethodInfo a signature where
overloadedMethod = videoDecoderGetQosProportion
#endif
foreign import ccall "gst_video_decoder_have_frame" gst_video_decoder_have_frame ::
Ptr VideoDecoder ->
IO CInt
videoDecoderHaveFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Gst.Enums.FlowReturn
videoDecoderHaveFrame :: a -> m FlowReturn
videoDecoderHaveFrame decoder :: a
decoder = IO FlowReturn -> m FlowReturn
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FlowReturn -> m FlowReturn) -> IO FlowReturn -> m FlowReturn
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
CInt
result <- Ptr VideoDecoder -> IO CInt
gst_video_decoder_have_frame Ptr VideoDecoder
decoder'
let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderHaveFrameMethodInfo
instance (signature ~ (m Gst.Enums.FlowReturn), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderHaveFrameMethodInfo a signature where
overloadedMethod = videoDecoderHaveFrame
#endif
foreign import ccall "gst_video_decoder_merge_tags" gst_video_decoder_merge_tags ::
Ptr VideoDecoder ->
Ptr Gst.TagList.TagList ->
CUInt ->
IO ()
videoDecoderMergeTags ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Maybe (Gst.TagList.TagList)
-> Gst.Enums.TagMergeMode
-> m ()
videoDecoderMergeTags :: a -> Maybe TagList -> TagMergeMode -> m ()
videoDecoderMergeTags decoder :: a
decoder tags :: Maybe TagList
tags mode :: TagMergeMode
mode = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr TagList
maybeTags <- case Maybe TagList
tags of
Nothing -> Ptr TagList -> IO (Ptr TagList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TagList
forall a. Ptr a
nullPtr
Just jTags :: TagList
jTags -> do
Ptr TagList
jTags' <- TagList -> IO (Ptr TagList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TagList
jTags
Ptr TagList -> IO (Ptr TagList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TagList
jTags'
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (TagMergeMode -> Int) -> TagMergeMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TagMergeMode -> Int
forall a. Enum a => a -> Int
fromEnum) TagMergeMode
mode
Ptr VideoDecoder -> Ptr TagList -> CUInt -> IO ()
gst_video_decoder_merge_tags Ptr VideoDecoder
decoder' Ptr TagList
maybeTags CUInt
mode'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Maybe TagList -> (TagList -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TagList
tags TagList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(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
foreign import ccall "gst_video_decoder_negotiate" gst_video_decoder_negotiate ::
Ptr VideoDecoder ->
IO CInt
videoDecoderNegotiate ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> m Bool
videoDecoderNegotiate :: a -> m Bool
videoDecoderNegotiate decoder :: a
decoder = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
CInt
result <- Ptr VideoDecoder -> IO CInt
gst_video_decoder_negotiate Ptr VideoDecoder
decoder'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VideoDecoderNegotiateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderNegotiateMethodInfo a signature where
overloadedMethod = videoDecoderNegotiate
#endif
foreign import ccall "gst_video_decoder_proxy_getcaps" gst_video_decoder_proxy_getcaps ::
Ptr VideoDecoder ->
Ptr Gst.Caps.Caps ->
Ptr Gst.Caps.Caps ->
IO (Ptr Gst.Caps.Caps)
videoDecoderProxyGetcaps ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Maybe (Gst.Caps.Caps)
-> Maybe (Gst.Caps.Caps)
-> m Gst.Caps.Caps
videoDecoderProxyGetcaps :: a -> Maybe Caps -> Maybe Caps -> m Caps
videoDecoderProxyGetcaps decoder :: a
decoder caps :: Maybe Caps
caps filter :: Maybe Caps
filter = IO Caps -> m Caps
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr Caps
maybeCaps <- case Maybe Caps
caps of
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just jCaps :: Caps
jCaps -> do
Ptr Caps
jCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jCaps
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jCaps'
Ptr Caps
maybeFilter <- case Maybe Caps
filter of
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just jFilter :: Caps
jFilter -> do
Ptr Caps
jFilter' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jFilter
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jFilter'
Ptr Caps
result <- Ptr VideoDecoder -> Ptr Caps -> Ptr Caps -> IO (Ptr Caps)
gst_video_decoder_proxy_getcaps Ptr VideoDecoder
decoder' Ptr Caps
maybeCaps Ptr Caps
maybeFilter
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "videoDecoderProxyGetcaps" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
caps Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
filter Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(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
foreign import ccall "gst_video_decoder_release_frame" gst_video_decoder_release_frame ::
Ptr VideoDecoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
IO ()
videoDecoderReleaseFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> m ()
videoDecoderReleaseFrame :: a -> VideoCodecFrame -> m ()
videoDecoderReleaseFrame dec :: a
dec frame :: VideoCodecFrame
frame = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
dec' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, BoxedObject a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed VideoCodecFrame
frame
Ptr VideoDecoder -> Ptr VideoCodecFrame -> IO ()
gst_video_decoder_release_frame Ptr VideoDecoder
dec' Ptr VideoCodecFrame
frame'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoDecoderReleaseFrameMethodInfo
instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderReleaseFrameMethodInfo a signature where
overloadedMethod = videoDecoderReleaseFrame
#endif
foreign import ccall "gst_video_decoder_set_estimate_rate" gst_video_decoder_set_estimate_rate ::
Ptr VideoDecoder ->
CInt ->
IO ()
videoDecoderSetEstimateRate ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Bool
-> m ()
videoDecoderSetEstimateRate :: a -> Bool -> m ()
videoDecoderSetEstimateRate dec :: a
dec enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
dec' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
let enabled' :: CInt
enabled' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
enabled
Ptr VideoDecoder -> CInt -> IO ()
gst_video_decoder_set_estimate_rate Ptr VideoDecoder
dec' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoDecoderSetEstimateRateMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetEstimateRateMethodInfo a signature where
overloadedMethod = videoDecoderSetEstimateRate
#endif
foreign import ccall "gst_video_decoder_set_interlaced_output_state" gst_video_decoder_set_interlaced_output_state ::
Ptr VideoDecoder ->
CUInt ->
CUInt ->
Word32 ->
Word32 ->
Ptr GstVideo.VideoCodecState.VideoCodecState ->
IO (Ptr GstVideo.VideoCodecState.VideoCodecState)
videoDecoderSetInterlacedOutputState ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> GstVideo.Enums.VideoFormat
-> GstVideo.Enums.VideoInterlaceMode
-> Word32
-> Word32
-> Maybe (GstVideo.VideoCodecState.VideoCodecState)
-> m GstVideo.VideoCodecState.VideoCodecState
videoDecoderSetInterlacedOutputState :: a
-> VideoFormat
-> VideoInterlaceMode
-> Word32
-> Word32
-> Maybe VideoCodecState
-> m VideoCodecState
videoDecoderSetInterlacedOutputState decoder :: a
decoder fmt :: VideoFormat
fmt mode :: VideoInterlaceMode
mode width :: Word32
width height :: Word32
height reference :: Maybe VideoCodecState
reference = IO VideoCodecState -> m VideoCodecState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCodecState -> m VideoCodecState)
-> IO VideoCodecState -> m VideoCodecState
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
let fmt' :: CUInt
fmt' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoFormat -> Int) -> VideoFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoFormat -> Int
forall a. Enum a => a -> Int
fromEnum) VideoFormat
fmt
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (VideoInterlaceMode -> Int) -> VideoInterlaceMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoInterlaceMode -> Int
forall a. Enum a => a -> Int
fromEnum) VideoInterlaceMode
mode
Ptr VideoCodecState
maybeReference <- case Maybe VideoCodecState
reference of
Nothing -> Ptr VideoCodecState -> IO (Ptr VideoCodecState)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VideoCodecState
forall a. Ptr a
nullPtr
Just jReference :: VideoCodecState
jReference -> do
Ptr VideoCodecState
jReference' <- VideoCodecState -> IO (Ptr VideoCodecState)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecState
jReference
Ptr VideoCodecState -> IO (Ptr VideoCodecState)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VideoCodecState
jReference'
Ptr VideoCodecState
result <- Ptr VideoDecoder
-> CUInt
-> CUInt
-> Word32
-> Word32
-> Ptr VideoCodecState
-> IO (Ptr VideoCodecState)
gst_video_decoder_set_interlaced_output_state Ptr VideoDecoder
decoder' CUInt
fmt' CUInt
mode' Word32
width Word32
height Ptr VideoCodecState
maybeReference
Text -> Ptr VideoCodecState -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "videoDecoderSetInterlacedOutputState" Ptr VideoCodecState
result
VideoCodecState
result' <- ((ManagedPtr VideoCodecState -> VideoCodecState)
-> Ptr VideoCodecState -> IO VideoCodecState
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecState -> VideoCodecState
GstVideo.VideoCodecState.VideoCodecState) Ptr VideoCodecState
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Maybe VideoCodecState -> (VideoCodecState -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe VideoCodecState
reference VideoCodecState -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
VideoCodecState -> IO VideoCodecState
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecState
result'
#if defined(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
foreign import ccall "gst_video_decoder_set_latency" gst_video_decoder_set_latency ::
Ptr VideoDecoder ->
Word64 ->
Word64 ->
IO ()
videoDecoderSetLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Word64
-> Word64
-> m ()
videoDecoderSetLatency :: a -> Word64 -> Word64 -> m ()
videoDecoderSetLatency decoder :: a
decoder minLatency :: Word64
minLatency maxLatency :: Word64
maxLatency = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr VideoDecoder -> Word64 -> Word64 -> IO ()
gst_video_decoder_set_latency Ptr VideoDecoder
decoder' Word64
minLatency Word64
maxLatency
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoDecoderSetLatencyMethodInfo
instance (signature ~ (Word64 -> Word64 -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetLatencyMethodInfo a signature where
overloadedMethod = videoDecoderSetLatency
#endif
foreign import ccall "gst_video_decoder_set_max_errors" gst_video_decoder_set_max_errors ::
Ptr VideoDecoder ->
Int32 ->
IO ()
videoDecoderSetMaxErrors ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Int32
-> m ()
videoDecoderSetMaxErrors :: a -> Int32 -> m ()
videoDecoderSetMaxErrors dec :: a
dec num :: Int32
num = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
dec' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr VideoDecoder -> Int32 -> IO ()
gst_video_decoder_set_max_errors Ptr VideoDecoder
dec' Int32
num
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoDecoderSetMaxErrorsMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetMaxErrorsMethodInfo a signature where
overloadedMethod = videoDecoderSetMaxErrors
#endif
foreign import ccall "gst_video_decoder_set_needs_format" gst_video_decoder_set_needs_format ::
Ptr VideoDecoder ->
CInt ->
IO ()
videoDecoderSetNeedsFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Bool
-> m ()
videoDecoderSetNeedsFormat :: a -> Bool -> m ()
videoDecoderSetNeedsFormat dec :: a
dec enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
dec' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
let enabled' :: CInt
enabled' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
enabled
Ptr VideoDecoder -> CInt -> IO ()
gst_video_decoder_set_needs_format Ptr VideoDecoder
dec' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoDecoderSetNeedsFormatMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetNeedsFormatMethodInfo a signature where
overloadedMethod = videoDecoderSetNeedsFormat
#endif
foreign import ccall "gst_video_decoder_set_output_state" gst_video_decoder_set_output_state ::
Ptr VideoDecoder ->
CUInt ->
Word32 ->
Word32 ->
Ptr GstVideo.VideoCodecState.VideoCodecState ->
IO (Ptr GstVideo.VideoCodecState.VideoCodecState)
videoDecoderSetOutputState ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> GstVideo.Enums.VideoFormat
-> Word32
-> Word32
-> Maybe (GstVideo.VideoCodecState.VideoCodecState)
-> m GstVideo.VideoCodecState.VideoCodecState
videoDecoderSetOutputState :: a
-> VideoFormat
-> Word32
-> Word32
-> Maybe VideoCodecState
-> m VideoCodecState
videoDecoderSetOutputState decoder :: a
decoder fmt :: VideoFormat
fmt width :: Word32
width height :: Word32
height reference :: Maybe VideoCodecState
reference = IO VideoCodecState -> m VideoCodecState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCodecState -> m VideoCodecState)
-> IO VideoCodecState -> m VideoCodecState
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
let fmt' :: CUInt
fmt' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (VideoFormat -> Int) -> VideoFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VideoFormat -> Int
forall a. Enum a => a -> Int
fromEnum) VideoFormat
fmt
Ptr VideoCodecState
maybeReference <- case Maybe VideoCodecState
reference of
Nothing -> Ptr VideoCodecState -> IO (Ptr VideoCodecState)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VideoCodecState
forall a. Ptr a
nullPtr
Just jReference :: VideoCodecState
jReference -> do
Ptr VideoCodecState
jReference' <- VideoCodecState -> IO (Ptr VideoCodecState)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecState
jReference
Ptr VideoCodecState -> IO (Ptr VideoCodecState)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VideoCodecState
jReference'
Ptr VideoCodecState
result <- Ptr VideoDecoder
-> CUInt
-> Word32
-> Word32
-> Ptr VideoCodecState
-> IO (Ptr VideoCodecState)
gst_video_decoder_set_output_state Ptr VideoDecoder
decoder' CUInt
fmt' Word32
width Word32
height Ptr VideoCodecState
maybeReference
Text -> Ptr VideoCodecState -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "videoDecoderSetOutputState" Ptr VideoCodecState
result
VideoCodecState
result' <- ((ManagedPtr VideoCodecState -> VideoCodecState)
-> Ptr VideoCodecState -> IO VideoCodecState
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecState -> VideoCodecState
GstVideo.VideoCodecState.VideoCodecState) Ptr VideoCodecState
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
Maybe VideoCodecState -> (VideoCodecState -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe VideoCodecState
reference VideoCodecState -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
VideoCodecState -> IO VideoCodecState
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecState
result'
#if defined(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
foreign import ccall "gst_video_decoder_set_packetized" gst_video_decoder_set_packetized ::
Ptr VideoDecoder ->
CInt ->
IO ()
videoDecoderSetPacketized ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Bool
-> m ()
videoDecoderSetPacketized :: a -> Bool -> m ()
videoDecoderSetPacketized decoder :: a
decoder packetized :: Bool
packetized = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
let packetized' :: CInt
packetized' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
packetized
Ptr VideoDecoder -> CInt -> IO ()
gst_video_decoder_set_packetized Ptr VideoDecoder
decoder' CInt
packetized'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoDecoderSetPacketizedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetPacketizedMethodInfo a signature where
overloadedMethod = videoDecoderSetPacketized
#endif
foreign import ccall "gst_video_decoder_set_use_default_pad_acceptcaps" gst_video_decoder_set_use_default_pad_acceptcaps ::
Ptr VideoDecoder ->
CInt ->
IO ()
videoDecoderSetUseDefaultPadAcceptcaps ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoDecoder a) =>
a
-> Bool
-> m ()
videoDecoderSetUseDefaultPadAcceptcaps :: a -> Bool -> m ()
videoDecoderSetUseDefaultPadAcceptcaps decoder :: a
decoder use :: Bool
use = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoDecoder
decoder' <- a -> IO (Ptr VideoDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
let use' :: CInt
use' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
use
Ptr VideoDecoder -> CInt -> IO ()
gst_video_decoder_set_use_default_pad_acceptcaps Ptr VideoDecoder
decoder' CInt
use'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
decoder
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoDecoderSetUseDefaultPadAcceptcapsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoDecoder a) => O.MethodInfo VideoDecoderSetUseDefaultPadAcceptcapsMethodInfo a signature where
overloadedMethod = videoDecoderSetUseDefaultPadAcceptcaps
#endif