{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstAudio.Objects.AudioDecoder
(
AudioDecoder(..) ,
IsAudioDecoder ,
toAudioDecoder ,
#if defined(ENABLE_OVERLOADING)
ResolveAudioDecoderMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AudioDecoderAllocateOutputBufferMethodInfo,
#endif
audioDecoderAllocateOutputBuffer ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderFinishFrameMethodInfo ,
#endif
audioDecoderFinishFrame ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderFinishSubframeMethodInfo ,
#endif
audioDecoderFinishSubframe ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetAllocatorMethodInfo ,
#endif
audioDecoderGetAllocator ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetAudioInfoMethodInfo ,
#endif
audioDecoderGetAudioInfo ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetDelayMethodInfo ,
#endif
audioDecoderGetDelay ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetDrainableMethodInfo ,
#endif
audioDecoderGetDrainable ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetEstimateRateMethodInfo ,
#endif
audioDecoderGetEstimateRate ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetLatencyMethodInfo ,
#endif
audioDecoderGetLatency ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetMaxErrorsMethodInfo ,
#endif
audioDecoderGetMaxErrors ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetMinLatencyMethodInfo ,
#endif
audioDecoderGetMinLatency ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetNeedsFormatMethodInfo ,
#endif
audioDecoderGetNeedsFormat ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetParseStateMethodInfo ,
#endif
audioDecoderGetParseState ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetPlcMethodInfo ,
#endif
audioDecoderGetPlc ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetPlcAwareMethodInfo ,
#endif
audioDecoderGetPlcAware ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderGetToleranceMethodInfo ,
#endif
audioDecoderGetTolerance ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderMergeTagsMethodInfo ,
#endif
audioDecoderMergeTags ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderNegotiateMethodInfo ,
#endif
audioDecoderNegotiate ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderProxyGetcapsMethodInfo ,
#endif
audioDecoderProxyGetcaps ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetAllocationCapsMethodInfo ,
#endif
audioDecoderSetAllocationCaps ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetDrainableMethodInfo ,
#endif
audioDecoderSetDrainable ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetEstimateRateMethodInfo ,
#endif
audioDecoderSetEstimateRate ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetLatencyMethodInfo ,
#endif
audioDecoderSetLatency ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetMaxErrorsMethodInfo ,
#endif
audioDecoderSetMaxErrors ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetMinLatencyMethodInfo ,
#endif
audioDecoderSetMinLatency ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetNeedsFormatMethodInfo ,
#endif
audioDecoderSetNeedsFormat ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetOutputCapsMethodInfo ,
#endif
audioDecoderSetOutputCaps ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetOutputFormatMethodInfo ,
#endif
audioDecoderSetOutputFormat ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetPlcMethodInfo ,
#endif
audioDecoderSetPlc ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetPlcAwareMethodInfo ,
#endif
audioDecoderSetPlcAware ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetToleranceMethodInfo ,
#endif
audioDecoderSetTolerance ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderSetUseDefaultPadAcceptcapsMethodInfo,
#endif
audioDecoderSetUseDefaultPadAcceptcaps ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderMaxErrorsPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
audioDecoderMaxErrors ,
#endif
constructAudioDecoderMaxErrors ,
getAudioDecoderMaxErrors ,
setAudioDecoderMaxErrors ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderMinLatencyPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
audioDecoderMinLatency ,
#endif
constructAudioDecoderMinLatency ,
getAudioDecoderMinLatency ,
setAudioDecoderMinLatency ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderPlcPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
audioDecoderPlc ,
#endif
constructAudioDecoderPlc ,
getAudioDecoderPlc ,
setAudioDecoderPlc ,
#if defined(ENABLE_OVERLOADING)
AudioDecoderTolerancePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
audioDecoderTolerance ,
#endif
constructAudioDecoderTolerance ,
getAudioDecoderTolerance ,
setAudioDecoderTolerance ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gst.Enums as Gst.Enums
import qualified GI.Gst.Objects.Allocator as Gst.Allocator
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.Caps as Gst.Caps
import qualified GI.Gst.Structs.TagList as Gst.TagList
import {-# SOURCE #-} qualified GI.GstAudio.Structs.AudioInfo as GstAudio.AudioInfo
newtype AudioDecoder = AudioDecoder (SP.ManagedPtr AudioDecoder)
deriving (AudioDecoder -> AudioDecoder -> Bool
(AudioDecoder -> AudioDecoder -> Bool)
-> (AudioDecoder -> AudioDecoder -> Bool) -> Eq AudioDecoder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioDecoder -> AudioDecoder -> Bool
$c/= :: AudioDecoder -> AudioDecoder -> Bool
== :: AudioDecoder -> AudioDecoder -> Bool
$c== :: AudioDecoder -> AudioDecoder -> Bool
Eq)
instance SP.ManagedPtrNewtype AudioDecoder where
toManagedPtr :: AudioDecoder -> ManagedPtr AudioDecoder
toManagedPtr (AudioDecoder ManagedPtr AudioDecoder
p) = ManagedPtr AudioDecoder
p
foreign import ccall "gst_audio_decoder_get_type"
c_gst_audio_decoder_get_type :: IO B.Types.GType
instance B.Types.TypedObject AudioDecoder where
glibType :: IO GType
glibType = IO GType
c_gst_audio_decoder_get_type
instance B.Types.GObject AudioDecoder
class (SP.GObject o, O.IsDescendantOf AudioDecoder o) => IsAudioDecoder o
instance (SP.GObject o, O.IsDescendantOf AudioDecoder o) => IsAudioDecoder o
instance O.HasParentTypes AudioDecoder
type instance O.ParentTypes AudioDecoder = '[Gst.Element.Element, Gst.Object.Object, GObject.Object.Object]
toAudioDecoder :: (MIO.MonadIO m, IsAudioDecoder o) => o -> m AudioDecoder
toAudioDecoder :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> m AudioDecoder
toAudioDecoder = IO AudioDecoder -> m AudioDecoder
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO AudioDecoder -> m AudioDecoder)
-> (o -> IO AudioDecoder) -> o -> m AudioDecoder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AudioDecoder -> AudioDecoder) -> o -> IO AudioDecoder
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr AudioDecoder -> AudioDecoder
AudioDecoder
instance B.GValue.IsGValue (Maybe AudioDecoder) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_audio_decoder_get_type
gvalueSet_ :: Ptr GValue -> Maybe AudioDecoder -> IO ()
gvalueSet_ Ptr GValue
gv Maybe AudioDecoder
P.Nothing = Ptr GValue -> Ptr AudioDecoder -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr AudioDecoder
forall a. Ptr a
FP.nullPtr :: FP.Ptr AudioDecoder)
gvalueSet_ Ptr GValue
gv (P.Just AudioDecoder
obj) = AudioDecoder -> (Ptr AudioDecoder -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AudioDecoder
obj (Ptr GValue -> Ptr AudioDecoder -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe AudioDecoder)
gvalueGet_ Ptr GValue
gv = do
Ptr AudioDecoder
ptr <- Ptr GValue -> IO (Ptr AudioDecoder)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr AudioDecoder)
if Ptr AudioDecoder
ptr Ptr AudioDecoder -> Ptr AudioDecoder -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr AudioDecoder
forall a. Ptr a
FP.nullPtr
then AudioDecoder -> Maybe AudioDecoder
forall a. a -> Maybe a
P.Just (AudioDecoder -> Maybe AudioDecoder)
-> IO AudioDecoder -> IO (Maybe AudioDecoder)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr AudioDecoder -> AudioDecoder)
-> Ptr AudioDecoder -> IO AudioDecoder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AudioDecoder -> AudioDecoder
AudioDecoder Ptr AudioDecoder
ptr
else Maybe AudioDecoder -> IO (Maybe AudioDecoder)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AudioDecoder
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAudioDecoderMethod (t :: Symbol) (o :: *) :: * where
ResolveAudioDecoderMethod "abortState" o = Gst.Element.ElementAbortStateMethodInfo
ResolveAudioDecoderMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
ResolveAudioDecoderMethod "addPad" o = Gst.Element.ElementAddPadMethodInfo
ResolveAudioDecoderMethod "addPropertyDeepNotifyWatch" o = Gst.Element.ElementAddPropertyDeepNotifyWatchMethodInfo
ResolveAudioDecoderMethod "addPropertyNotifyWatch" o = Gst.Element.ElementAddPropertyNotifyWatchMethodInfo
ResolveAudioDecoderMethod "allocateOutputBuffer" o = AudioDecoderAllocateOutputBufferMethodInfo
ResolveAudioDecoderMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAudioDecoderMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAudioDecoderMethod "callAsync" o = Gst.Element.ElementCallAsyncMethodInfo
ResolveAudioDecoderMethod "changeState" o = Gst.Element.ElementChangeStateMethodInfo
ResolveAudioDecoderMethod "continueState" o = Gst.Element.ElementContinueStateMethodInfo
ResolveAudioDecoderMethod "createAllPads" o = Gst.Element.ElementCreateAllPadsMethodInfo
ResolveAudioDecoderMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
ResolveAudioDecoderMethod "finishFrame" o = AudioDecoderFinishFrameMethodInfo
ResolveAudioDecoderMethod "finishSubframe" o = AudioDecoderFinishSubframeMethodInfo
ResolveAudioDecoderMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAudioDecoderMethod "foreachPad" o = Gst.Element.ElementForeachPadMethodInfo
ResolveAudioDecoderMethod "foreachSinkPad" o = Gst.Element.ElementForeachSinkPadMethodInfo
ResolveAudioDecoderMethod "foreachSrcPad" o = Gst.Element.ElementForeachSrcPadMethodInfo
ResolveAudioDecoderMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAudioDecoderMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAudioDecoderMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
ResolveAudioDecoderMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
ResolveAudioDecoderMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
ResolveAudioDecoderMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
ResolveAudioDecoderMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAudioDecoderMethod "isLockedState" o = Gst.Element.ElementIsLockedStateMethodInfo
ResolveAudioDecoderMethod "iteratePads" o = Gst.Element.ElementIteratePadsMethodInfo
ResolveAudioDecoderMethod "iterateSinkPads" o = Gst.Element.ElementIterateSinkPadsMethodInfo
ResolveAudioDecoderMethod "iterateSrcPads" o = Gst.Element.ElementIterateSrcPadsMethodInfo
ResolveAudioDecoderMethod "link" o = Gst.Element.ElementLinkMethodInfo
ResolveAudioDecoderMethod "linkFiltered" o = Gst.Element.ElementLinkFilteredMethodInfo
ResolveAudioDecoderMethod "linkPads" o = Gst.Element.ElementLinkPadsMethodInfo
ResolveAudioDecoderMethod "linkPadsFiltered" o = Gst.Element.ElementLinkPadsFilteredMethodInfo
ResolveAudioDecoderMethod "linkPadsFull" o = Gst.Element.ElementLinkPadsFullMethodInfo
ResolveAudioDecoderMethod "lostState" o = Gst.Element.ElementLostStateMethodInfo
ResolveAudioDecoderMethod "mergeTags" o = AudioDecoderMergeTagsMethodInfo
ResolveAudioDecoderMethod "messageFull" o = Gst.Element.ElementMessageFullMethodInfo
ResolveAudioDecoderMethod "messageFullWithDetails" o = Gst.Element.ElementMessageFullWithDetailsMethodInfo
ResolveAudioDecoderMethod "negotiate" o = AudioDecoderNegotiateMethodInfo
ResolveAudioDecoderMethod "noMorePads" o = Gst.Element.ElementNoMorePadsMethodInfo
ResolveAudioDecoderMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAudioDecoderMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAudioDecoderMethod "postMessage" o = Gst.Element.ElementPostMessageMethodInfo
ResolveAudioDecoderMethod "provideClock" o = Gst.Element.ElementProvideClockMethodInfo
ResolveAudioDecoderMethod "proxyGetcaps" o = AudioDecoderProxyGetcapsMethodInfo
ResolveAudioDecoderMethod "query" o = Gst.Element.ElementQueryMethodInfo
ResolveAudioDecoderMethod "queryConvert" o = Gst.Element.ElementQueryConvertMethodInfo
ResolveAudioDecoderMethod "queryDuration" o = Gst.Element.ElementQueryDurationMethodInfo
ResolveAudioDecoderMethod "queryPosition" o = Gst.Element.ElementQueryPositionMethodInfo
ResolveAudioDecoderMethod "ref" o = Gst.Object.ObjectRefMethodInfo
ResolveAudioDecoderMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAudioDecoderMethod "releaseRequestPad" o = Gst.Element.ElementReleaseRequestPadMethodInfo
ResolveAudioDecoderMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
ResolveAudioDecoderMethod "removePad" o = Gst.Element.ElementRemovePadMethodInfo
ResolveAudioDecoderMethod "removePropertyNotifyWatch" o = Gst.Element.ElementRemovePropertyNotifyWatchMethodInfo
ResolveAudioDecoderMethod "requestPad" o = Gst.Element.ElementRequestPadMethodInfo
ResolveAudioDecoderMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAudioDecoderMethod "seek" o = Gst.Element.ElementSeekMethodInfo
ResolveAudioDecoderMethod "seekSimple" o = Gst.Element.ElementSeekSimpleMethodInfo
ResolveAudioDecoderMethod "sendEvent" o = Gst.Element.ElementSendEventMethodInfo
ResolveAudioDecoderMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAudioDecoderMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAudioDecoderMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
ResolveAudioDecoderMethod "syncStateWithParent" o = Gst.Element.ElementSyncStateWithParentMethodInfo
ResolveAudioDecoderMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
ResolveAudioDecoderMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAudioDecoderMethod "unlink" o = Gst.Element.ElementUnlinkMethodInfo
ResolveAudioDecoderMethod "unlinkPads" o = Gst.Element.ElementUnlinkPadsMethodInfo
ResolveAudioDecoderMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
ResolveAudioDecoderMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
ResolveAudioDecoderMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAudioDecoderMethod "getAllocator" o = AudioDecoderGetAllocatorMethodInfo
ResolveAudioDecoderMethod "getAudioInfo" o = AudioDecoderGetAudioInfoMethodInfo
ResolveAudioDecoderMethod "getBaseTime" o = Gst.Element.ElementGetBaseTimeMethodInfo
ResolveAudioDecoderMethod "getBus" o = Gst.Element.ElementGetBusMethodInfo
ResolveAudioDecoderMethod "getClock" o = Gst.Element.ElementGetClockMethodInfo
ResolveAudioDecoderMethod "getCompatiblePad" o = Gst.Element.ElementGetCompatiblePadMethodInfo
ResolveAudioDecoderMethod "getCompatiblePadTemplate" o = Gst.Element.ElementGetCompatiblePadTemplateMethodInfo
ResolveAudioDecoderMethod "getContext" o = Gst.Element.ElementGetContextMethodInfo
ResolveAudioDecoderMethod "getContextUnlocked" o = Gst.Element.ElementGetContextUnlockedMethodInfo
ResolveAudioDecoderMethod "getContexts" o = Gst.Element.ElementGetContextsMethodInfo
ResolveAudioDecoderMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
ResolveAudioDecoderMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
ResolveAudioDecoderMethod "getCurrentClockTime" o = Gst.Element.ElementGetCurrentClockTimeMethodInfo
ResolveAudioDecoderMethod "getCurrentRunningTime" o = Gst.Element.ElementGetCurrentRunningTimeMethodInfo
ResolveAudioDecoderMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAudioDecoderMethod "getDelay" o = AudioDecoderGetDelayMethodInfo
ResolveAudioDecoderMethod "getDrainable" o = AudioDecoderGetDrainableMethodInfo
ResolveAudioDecoderMethod "getEstimateRate" o = AudioDecoderGetEstimateRateMethodInfo
ResolveAudioDecoderMethod "getFactory" o = Gst.Element.ElementGetFactoryMethodInfo
ResolveAudioDecoderMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
ResolveAudioDecoderMethod "getLatency" o = AudioDecoderGetLatencyMethodInfo
ResolveAudioDecoderMethod "getMaxErrors" o = AudioDecoderGetMaxErrorsMethodInfo
ResolveAudioDecoderMethod "getMetadata" o = Gst.Element.ElementGetMetadataMethodInfo
ResolveAudioDecoderMethod "getMinLatency" o = AudioDecoderGetMinLatencyMethodInfo
ResolveAudioDecoderMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
ResolveAudioDecoderMethod "getNeedsFormat" o = AudioDecoderGetNeedsFormatMethodInfo
ResolveAudioDecoderMethod "getPadTemplate" o = Gst.Element.ElementGetPadTemplateMethodInfo
ResolveAudioDecoderMethod "getPadTemplateList" o = Gst.Element.ElementGetPadTemplateListMethodInfo
ResolveAudioDecoderMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
ResolveAudioDecoderMethod "getParseState" o = AudioDecoderGetParseStateMethodInfo
ResolveAudioDecoderMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
ResolveAudioDecoderMethod "getPlc" o = AudioDecoderGetPlcMethodInfo
ResolveAudioDecoderMethod "getPlcAware" o = AudioDecoderGetPlcAwareMethodInfo
ResolveAudioDecoderMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAudioDecoderMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAudioDecoderMethod "getRequestPad" o = Gst.Element.ElementGetRequestPadMethodInfo
ResolveAudioDecoderMethod "getStartTime" o = Gst.Element.ElementGetStartTimeMethodInfo
ResolveAudioDecoderMethod "getState" o = Gst.Element.ElementGetStateMethodInfo
ResolveAudioDecoderMethod "getStaticPad" o = Gst.Element.ElementGetStaticPadMethodInfo
ResolveAudioDecoderMethod "getTolerance" o = AudioDecoderGetToleranceMethodInfo
ResolveAudioDecoderMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
ResolveAudioDecoderMethod "setAllocationCaps" o = AudioDecoderSetAllocationCapsMethodInfo
ResolveAudioDecoderMethod "setBaseTime" o = Gst.Element.ElementSetBaseTimeMethodInfo
ResolveAudioDecoderMethod "setBus" o = Gst.Element.ElementSetBusMethodInfo
ResolveAudioDecoderMethod "setClock" o = Gst.Element.ElementSetClockMethodInfo
ResolveAudioDecoderMethod "setContext" o = Gst.Element.ElementSetContextMethodInfo
ResolveAudioDecoderMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
ResolveAudioDecoderMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
ResolveAudioDecoderMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
ResolveAudioDecoderMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAudioDecoderMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAudioDecoderMethod "setDrainable" o = AudioDecoderSetDrainableMethodInfo
ResolveAudioDecoderMethod "setEstimateRate" o = AudioDecoderSetEstimateRateMethodInfo
ResolveAudioDecoderMethod "setLatency" o = AudioDecoderSetLatencyMethodInfo
ResolveAudioDecoderMethod "setLockedState" o = Gst.Element.ElementSetLockedStateMethodInfo
ResolveAudioDecoderMethod "setMaxErrors" o = AudioDecoderSetMaxErrorsMethodInfo
ResolveAudioDecoderMethod "setMinLatency" o = AudioDecoderSetMinLatencyMethodInfo
ResolveAudioDecoderMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
ResolveAudioDecoderMethod "setNeedsFormat" o = AudioDecoderSetNeedsFormatMethodInfo
ResolveAudioDecoderMethod "setOutputCaps" o = AudioDecoderSetOutputCapsMethodInfo
ResolveAudioDecoderMethod "setOutputFormat" o = AudioDecoderSetOutputFormatMethodInfo
ResolveAudioDecoderMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
ResolveAudioDecoderMethod "setPlc" o = AudioDecoderSetPlcMethodInfo
ResolveAudioDecoderMethod "setPlcAware" o = AudioDecoderSetPlcAwareMethodInfo
ResolveAudioDecoderMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAudioDecoderMethod "setStartTime" o = Gst.Element.ElementSetStartTimeMethodInfo
ResolveAudioDecoderMethod "setState" o = Gst.Element.ElementSetStateMethodInfo
ResolveAudioDecoderMethod "setTolerance" o = AudioDecoderSetToleranceMethodInfo
ResolveAudioDecoderMethod "setUseDefaultPadAcceptcaps" o = AudioDecoderSetUseDefaultPadAcceptcapsMethodInfo
ResolveAudioDecoderMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAudioDecoderMethod t AudioDecoder, O.OverloadedMethod info AudioDecoder p) => OL.IsLabel t (AudioDecoder -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveAudioDecoderMethod t AudioDecoder, O.OverloadedMethod info AudioDecoder p, R.HasField t AudioDecoder p) => R.HasField t AudioDecoder p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveAudioDecoderMethod t AudioDecoder, O.OverloadedMethodInfo info AudioDecoder) => OL.IsLabel t (O.MethodProxy info AudioDecoder) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getAudioDecoderMaxErrors :: (MonadIO m, IsAudioDecoder o) => o -> m Int32
getAudioDecoderMaxErrors :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> m Int32
getAudioDecoderMaxErrors o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"max-errors"
setAudioDecoderMaxErrors :: (MonadIO m, IsAudioDecoder o) => o -> Int32 -> m ()
setAudioDecoderMaxErrors :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> Int32 -> m ()
setAudioDecoderMaxErrors o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"max-errors" Int32
val
constructAudioDecoderMaxErrors :: (IsAudioDecoder o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructAudioDecoderMaxErrors :: forall o (m :: * -> *).
(IsAudioDecoder o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructAudioDecoderMaxErrors Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"max-errors" Int32
val
#if defined(ENABLE_OVERLOADING)
data AudioDecoderMaxErrorsPropertyInfo
instance AttrInfo AudioDecoderMaxErrorsPropertyInfo where
type AttrAllowedOps AudioDecoderMaxErrorsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AudioDecoderMaxErrorsPropertyInfo = IsAudioDecoder
type AttrSetTypeConstraint AudioDecoderMaxErrorsPropertyInfo = (~) Int32
type AttrTransferTypeConstraint AudioDecoderMaxErrorsPropertyInfo = (~) Int32
type AttrTransferType AudioDecoderMaxErrorsPropertyInfo = Int32
type AttrGetType AudioDecoderMaxErrorsPropertyInfo = Int32
type AttrLabel AudioDecoderMaxErrorsPropertyInfo = "max-errors"
type AttrOrigin AudioDecoderMaxErrorsPropertyInfo = AudioDecoder
attrGet = getAudioDecoderMaxErrors
attrSet = setAudioDecoderMaxErrors
attrTransfer _ v = do
return v
attrConstruct = constructAudioDecoderMaxErrors
attrClear = undefined
#endif
getAudioDecoderMinLatency :: (MonadIO m, IsAudioDecoder o) => o -> m Int64
getAudioDecoderMinLatency :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> m Int64
getAudioDecoderMinLatency o
obj = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int64
forall a. GObject a => a -> String -> IO Int64
B.Properties.getObjectPropertyInt64 o
obj String
"min-latency"
setAudioDecoderMinLatency :: (MonadIO m, IsAudioDecoder o) => o -> Int64 -> m ()
setAudioDecoderMinLatency :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> Int64 -> m ()
setAudioDecoderMinLatency o
obj Int64
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int64 -> IO ()
forall a. GObject a => a -> String -> Int64 -> IO ()
B.Properties.setObjectPropertyInt64 o
obj String
"min-latency" Int64
val
constructAudioDecoderMinLatency :: (IsAudioDecoder o, MIO.MonadIO m) => Int64 -> m (GValueConstruct o)
constructAudioDecoderMinLatency :: forall o (m :: * -> *).
(IsAudioDecoder o, MonadIO m) =>
Int64 -> m (GValueConstruct o)
constructAudioDecoderMinLatency Int64
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int64 -> IO (GValueConstruct o)
forall o. String -> Int64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt64 String
"min-latency" Int64
val
#if defined(ENABLE_OVERLOADING)
data AudioDecoderMinLatencyPropertyInfo
instance AttrInfo AudioDecoderMinLatencyPropertyInfo where
type AttrAllowedOps AudioDecoderMinLatencyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AudioDecoderMinLatencyPropertyInfo = IsAudioDecoder
type AttrSetTypeConstraint AudioDecoderMinLatencyPropertyInfo = (~) Int64
type AttrTransferTypeConstraint AudioDecoderMinLatencyPropertyInfo = (~) Int64
type AttrTransferType AudioDecoderMinLatencyPropertyInfo = Int64
type AttrGetType AudioDecoderMinLatencyPropertyInfo = Int64
type AttrLabel AudioDecoderMinLatencyPropertyInfo = "min-latency"
type AttrOrigin AudioDecoderMinLatencyPropertyInfo = AudioDecoder
attrGet = getAudioDecoderMinLatency
attrSet = setAudioDecoderMinLatency
attrTransfer _ v = do
return v
attrConstruct = constructAudioDecoderMinLatency
attrClear = undefined
#endif
getAudioDecoderPlc :: (MonadIO m, IsAudioDecoder o) => o -> m Bool
getAudioDecoderPlc :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> m Bool
getAudioDecoderPlc o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"plc"
setAudioDecoderPlc :: (MonadIO m, IsAudioDecoder o) => o -> Bool -> m ()
setAudioDecoderPlc :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> Bool -> m ()
setAudioDecoderPlc o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"plc" Bool
val
constructAudioDecoderPlc :: (IsAudioDecoder o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructAudioDecoderPlc :: forall o (m :: * -> *).
(IsAudioDecoder o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructAudioDecoderPlc Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"plc" Bool
val
#if defined(ENABLE_OVERLOADING)
data AudioDecoderPlcPropertyInfo
instance AttrInfo AudioDecoderPlcPropertyInfo where
type AttrAllowedOps AudioDecoderPlcPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AudioDecoderPlcPropertyInfo = IsAudioDecoder
type AttrSetTypeConstraint AudioDecoderPlcPropertyInfo = (~) Bool
type AttrTransferTypeConstraint AudioDecoderPlcPropertyInfo = (~) Bool
type AttrTransferType AudioDecoderPlcPropertyInfo = Bool
type AttrGetType AudioDecoderPlcPropertyInfo = Bool
type AttrLabel AudioDecoderPlcPropertyInfo = "plc"
type AttrOrigin AudioDecoderPlcPropertyInfo = AudioDecoder
attrGet = getAudioDecoderPlc
attrSet = setAudioDecoderPlc
attrTransfer _ v = do
return v
attrConstruct = constructAudioDecoderPlc
attrClear = undefined
#endif
getAudioDecoderTolerance :: (MonadIO m, IsAudioDecoder o) => o -> m Int64
getAudioDecoderTolerance :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> m Int64
getAudioDecoderTolerance o
obj = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int64
forall a. GObject a => a -> String -> IO Int64
B.Properties.getObjectPropertyInt64 o
obj String
"tolerance"
setAudioDecoderTolerance :: (MonadIO m, IsAudioDecoder o) => o -> Int64 -> m ()
setAudioDecoderTolerance :: forall (m :: * -> *) o.
(MonadIO m, IsAudioDecoder o) =>
o -> Int64 -> m ()
setAudioDecoderTolerance o
obj Int64
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int64 -> IO ()
forall a. GObject a => a -> String -> Int64 -> IO ()
B.Properties.setObjectPropertyInt64 o
obj String
"tolerance" Int64
val
constructAudioDecoderTolerance :: (IsAudioDecoder o, MIO.MonadIO m) => Int64 -> m (GValueConstruct o)
constructAudioDecoderTolerance :: forall o (m :: * -> *).
(IsAudioDecoder o, MonadIO m) =>
Int64 -> m (GValueConstruct o)
constructAudioDecoderTolerance Int64
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int64 -> IO (GValueConstruct o)
forall o. String -> Int64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt64 String
"tolerance" Int64
val
#if defined(ENABLE_OVERLOADING)
data AudioDecoderTolerancePropertyInfo
instance AttrInfo AudioDecoderTolerancePropertyInfo where
type AttrAllowedOps AudioDecoderTolerancePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AudioDecoderTolerancePropertyInfo = IsAudioDecoder
type AttrSetTypeConstraint AudioDecoderTolerancePropertyInfo = (~) Int64
type AttrTransferTypeConstraint AudioDecoderTolerancePropertyInfo = (~) Int64
type AttrTransferType AudioDecoderTolerancePropertyInfo = Int64
type AttrGetType AudioDecoderTolerancePropertyInfo = Int64
type AttrLabel AudioDecoderTolerancePropertyInfo = "tolerance"
type AttrOrigin AudioDecoderTolerancePropertyInfo = AudioDecoder
attrGet = getAudioDecoderTolerance
attrSet = setAudioDecoderTolerance
attrTransfer _ v = do
return v
attrConstruct = constructAudioDecoderTolerance
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AudioDecoder
type instance O.AttributeList AudioDecoder = AudioDecoderAttributeList
type AudioDecoderAttributeList = ('[ '("maxErrors", AudioDecoderMaxErrorsPropertyInfo), '("minLatency", AudioDecoderMinLatencyPropertyInfo), '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("plc", AudioDecoderPlcPropertyInfo), '("tolerance", AudioDecoderTolerancePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
audioDecoderMaxErrors :: AttrLabelProxy "maxErrors"
audioDecoderMaxErrors = AttrLabelProxy
audioDecoderMinLatency :: AttrLabelProxy "minLatency"
audioDecoderMinLatency = AttrLabelProxy
audioDecoderPlc :: AttrLabelProxy "plc"
audioDecoderPlc = AttrLabelProxy
audioDecoderTolerance :: AttrLabelProxy "tolerance"
audioDecoderTolerance = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AudioDecoder = AudioDecoderSignalList
type AudioDecoderSignalList = ('[ '("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_audio_decoder_allocate_output_buffer" gst_audio_decoder_allocate_output_buffer ::
Ptr AudioDecoder ->
Word64 ->
IO (Ptr Gst.Buffer.Buffer)
audioDecoderAllocateOutputBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Word64
-> m Gst.Buffer.Buffer
audioDecoderAllocateOutputBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Word64 -> m Buffer
audioDecoderAllocateOutputBuffer a
dec Word64
size = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr Buffer
result <- Ptr AudioDecoder -> Word64 -> IO (Ptr Buffer)
gst_audio_decoder_allocate_output_buffer Ptr AudioDecoder
dec' Word64
size
Text -> Ptr Buffer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"audioDecoderAllocateOutputBuffer" Ptr Buffer
result
Buffer
result' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, GBoxed 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
dec
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderAllocateOutputBufferMethodInfo
instance (signature ~ (Word64 -> m Gst.Buffer.Buffer), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderAllocateOutputBufferMethodInfo a signature where
overloadedMethod = audioDecoderAllocateOutputBuffer
instance O.OverloadedMethodInfo AudioDecoderAllocateOutputBufferMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderAllocateOutputBuffer",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderAllocateOutputBuffer"
}
#endif
foreign import ccall "gst_audio_decoder_finish_frame" gst_audio_decoder_finish_frame ::
Ptr AudioDecoder ->
Ptr Gst.Buffer.Buffer ->
Int32 ->
IO CInt
audioDecoderFinishFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Maybe (Gst.Buffer.Buffer)
-> Int32
-> m Gst.Enums.FlowReturn
audioDecoderFinishFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Maybe Buffer -> Int32 -> m FlowReturn
audioDecoderFinishFrame a
dec Maybe Buffer
buf Int32
frames = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr Buffer
maybeBuf <- case Maybe Buffer
buf of
Maybe Buffer
Nothing -> Ptr Buffer -> IO (Ptr Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Buffer
forall a. Ptr a
nullPtr
Just Buffer
jBuf -> do
Ptr Buffer
jBuf' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Buffer
jBuf
Ptr Buffer -> IO (Ptr Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Buffer
jBuf'
CInt
result <- Ptr AudioDecoder -> Ptr Buffer -> Int32 -> IO CInt
gst_audio_decoder_finish_frame Ptr AudioDecoder
dec' Ptr Buffer
maybeBuf Int32
frames
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
Maybe Buffer -> (Buffer -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Buffer
buf Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderFinishFrameMethodInfo
instance (signature ~ (Maybe (Gst.Buffer.Buffer) -> Int32 -> m Gst.Enums.FlowReturn), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderFinishFrameMethodInfo a signature where
overloadedMethod = audioDecoderFinishFrame
instance O.OverloadedMethodInfo AudioDecoderFinishFrameMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderFinishFrame",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderFinishFrame"
}
#endif
foreign import ccall "gst_audio_decoder_finish_subframe" gst_audio_decoder_finish_subframe ::
Ptr AudioDecoder ->
Ptr Gst.Buffer.Buffer ->
IO CInt
audioDecoderFinishSubframe ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Maybe (Gst.Buffer.Buffer)
-> m Gst.Enums.FlowReturn
audioDecoderFinishSubframe :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Maybe Buffer -> m FlowReturn
audioDecoderFinishSubframe a
dec Maybe Buffer
buf = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr Buffer
maybeBuf <- case Maybe Buffer
buf of
Maybe Buffer
Nothing -> Ptr Buffer -> IO (Ptr Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Buffer
forall a. Ptr a
nullPtr
Just Buffer
jBuf -> do
Ptr Buffer
jBuf' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Buffer
jBuf
Ptr Buffer -> IO (Ptr Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Buffer
jBuf'
CInt
result <- Ptr AudioDecoder -> Ptr Buffer -> IO CInt
gst_audio_decoder_finish_subframe Ptr AudioDecoder
dec' Ptr Buffer
maybeBuf
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
Maybe Buffer -> (Buffer -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Buffer
buf Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderFinishSubframeMethodInfo
instance (signature ~ (Maybe (Gst.Buffer.Buffer) -> m Gst.Enums.FlowReturn), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderFinishSubframeMethodInfo a signature where
overloadedMethod = audioDecoderFinishSubframe
instance O.OverloadedMethodInfo AudioDecoderFinishSubframeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderFinishSubframe",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderFinishSubframe"
}
#endif
foreign import ccall "gst_audio_decoder_get_allocator" gst_audio_decoder_get_allocator ::
Ptr AudioDecoder ->
Ptr (Ptr Gst.Allocator.Allocator) ->
Ptr Gst.AllocationParams.AllocationParams ->
IO ()
audioDecoderGetAllocator ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))
audioDecoderGetAllocator :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m (Allocator, AllocationParams)
audioDecoderGetAllocator a
dec = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr (Ptr Allocator)
allocator <- IO (Ptr (Ptr Allocator))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Allocator.Allocator))
Ptr AllocationParams
params <- Int -> IO (Ptr AllocationParams)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
64 :: IO (Ptr Gst.AllocationParams.AllocationParams)
Ptr AudioDecoder
-> Ptr (Ptr Allocator) -> Ptr AllocationParams -> IO ()
gst_audio_decoder_get_allocator Ptr AudioDecoder
dec' 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, GBoxed 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
dec
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 AudioDecoderGetAllocatorMethodInfo
instance (signature ~ (m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetAllocatorMethodInfo a signature where
overloadedMethod = audioDecoderGetAllocator
instance O.OverloadedMethodInfo AudioDecoderGetAllocatorMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetAllocator",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetAllocator"
}
#endif
foreign import ccall "gst_audio_decoder_get_audio_info" gst_audio_decoder_get_audio_info ::
Ptr AudioDecoder ->
IO (Ptr GstAudio.AudioInfo.AudioInfo)
audioDecoderGetAudioInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m GstAudio.AudioInfo.AudioInfo
audioDecoderGetAudioInfo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m AudioInfo
audioDecoderGetAudioInfo a
dec = IO AudioInfo -> m AudioInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AudioInfo -> m AudioInfo) -> IO AudioInfo -> m AudioInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr AudioInfo
result <- Ptr AudioDecoder -> IO (Ptr AudioInfo)
gst_audio_decoder_get_audio_info Ptr AudioDecoder
dec'
Text -> Ptr AudioInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"audioDecoderGetAudioInfo" Ptr AudioInfo
result
AudioInfo
result' <- ((ManagedPtr AudioInfo -> AudioInfo)
-> Ptr AudioInfo -> IO AudioInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr AudioInfo -> AudioInfo
GstAudio.AudioInfo.AudioInfo) Ptr AudioInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
AudioInfo -> IO AudioInfo
forall (m :: * -> *) a. Monad m => a -> m a
return AudioInfo
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderGetAudioInfoMethodInfo
instance (signature ~ (m GstAudio.AudioInfo.AudioInfo), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetAudioInfoMethodInfo a signature where
overloadedMethod = audioDecoderGetAudioInfo
instance O.OverloadedMethodInfo AudioDecoderGetAudioInfoMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetAudioInfo",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetAudioInfo"
}
#endif
foreign import ccall "gst_audio_decoder_get_delay" gst_audio_decoder_get_delay ::
Ptr AudioDecoder ->
IO Int32
audioDecoderGetDelay ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Int32
audioDecoderGetDelay :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Int32
audioDecoderGetDelay 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Int32
result <- Ptr AudioDecoder -> IO Int32
gst_audio_decoder_get_delay Ptr AudioDecoder
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 AudioDecoderGetDelayMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetDelayMethodInfo a signature where
overloadedMethod = audioDecoderGetDelay
instance O.OverloadedMethodInfo AudioDecoderGetDelayMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetDelay",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetDelay"
}
#endif
foreign import ccall "gst_audio_decoder_get_drainable" gst_audio_decoder_get_drainable ::
Ptr AudioDecoder ->
IO CInt
audioDecoderGetDrainable ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Bool
audioDecoderGetDrainable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Bool
audioDecoderGetDrainable 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
CInt
result <- Ptr AudioDecoder -> IO CInt
gst_audio_decoder_get_drainable Ptr AudioDecoder
dec'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderGetDrainableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetDrainableMethodInfo a signature where
overloadedMethod = audioDecoderGetDrainable
instance O.OverloadedMethodInfo AudioDecoderGetDrainableMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetDrainable",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetDrainable"
}
#endif
foreign import ccall "gst_audio_decoder_get_estimate_rate" gst_audio_decoder_get_estimate_rate ::
Ptr AudioDecoder ->
IO Int32
audioDecoderGetEstimateRate ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Int32
audioDecoderGetEstimateRate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Int32
audioDecoderGetEstimateRate 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Int32
result <- Ptr AudioDecoder -> IO Int32
gst_audio_decoder_get_estimate_rate Ptr AudioDecoder
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 AudioDecoderGetEstimateRateMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetEstimateRateMethodInfo a signature where
overloadedMethod = audioDecoderGetEstimateRate
instance O.OverloadedMethodInfo AudioDecoderGetEstimateRateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetEstimateRate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetEstimateRate"
}
#endif
foreign import ccall "gst_audio_decoder_get_latency" gst_audio_decoder_get_latency ::
Ptr AudioDecoder ->
Ptr Word64 ->
Ptr Word64 ->
IO ()
audioDecoderGetLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m ((Word64, Word64))
audioDecoderGetLatency :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m (Word64, Word64)
audioDecoderGetLatency a
dec = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr Word64
min <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Word64
max <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr AudioDecoder -> Ptr Word64 -> Ptr Word64 -> IO ()
gst_audio_decoder_get_latency Ptr AudioDecoder
dec' Ptr Word64
min Ptr Word64
max
Word64
min' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
min
Word64
max' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
max
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
min
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
max
(Word64, Word64) -> IO (Word64, Word64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word64
min', Word64
max')
#if defined(ENABLE_OVERLOADING)
data AudioDecoderGetLatencyMethodInfo
instance (signature ~ (m ((Word64, Word64))), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetLatencyMethodInfo a signature where
overloadedMethod = audioDecoderGetLatency
instance O.OverloadedMethodInfo AudioDecoderGetLatencyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetLatency",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetLatency"
}
#endif
foreign import ccall "gst_audio_decoder_get_max_errors" gst_audio_decoder_get_max_errors ::
Ptr AudioDecoder ->
IO Int32
audioDecoderGetMaxErrors ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Int32
audioDecoderGetMaxErrors :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Int32
audioDecoderGetMaxErrors 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Int32
result <- Ptr AudioDecoder -> IO Int32
gst_audio_decoder_get_max_errors Ptr AudioDecoder
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 AudioDecoderGetMaxErrorsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetMaxErrorsMethodInfo a signature where
overloadedMethod = audioDecoderGetMaxErrors
instance O.OverloadedMethodInfo AudioDecoderGetMaxErrorsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetMaxErrors",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetMaxErrors"
}
#endif
foreign import ccall "gst_audio_decoder_get_min_latency" gst_audio_decoder_get_min_latency ::
Ptr AudioDecoder ->
IO Word64
audioDecoderGetMinLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Word64
audioDecoderGetMinLatency :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Word64
audioDecoderGetMinLatency a
dec = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Word64
result <- Ptr AudioDecoder -> IO Word64
gst_audio_decoder_get_min_latency Ptr AudioDecoder
dec'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data AudioDecoderGetMinLatencyMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetMinLatencyMethodInfo a signature where
overloadedMethod = audioDecoderGetMinLatency
instance O.OverloadedMethodInfo AudioDecoderGetMinLatencyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetMinLatency",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetMinLatency"
}
#endif
foreign import ccall "gst_audio_decoder_get_needs_format" gst_audio_decoder_get_needs_format ::
Ptr AudioDecoder ->
IO CInt
audioDecoderGetNeedsFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Bool
audioDecoderGetNeedsFormat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Bool
audioDecoderGetNeedsFormat 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
CInt
result <- Ptr AudioDecoder -> IO CInt
gst_audio_decoder_get_needs_format Ptr AudioDecoder
dec'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderGetNeedsFormatMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetNeedsFormatMethodInfo a signature where
overloadedMethod = audioDecoderGetNeedsFormat
instance O.OverloadedMethodInfo AudioDecoderGetNeedsFormatMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetNeedsFormat",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetNeedsFormat"
}
#endif
foreign import ccall "gst_audio_decoder_get_parse_state" gst_audio_decoder_get_parse_state ::
Ptr AudioDecoder ->
Ptr CInt ->
Ptr CInt ->
IO ()
audioDecoderGetParseState ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m ((Bool, Bool))
audioDecoderGetParseState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m (Bool, Bool)
audioDecoderGetParseState a
dec = IO (Bool, Bool) -> m (Bool, Bool)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Bool) -> m (Bool, Bool))
-> IO (Bool, Bool) -> m (Bool, Bool)
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr CInt
sync <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr CInt
eos <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr AudioDecoder -> Ptr CInt -> Ptr CInt -> IO ()
gst_audio_decoder_get_parse_state Ptr AudioDecoder
dec' Ptr CInt
sync Ptr CInt
eos
CInt
sync' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
sync
let sync'' :: Bool
sync'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
sync'
CInt
eos' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
eos
let eos'' :: Bool
eos'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
eos'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
sync
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
eos
(Bool, Bool) -> IO (Bool, Bool)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
sync'', Bool
eos'')
#if defined(ENABLE_OVERLOADING)
data AudioDecoderGetParseStateMethodInfo
instance (signature ~ (m ((Bool, Bool))), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetParseStateMethodInfo a signature where
overloadedMethod = audioDecoderGetParseState
instance O.OverloadedMethodInfo AudioDecoderGetParseStateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetParseState",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetParseState"
}
#endif
foreign import ccall "gst_audio_decoder_get_plc" gst_audio_decoder_get_plc ::
Ptr AudioDecoder ->
IO CInt
audioDecoderGetPlc ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Bool
audioDecoderGetPlc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Bool
audioDecoderGetPlc 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
CInt
result <- Ptr AudioDecoder -> IO CInt
gst_audio_decoder_get_plc Ptr AudioDecoder
dec'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderGetPlcMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetPlcMethodInfo a signature where
overloadedMethod = audioDecoderGetPlc
instance O.OverloadedMethodInfo AudioDecoderGetPlcMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetPlc",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetPlc"
}
#endif
foreign import ccall "gst_audio_decoder_get_plc_aware" gst_audio_decoder_get_plc_aware ::
Ptr AudioDecoder ->
IO Int32
audioDecoderGetPlcAware ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Int32
audioDecoderGetPlcAware :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Int32
audioDecoderGetPlcAware 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Int32
result <- Ptr AudioDecoder -> IO Int32
gst_audio_decoder_get_plc_aware Ptr AudioDecoder
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 AudioDecoderGetPlcAwareMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetPlcAwareMethodInfo a signature where
overloadedMethod = audioDecoderGetPlcAware
instance O.OverloadedMethodInfo AudioDecoderGetPlcAwareMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetPlcAware",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetPlcAware"
}
#endif
foreign import ccall "gst_audio_decoder_get_tolerance" gst_audio_decoder_get_tolerance ::
Ptr AudioDecoder ->
IO Word64
audioDecoderGetTolerance ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Word64
audioDecoderGetTolerance :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Word64
audioDecoderGetTolerance a
dec = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Word64
result <- Ptr AudioDecoder -> IO Word64
gst_audio_decoder_get_tolerance Ptr AudioDecoder
dec'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data AudioDecoderGetToleranceMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderGetToleranceMethodInfo a signature where
overloadedMethod = audioDecoderGetTolerance
instance O.OverloadedMethodInfo AudioDecoderGetToleranceMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderGetTolerance",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderGetTolerance"
}
#endif
foreign import ccall "gst_audio_decoder_merge_tags" gst_audio_decoder_merge_tags ::
Ptr AudioDecoder ->
Ptr Gst.TagList.TagList ->
CUInt ->
IO ()
audioDecoderMergeTags ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Maybe (Gst.TagList.TagList)
-> Gst.Enums.TagMergeMode
-> m ()
audioDecoderMergeTags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Maybe TagList -> TagMergeMode -> m ()
audioDecoderMergeTags a
dec Maybe TagList
tags 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr TagList
maybeTags <- case Maybe TagList
tags of
Maybe TagList
Nothing -> Ptr TagList -> IO (Ptr TagList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TagList
forall a. Ptr a
nullPtr
Just 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 AudioDecoder -> Ptr TagList -> CUInt -> IO ()
gst_audio_decoder_merge_tags Ptr AudioDecoder
dec' Ptr TagList
maybeTags CUInt
mode'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
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 AudioDecoderMergeTagsMethodInfo
instance (signature ~ (Maybe (Gst.TagList.TagList) -> Gst.Enums.TagMergeMode -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderMergeTagsMethodInfo a signature where
overloadedMethod = audioDecoderMergeTags
instance O.OverloadedMethodInfo AudioDecoderMergeTagsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderMergeTags",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderMergeTags"
}
#endif
foreign import ccall "gst_audio_decoder_negotiate" gst_audio_decoder_negotiate ::
Ptr AudioDecoder ->
IO CInt
audioDecoderNegotiate ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> m Bool
audioDecoderNegotiate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> m Bool
audioDecoderNegotiate 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
CInt
result <- Ptr AudioDecoder -> IO CInt
gst_audio_decoder_negotiate Ptr AudioDecoder
dec'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderNegotiateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderNegotiateMethodInfo a signature where
overloadedMethod = audioDecoderNegotiate
instance O.OverloadedMethodInfo AudioDecoderNegotiateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderNegotiate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderNegotiate"
}
#endif
foreign import ccall "gst_audio_decoder_proxy_getcaps" gst_audio_decoder_proxy_getcaps ::
Ptr AudioDecoder ->
Ptr Gst.Caps.Caps ->
Ptr Gst.Caps.Caps ->
IO (Ptr Gst.Caps.Caps)
audioDecoderProxyGetcaps ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Maybe (Gst.Caps.Caps)
-> Maybe (Gst.Caps.Caps)
-> m Gst.Caps.Caps
audioDecoderProxyGetcaps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Maybe Caps -> Maybe Caps -> m Caps
audioDecoderProxyGetcaps a
decoder Maybe Caps
caps 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 AudioDecoder
decoder' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
decoder
Ptr Caps
maybeCaps <- case Maybe Caps
caps of
Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just Caps
jCaps -> do
Ptr Caps
jCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jCaps
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jCaps'
Ptr Caps
maybeFilter <- case Maybe Caps
filter of
Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just 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 AudioDecoder -> Ptr Caps -> Ptr Caps -> IO (Ptr Caps)
gst_audio_decoder_proxy_getcaps Ptr AudioDecoder
decoder' Ptr Caps
maybeCaps Ptr Caps
maybeFilter
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"audioDecoderProxyGetcaps" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
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 AudioDecoderProxyGetcapsMethodInfo
instance (signature ~ (Maybe (Gst.Caps.Caps) -> Maybe (Gst.Caps.Caps) -> m Gst.Caps.Caps), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderProxyGetcapsMethodInfo a signature where
overloadedMethod = audioDecoderProxyGetcaps
instance O.OverloadedMethodInfo AudioDecoderProxyGetcapsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderProxyGetcaps",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderProxyGetcaps"
}
#endif
foreign import ccall "gst_audio_decoder_set_allocation_caps" gst_audio_decoder_set_allocation_caps ::
Ptr AudioDecoder ->
Ptr Gst.Caps.Caps ->
IO ()
audioDecoderSetAllocationCaps ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Maybe (Gst.Caps.Caps)
-> m ()
audioDecoderSetAllocationCaps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Maybe Caps -> m ()
audioDecoderSetAllocationCaps a
dec Maybe Caps
allocationCaps = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr Caps
maybeAllocationCaps <- case Maybe Caps
allocationCaps of
Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just Caps
jAllocationCaps -> do
Ptr Caps
jAllocationCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jAllocationCaps
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jAllocationCaps'
Ptr AudioDecoder -> Ptr Caps -> IO ()
gst_audio_decoder_set_allocation_caps Ptr AudioDecoder
dec' Ptr Caps
maybeAllocationCaps
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
allocationCaps Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioDecoderSetAllocationCapsMethodInfo
instance (signature ~ (Maybe (Gst.Caps.Caps) -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetAllocationCapsMethodInfo a signature where
overloadedMethod = audioDecoderSetAllocationCaps
instance O.OverloadedMethodInfo AudioDecoderSetAllocationCapsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetAllocationCaps",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetAllocationCaps"
}
#endif
foreign import ccall "gst_audio_decoder_set_drainable" gst_audio_decoder_set_drainable ::
Ptr AudioDecoder ->
CInt ->
IO ()
audioDecoderSetDrainable ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Bool
-> m ()
audioDecoderSetDrainable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Bool -> m ()
audioDecoderSetDrainable a
dec 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
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 AudioDecoder -> CInt -> IO ()
gst_audio_decoder_set_drainable Ptr AudioDecoder
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 AudioDecoderSetDrainableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetDrainableMethodInfo a signature where
overloadedMethod = audioDecoderSetDrainable
instance O.OverloadedMethodInfo AudioDecoderSetDrainableMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetDrainable",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetDrainable"
}
#endif
foreign import ccall "gst_audio_decoder_set_estimate_rate" gst_audio_decoder_set_estimate_rate ::
Ptr AudioDecoder ->
CInt ->
IO ()
audioDecoderSetEstimateRate ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Bool
-> m ()
audioDecoderSetEstimateRate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Bool -> m ()
audioDecoderSetEstimateRate a
dec 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
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 AudioDecoder -> CInt -> IO ()
gst_audio_decoder_set_estimate_rate Ptr AudioDecoder
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 AudioDecoderSetEstimateRateMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetEstimateRateMethodInfo a signature where
overloadedMethod = audioDecoderSetEstimateRate
instance O.OverloadedMethodInfo AudioDecoderSetEstimateRateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetEstimateRate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetEstimateRate"
}
#endif
foreign import ccall "gst_audio_decoder_set_latency" gst_audio_decoder_set_latency ::
Ptr AudioDecoder ->
Word64 ->
Word64 ->
IO ()
audioDecoderSetLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Word64
-> Word64
-> m ()
audioDecoderSetLatency :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Word64 -> Word64 -> m ()
audioDecoderSetLatency a
dec Word64
min Word64
max = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr AudioDecoder -> Word64 -> Word64 -> IO ()
gst_audio_decoder_set_latency Ptr AudioDecoder
dec' Word64
min Word64
max
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 AudioDecoderSetLatencyMethodInfo
instance (signature ~ (Word64 -> Word64 -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetLatencyMethodInfo a signature where
overloadedMethod = audioDecoderSetLatency
instance O.OverloadedMethodInfo AudioDecoderSetLatencyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetLatency",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetLatency"
}
#endif
foreign import ccall "gst_audio_decoder_set_max_errors" gst_audio_decoder_set_max_errors ::
Ptr AudioDecoder ->
Int32 ->
IO ()
audioDecoderSetMaxErrors ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Int32
-> m ()
audioDecoderSetMaxErrors :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Int32 -> m ()
audioDecoderSetMaxErrors a
dec 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr AudioDecoder -> Int32 -> IO ()
gst_audio_decoder_set_max_errors Ptr AudioDecoder
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 AudioDecoderSetMaxErrorsMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetMaxErrorsMethodInfo a signature where
overloadedMethod = audioDecoderSetMaxErrors
instance O.OverloadedMethodInfo AudioDecoderSetMaxErrorsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetMaxErrors",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetMaxErrors"
}
#endif
foreign import ccall "gst_audio_decoder_set_min_latency" gst_audio_decoder_set_min_latency ::
Ptr AudioDecoder ->
Word64 ->
IO ()
audioDecoderSetMinLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Word64
-> m ()
audioDecoderSetMinLatency :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Word64 -> m ()
audioDecoderSetMinLatency a
dec Word64
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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr AudioDecoder -> Word64 -> IO ()
gst_audio_decoder_set_min_latency Ptr AudioDecoder
dec' Word64
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 AudioDecoderSetMinLatencyMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetMinLatencyMethodInfo a signature where
overloadedMethod = audioDecoderSetMinLatency
instance O.OverloadedMethodInfo AudioDecoderSetMinLatencyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetMinLatency",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetMinLatency"
}
#endif
foreign import ccall "gst_audio_decoder_set_needs_format" gst_audio_decoder_set_needs_format ::
Ptr AudioDecoder ->
CInt ->
IO ()
audioDecoderSetNeedsFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Bool
-> m ()
audioDecoderSetNeedsFormat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Bool -> m ()
audioDecoderSetNeedsFormat a
dec 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
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 AudioDecoder -> CInt -> IO ()
gst_audio_decoder_set_needs_format Ptr AudioDecoder
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 AudioDecoderSetNeedsFormatMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetNeedsFormatMethodInfo a signature where
overloadedMethod = audioDecoderSetNeedsFormat
instance O.OverloadedMethodInfo AudioDecoderSetNeedsFormatMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetNeedsFormat",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetNeedsFormat"
}
#endif
foreign import ccall "gst_audio_decoder_set_output_caps" gst_audio_decoder_set_output_caps ::
Ptr AudioDecoder ->
Ptr Gst.Caps.Caps ->
IO CInt
audioDecoderSetOutputCaps ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Gst.Caps.Caps
-> m Bool
audioDecoderSetOutputCaps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Caps -> m Bool
audioDecoderSetOutputCaps a
dec Caps
caps = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
CInt
result <- Ptr AudioDecoder -> Ptr Caps -> IO CInt
gst_audio_decoder_set_output_caps Ptr AudioDecoder
dec' Ptr Caps
caps'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderSetOutputCapsMethodInfo
instance (signature ~ (Gst.Caps.Caps -> m Bool), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetOutputCapsMethodInfo a signature where
overloadedMethod = audioDecoderSetOutputCaps
instance O.OverloadedMethodInfo AudioDecoderSetOutputCapsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetOutputCaps",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetOutputCaps"
}
#endif
foreign import ccall "gst_audio_decoder_set_output_format" gst_audio_decoder_set_output_format ::
Ptr AudioDecoder ->
Ptr GstAudio.AudioInfo.AudioInfo ->
IO CInt
audioDecoderSetOutputFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> GstAudio.AudioInfo.AudioInfo
-> m Bool
audioDecoderSetOutputFormat :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> AudioInfo -> m Bool
audioDecoderSetOutputFormat a
dec AudioInfo
info = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr AudioInfo
info' <- AudioInfo -> IO (Ptr AudioInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AudioInfo
info
CInt
result <- Ptr AudioDecoder -> Ptr AudioInfo -> IO CInt
gst_audio_decoder_set_output_format Ptr AudioDecoder
dec' Ptr AudioInfo
info'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dec
AudioInfo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr AudioInfo
info
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioDecoderSetOutputFormatMethodInfo
instance (signature ~ (GstAudio.AudioInfo.AudioInfo -> m Bool), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetOutputFormatMethodInfo a signature where
overloadedMethod = audioDecoderSetOutputFormat
instance O.OverloadedMethodInfo AudioDecoderSetOutputFormatMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetOutputFormat",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetOutputFormat"
}
#endif
foreign import ccall "gst_audio_decoder_set_plc" gst_audio_decoder_set_plc ::
Ptr AudioDecoder ->
CInt ->
IO ()
audioDecoderSetPlc ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Bool
-> m ()
audioDecoderSetPlc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Bool -> m ()
audioDecoderSetPlc a
dec 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
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 AudioDecoder -> CInt -> IO ()
gst_audio_decoder_set_plc Ptr AudioDecoder
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 AudioDecoderSetPlcMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetPlcMethodInfo a signature where
overloadedMethod = audioDecoderSetPlc
instance O.OverloadedMethodInfo AudioDecoderSetPlcMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetPlc",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetPlc"
}
#endif
foreign import ccall "gst_audio_decoder_set_plc_aware" gst_audio_decoder_set_plc_aware ::
Ptr AudioDecoder ->
CInt ->
IO ()
audioDecoderSetPlcAware ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Bool
-> m ()
audioDecoderSetPlcAware :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Bool -> m ()
audioDecoderSetPlcAware a
dec Bool
plc = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
let plc' :: CInt
plc' = (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
plc
Ptr AudioDecoder -> CInt -> IO ()
gst_audio_decoder_set_plc_aware Ptr AudioDecoder
dec' CInt
plc'
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 AudioDecoderSetPlcAwareMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetPlcAwareMethodInfo a signature where
overloadedMethod = audioDecoderSetPlcAware
instance O.OverloadedMethodInfo AudioDecoderSetPlcAwareMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetPlcAware",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetPlcAware"
}
#endif
foreign import ccall "gst_audio_decoder_set_tolerance" gst_audio_decoder_set_tolerance ::
Ptr AudioDecoder ->
Word64 ->
IO ()
audioDecoderSetTolerance ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Word64
-> m ()
audioDecoderSetTolerance :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Word64 -> m ()
audioDecoderSetTolerance a
dec Word64
tolerance = 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 AudioDecoder
dec' <- a -> IO (Ptr AudioDecoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dec
Ptr AudioDecoder -> Word64 -> IO ()
gst_audio_decoder_set_tolerance Ptr AudioDecoder
dec' Word64
tolerance
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 AudioDecoderSetToleranceMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetToleranceMethodInfo a signature where
overloadedMethod = audioDecoderSetTolerance
instance O.OverloadedMethodInfo AudioDecoderSetToleranceMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetTolerance",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetTolerance"
}
#endif
foreign import ccall "gst_audio_decoder_set_use_default_pad_acceptcaps" gst_audio_decoder_set_use_default_pad_acceptcaps ::
Ptr AudioDecoder ->
CInt ->
IO ()
audioDecoderSetUseDefaultPadAcceptcaps ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioDecoder a) =>
a
-> Bool
-> m ()
audioDecoderSetUseDefaultPadAcceptcaps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAudioDecoder a) =>
a -> Bool -> m ()
audioDecoderSetUseDefaultPadAcceptcaps a
decoder 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 AudioDecoder
decoder' <- a -> IO (Ptr AudioDecoder)
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 AudioDecoder -> CInt -> IO ()
gst_audio_decoder_set_use_default_pad_acceptcaps Ptr AudioDecoder
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 AudioDecoderSetUseDefaultPadAcceptcapsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioDecoder a) => O.OverloadedMethod AudioDecoderSetUseDefaultPadAcceptcapsMethodInfo a signature where
overloadedMethod = audioDecoderSetUseDefaultPadAcceptcaps
instance O.OverloadedMethodInfo AudioDecoderSetUseDefaultPadAcceptcapsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.GstAudio.Objects.AudioDecoder.audioDecoderSetUseDefaultPadAcceptcaps",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gstaudio-1.0.23/docs/GI-GstAudio-Objects-AudioDecoder.html#v:audioDecoderSetUseDefaultPadAcceptcaps"
}
#endif