{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstAudio.Objects.AudioEncoder
(
AudioEncoder(..) ,
IsAudioEncoder ,
toAudioEncoder ,
noAudioEncoder ,
#if defined(ENABLE_OVERLOADING)
ResolveAudioEncoderMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
AudioEncoderAllocateOutputBufferMethodInfo,
#endif
audioEncoderAllocateOutputBuffer ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderFinishFrameMethodInfo ,
#endif
audioEncoderFinishFrame ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetAllocatorMethodInfo ,
#endif
audioEncoderGetAllocator ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetAudioInfoMethodInfo ,
#endif
audioEncoderGetAudioInfo ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetDrainableMethodInfo ,
#endif
audioEncoderGetDrainable ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetFrameMaxMethodInfo ,
#endif
audioEncoderGetFrameMax ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetFrameSamplesMaxMethodInfo,
#endif
audioEncoderGetFrameSamplesMax ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetFrameSamplesMinMethodInfo,
#endif
audioEncoderGetFrameSamplesMin ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetHardMinMethodInfo ,
#endif
audioEncoderGetHardMin ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetHardResyncMethodInfo ,
#endif
audioEncoderGetHardResync ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetLatencyMethodInfo ,
#endif
audioEncoderGetLatency ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetLookaheadMethodInfo ,
#endif
audioEncoderGetLookahead ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetMarkGranuleMethodInfo ,
#endif
audioEncoderGetMarkGranule ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetPerfectTimestampMethodInfo,
#endif
audioEncoderGetPerfectTimestamp ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderGetToleranceMethodInfo ,
#endif
audioEncoderGetTolerance ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderMergeTagsMethodInfo ,
#endif
audioEncoderMergeTags ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderNegotiateMethodInfo ,
#endif
audioEncoderNegotiate ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderProxyGetcapsMethodInfo ,
#endif
audioEncoderProxyGetcaps ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetAllocationCapsMethodInfo ,
#endif
audioEncoderSetAllocationCaps ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetDrainableMethodInfo ,
#endif
audioEncoderSetDrainable ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetFrameMaxMethodInfo ,
#endif
audioEncoderSetFrameMax ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetFrameSamplesMaxMethodInfo,
#endif
audioEncoderSetFrameSamplesMax ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetFrameSamplesMinMethodInfo,
#endif
audioEncoderSetFrameSamplesMin ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetHardMinMethodInfo ,
#endif
audioEncoderSetHardMin ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetHardResyncMethodInfo ,
#endif
audioEncoderSetHardResync ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetHeadersMethodInfo ,
#endif
audioEncoderSetHeaders ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetLatencyMethodInfo ,
#endif
audioEncoderSetLatency ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetLookaheadMethodInfo ,
#endif
audioEncoderSetLookahead ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetMarkGranuleMethodInfo ,
#endif
audioEncoderSetMarkGranule ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetOutputFormatMethodInfo ,
#endif
audioEncoderSetOutputFormat ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetPerfectTimestampMethodInfo,
#endif
audioEncoderSetPerfectTimestamp ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderSetToleranceMethodInfo ,
#endif
audioEncoderSetTolerance ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderHardResyncPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
audioEncoderHardResync ,
#endif
constructAudioEncoderHardResync ,
getAudioEncoderHardResync ,
setAudioEncoderHardResync ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderMarkGranulePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
audioEncoderMarkGranule ,
#endif
getAudioEncoderMarkGranule ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderPerfectTimestampPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
audioEncoderPerfectTimestamp ,
#endif
constructAudioEncoderPerfectTimestamp ,
getAudioEncoderPerfectTimestamp ,
setAudioEncoderPerfectTimestamp ,
#if defined(ENABLE_OVERLOADING)
AudioEncoderTolerancePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
audioEncoderTolerance ,
#endif
constructAudioEncoderTolerance ,
getAudioEncoderTolerance ,
setAudioEncoderTolerance ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gst.Enums as Gst.Enums
import qualified GI.Gst.Interfaces.Preset as Gst.Preset
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 AudioEncoder = AudioEncoder (ManagedPtr AudioEncoder)
deriving (AudioEncoder -> AudioEncoder -> Bool
(AudioEncoder -> AudioEncoder -> Bool)
-> (AudioEncoder -> AudioEncoder -> Bool) -> Eq AudioEncoder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioEncoder -> AudioEncoder -> Bool
$c/= :: AudioEncoder -> AudioEncoder -> Bool
== :: AudioEncoder -> AudioEncoder -> Bool
$c== :: AudioEncoder -> AudioEncoder -> Bool
Eq)
foreign import ccall "gst_audio_encoder_get_type"
c_gst_audio_encoder_get_type :: IO GType
instance GObject AudioEncoder where
gobjectType :: IO GType
gobjectType = IO GType
c_gst_audio_encoder_get_type
instance B.GValue.IsGValue AudioEncoder where
toGValue :: AudioEncoder -> IO GValue
toGValue o :: AudioEncoder
o = do
GType
gtype <- IO GType
c_gst_audio_encoder_get_type
AudioEncoder -> (Ptr AudioEncoder -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AudioEncoder
o (GType
-> (GValue -> Ptr AudioEncoder -> IO ())
-> Ptr AudioEncoder
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr AudioEncoder -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO AudioEncoder
fromGValue gv :: GValue
gv = do
Ptr AudioEncoder
ptr <- GValue -> IO (Ptr AudioEncoder)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr AudioEncoder)
(ManagedPtr AudioEncoder -> AudioEncoder)
-> Ptr AudioEncoder -> IO AudioEncoder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AudioEncoder -> AudioEncoder
AudioEncoder Ptr AudioEncoder
ptr
class (GObject o, O.IsDescendantOf AudioEncoder o) => IsAudioEncoder o
instance (GObject o, O.IsDescendantOf AudioEncoder o) => IsAudioEncoder o
instance O.HasParentTypes AudioEncoder
type instance O.ParentTypes AudioEncoder = '[Gst.Element.Element, Gst.Object.Object, GObject.Object.Object, Gst.Preset.Preset]
toAudioEncoder :: (MonadIO m, IsAudioEncoder o) => o -> m AudioEncoder
toAudioEncoder :: o -> m AudioEncoder
toAudioEncoder = IO AudioEncoder -> m AudioEncoder
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AudioEncoder -> m AudioEncoder)
-> (o -> IO AudioEncoder) -> o -> m AudioEncoder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AudioEncoder -> AudioEncoder) -> o -> IO AudioEncoder
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr AudioEncoder -> AudioEncoder
AudioEncoder
noAudioEncoder :: Maybe AudioEncoder
noAudioEncoder :: Maybe AudioEncoder
noAudioEncoder = Maybe AudioEncoder
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAudioEncoderMethod (t :: Symbol) (o :: *) :: * where
ResolveAudioEncoderMethod "abortState" o = Gst.Element.ElementAbortStateMethodInfo
ResolveAudioEncoderMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
ResolveAudioEncoderMethod "addPad" o = Gst.Element.ElementAddPadMethodInfo
ResolveAudioEncoderMethod "addPropertyDeepNotifyWatch" o = Gst.Element.ElementAddPropertyDeepNotifyWatchMethodInfo
ResolveAudioEncoderMethod "addPropertyNotifyWatch" o = Gst.Element.ElementAddPropertyNotifyWatchMethodInfo
ResolveAudioEncoderMethod "allocateOutputBuffer" o = AudioEncoderAllocateOutputBufferMethodInfo
ResolveAudioEncoderMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAudioEncoderMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAudioEncoderMethod "callAsync" o = Gst.Element.ElementCallAsyncMethodInfo
ResolveAudioEncoderMethod "changeState" o = Gst.Element.ElementChangeStateMethodInfo
ResolveAudioEncoderMethod "continueState" o = Gst.Element.ElementContinueStateMethodInfo
ResolveAudioEncoderMethod "createAllPads" o = Gst.Element.ElementCreateAllPadsMethodInfo
ResolveAudioEncoderMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
ResolveAudioEncoderMethod "deletePreset" o = Gst.Preset.PresetDeletePresetMethodInfo
ResolveAudioEncoderMethod "finishFrame" o = AudioEncoderFinishFrameMethodInfo
ResolveAudioEncoderMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAudioEncoderMethod "foreachPad" o = Gst.Element.ElementForeachPadMethodInfo
ResolveAudioEncoderMethod "foreachSinkPad" o = Gst.Element.ElementForeachSinkPadMethodInfo
ResolveAudioEncoderMethod "foreachSrcPad" o = Gst.Element.ElementForeachSrcPadMethodInfo
ResolveAudioEncoderMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAudioEncoderMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAudioEncoderMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
ResolveAudioEncoderMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
ResolveAudioEncoderMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
ResolveAudioEncoderMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
ResolveAudioEncoderMethod "isEditable" o = Gst.Preset.PresetIsEditableMethodInfo
ResolveAudioEncoderMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAudioEncoderMethod "isLockedState" o = Gst.Element.ElementIsLockedStateMethodInfo
ResolveAudioEncoderMethod "iteratePads" o = Gst.Element.ElementIteratePadsMethodInfo
ResolveAudioEncoderMethod "iterateSinkPads" o = Gst.Element.ElementIterateSinkPadsMethodInfo
ResolveAudioEncoderMethod "iterateSrcPads" o = Gst.Element.ElementIterateSrcPadsMethodInfo
ResolveAudioEncoderMethod "link" o = Gst.Element.ElementLinkMethodInfo
ResolveAudioEncoderMethod "linkFiltered" o = Gst.Element.ElementLinkFilteredMethodInfo
ResolveAudioEncoderMethod "linkPads" o = Gst.Element.ElementLinkPadsMethodInfo
ResolveAudioEncoderMethod "linkPadsFiltered" o = Gst.Element.ElementLinkPadsFilteredMethodInfo
ResolveAudioEncoderMethod "linkPadsFull" o = Gst.Element.ElementLinkPadsFullMethodInfo
ResolveAudioEncoderMethod "loadPreset" o = Gst.Preset.PresetLoadPresetMethodInfo
ResolveAudioEncoderMethod "lostState" o = Gst.Element.ElementLostStateMethodInfo
ResolveAudioEncoderMethod "mergeTags" o = AudioEncoderMergeTagsMethodInfo
ResolveAudioEncoderMethod "messageFull" o = Gst.Element.ElementMessageFullMethodInfo
ResolveAudioEncoderMethod "messageFullWithDetails" o = Gst.Element.ElementMessageFullWithDetailsMethodInfo
ResolveAudioEncoderMethod "negotiate" o = AudioEncoderNegotiateMethodInfo
ResolveAudioEncoderMethod "noMorePads" o = Gst.Element.ElementNoMorePadsMethodInfo
ResolveAudioEncoderMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAudioEncoderMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAudioEncoderMethod "postMessage" o = Gst.Element.ElementPostMessageMethodInfo
ResolveAudioEncoderMethod "provideClock" o = Gst.Element.ElementProvideClockMethodInfo
ResolveAudioEncoderMethod "proxyGetcaps" o = AudioEncoderProxyGetcapsMethodInfo
ResolveAudioEncoderMethod "query" o = Gst.Element.ElementQueryMethodInfo
ResolveAudioEncoderMethod "queryConvert" o = Gst.Element.ElementQueryConvertMethodInfo
ResolveAudioEncoderMethod "queryDuration" o = Gst.Element.ElementQueryDurationMethodInfo
ResolveAudioEncoderMethod "queryPosition" o = Gst.Element.ElementQueryPositionMethodInfo
ResolveAudioEncoderMethod "ref" o = Gst.Object.ObjectRefMethodInfo
ResolveAudioEncoderMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAudioEncoderMethod "releaseRequestPad" o = Gst.Element.ElementReleaseRequestPadMethodInfo
ResolveAudioEncoderMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
ResolveAudioEncoderMethod "removePad" o = Gst.Element.ElementRemovePadMethodInfo
ResolveAudioEncoderMethod "removePropertyNotifyWatch" o = Gst.Element.ElementRemovePropertyNotifyWatchMethodInfo
ResolveAudioEncoderMethod "renamePreset" o = Gst.Preset.PresetRenamePresetMethodInfo
ResolveAudioEncoderMethod "requestPad" o = Gst.Element.ElementRequestPadMethodInfo
ResolveAudioEncoderMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAudioEncoderMethod "savePreset" o = Gst.Preset.PresetSavePresetMethodInfo
ResolveAudioEncoderMethod "seek" o = Gst.Element.ElementSeekMethodInfo
ResolveAudioEncoderMethod "seekSimple" o = Gst.Element.ElementSeekSimpleMethodInfo
ResolveAudioEncoderMethod "sendEvent" o = Gst.Element.ElementSendEventMethodInfo
ResolveAudioEncoderMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAudioEncoderMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAudioEncoderMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
ResolveAudioEncoderMethod "syncStateWithParent" o = Gst.Element.ElementSyncStateWithParentMethodInfo
ResolveAudioEncoderMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
ResolveAudioEncoderMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAudioEncoderMethod "unlink" o = Gst.Element.ElementUnlinkMethodInfo
ResolveAudioEncoderMethod "unlinkPads" o = Gst.Element.ElementUnlinkPadsMethodInfo
ResolveAudioEncoderMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
ResolveAudioEncoderMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
ResolveAudioEncoderMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAudioEncoderMethod "getAllocator" o = AudioEncoderGetAllocatorMethodInfo
ResolveAudioEncoderMethod "getAudioInfo" o = AudioEncoderGetAudioInfoMethodInfo
ResolveAudioEncoderMethod "getBaseTime" o = Gst.Element.ElementGetBaseTimeMethodInfo
ResolveAudioEncoderMethod "getBus" o = Gst.Element.ElementGetBusMethodInfo
ResolveAudioEncoderMethod "getClock" o = Gst.Element.ElementGetClockMethodInfo
ResolveAudioEncoderMethod "getCompatiblePad" o = Gst.Element.ElementGetCompatiblePadMethodInfo
ResolveAudioEncoderMethod "getCompatiblePadTemplate" o = Gst.Element.ElementGetCompatiblePadTemplateMethodInfo
ResolveAudioEncoderMethod "getContext" o = Gst.Element.ElementGetContextMethodInfo
ResolveAudioEncoderMethod "getContextUnlocked" o = Gst.Element.ElementGetContextUnlockedMethodInfo
ResolveAudioEncoderMethod "getContexts" o = Gst.Element.ElementGetContextsMethodInfo
ResolveAudioEncoderMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
ResolveAudioEncoderMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
ResolveAudioEncoderMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAudioEncoderMethod "getDrainable" o = AudioEncoderGetDrainableMethodInfo
ResolveAudioEncoderMethod "getFactory" o = Gst.Element.ElementGetFactoryMethodInfo
ResolveAudioEncoderMethod "getFrameMax" o = AudioEncoderGetFrameMaxMethodInfo
ResolveAudioEncoderMethod "getFrameSamplesMax" o = AudioEncoderGetFrameSamplesMaxMethodInfo
ResolveAudioEncoderMethod "getFrameSamplesMin" o = AudioEncoderGetFrameSamplesMinMethodInfo
ResolveAudioEncoderMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
ResolveAudioEncoderMethod "getHardMin" o = AudioEncoderGetHardMinMethodInfo
ResolveAudioEncoderMethod "getHardResync" o = AudioEncoderGetHardResyncMethodInfo
ResolveAudioEncoderMethod "getLatency" o = AudioEncoderGetLatencyMethodInfo
ResolveAudioEncoderMethod "getLookahead" o = AudioEncoderGetLookaheadMethodInfo
ResolveAudioEncoderMethod "getMarkGranule" o = AudioEncoderGetMarkGranuleMethodInfo
ResolveAudioEncoderMethod "getMeta" o = Gst.Preset.PresetGetMetaMethodInfo
ResolveAudioEncoderMethod "getMetadata" o = Gst.Element.ElementGetMetadataMethodInfo
ResolveAudioEncoderMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
ResolveAudioEncoderMethod "getPadTemplate" o = Gst.Element.ElementGetPadTemplateMethodInfo
ResolveAudioEncoderMethod "getPadTemplateList" o = Gst.Element.ElementGetPadTemplateListMethodInfo
ResolveAudioEncoderMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
ResolveAudioEncoderMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
ResolveAudioEncoderMethod "getPerfectTimestamp" o = AudioEncoderGetPerfectTimestampMethodInfo
ResolveAudioEncoderMethod "getPresetNames" o = Gst.Preset.PresetGetPresetNamesMethodInfo
ResolveAudioEncoderMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAudioEncoderMethod "getPropertyNames" o = Gst.Preset.PresetGetPropertyNamesMethodInfo
ResolveAudioEncoderMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAudioEncoderMethod "getRequestPad" o = Gst.Element.ElementGetRequestPadMethodInfo
ResolveAudioEncoderMethod "getStartTime" o = Gst.Element.ElementGetStartTimeMethodInfo
ResolveAudioEncoderMethod "getState" o = Gst.Element.ElementGetStateMethodInfo
ResolveAudioEncoderMethod "getStaticPad" o = Gst.Element.ElementGetStaticPadMethodInfo
ResolveAudioEncoderMethod "getTolerance" o = AudioEncoderGetToleranceMethodInfo
ResolveAudioEncoderMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
ResolveAudioEncoderMethod "setAllocationCaps" o = AudioEncoderSetAllocationCapsMethodInfo
ResolveAudioEncoderMethod "setBaseTime" o = Gst.Element.ElementSetBaseTimeMethodInfo
ResolveAudioEncoderMethod "setBus" o = Gst.Element.ElementSetBusMethodInfo
ResolveAudioEncoderMethod "setClock" o = Gst.Element.ElementSetClockMethodInfo
ResolveAudioEncoderMethod "setContext" o = Gst.Element.ElementSetContextMethodInfo
ResolveAudioEncoderMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
ResolveAudioEncoderMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
ResolveAudioEncoderMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
ResolveAudioEncoderMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAudioEncoderMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAudioEncoderMethod "setDrainable" o = AudioEncoderSetDrainableMethodInfo
ResolveAudioEncoderMethod "setFrameMax" o = AudioEncoderSetFrameMaxMethodInfo
ResolveAudioEncoderMethod "setFrameSamplesMax" o = AudioEncoderSetFrameSamplesMaxMethodInfo
ResolveAudioEncoderMethod "setFrameSamplesMin" o = AudioEncoderSetFrameSamplesMinMethodInfo
ResolveAudioEncoderMethod "setHardMin" o = AudioEncoderSetHardMinMethodInfo
ResolveAudioEncoderMethod "setHardResync" o = AudioEncoderSetHardResyncMethodInfo
ResolveAudioEncoderMethod "setHeaders" o = AudioEncoderSetHeadersMethodInfo
ResolveAudioEncoderMethod "setLatency" o = AudioEncoderSetLatencyMethodInfo
ResolveAudioEncoderMethod "setLockedState" o = Gst.Element.ElementSetLockedStateMethodInfo
ResolveAudioEncoderMethod "setLookahead" o = AudioEncoderSetLookaheadMethodInfo
ResolveAudioEncoderMethod "setMarkGranule" o = AudioEncoderSetMarkGranuleMethodInfo
ResolveAudioEncoderMethod "setMeta" o = Gst.Preset.PresetSetMetaMethodInfo
ResolveAudioEncoderMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
ResolveAudioEncoderMethod "setOutputFormat" o = AudioEncoderSetOutputFormatMethodInfo
ResolveAudioEncoderMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
ResolveAudioEncoderMethod "setPerfectTimestamp" o = AudioEncoderSetPerfectTimestampMethodInfo
ResolveAudioEncoderMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAudioEncoderMethod "setStartTime" o = Gst.Element.ElementSetStartTimeMethodInfo
ResolveAudioEncoderMethod "setState" o = Gst.Element.ElementSetStateMethodInfo
ResolveAudioEncoderMethod "setTolerance" o = AudioEncoderSetToleranceMethodInfo
ResolveAudioEncoderMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAudioEncoderMethod t AudioEncoder, O.MethodInfo info AudioEncoder p) => OL.IsLabel t (AudioEncoder -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
getAudioEncoderHardResync :: (MonadIO m, IsAudioEncoder o) => o -> m Bool
getAudioEncoderHardResync :: o -> m Bool
getAudioEncoderHardResync obj :: o
obj = 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
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "hard-resync"
setAudioEncoderHardResync :: (MonadIO m, IsAudioEncoder o) => o -> Bool -> m ()
setAudioEncoderHardResync :: o -> Bool -> m ()
setAudioEncoderHardResync obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj "hard-resync" Bool
val
constructAudioEncoderHardResync :: (IsAudioEncoder o) => Bool -> IO (GValueConstruct o)
constructAudioEncoderHardResync :: Bool -> IO (GValueConstruct o)
constructAudioEncoderHardResync val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "hard-resync" Bool
val
#if defined(ENABLE_OVERLOADING)
data AudioEncoderHardResyncPropertyInfo
instance AttrInfo AudioEncoderHardResyncPropertyInfo where
type AttrAllowedOps AudioEncoderHardResyncPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AudioEncoderHardResyncPropertyInfo = IsAudioEncoder
type AttrSetTypeConstraint AudioEncoderHardResyncPropertyInfo = (~) Bool
type AttrTransferTypeConstraint AudioEncoderHardResyncPropertyInfo = (~) Bool
type AttrTransferType AudioEncoderHardResyncPropertyInfo = Bool
type AttrGetType AudioEncoderHardResyncPropertyInfo = Bool
type AttrLabel AudioEncoderHardResyncPropertyInfo = "hard-resync"
type AttrOrigin AudioEncoderHardResyncPropertyInfo = AudioEncoder
attrGet = getAudioEncoderHardResync
attrSet = setAudioEncoderHardResync
attrTransfer _ v = do
return v
attrConstruct = constructAudioEncoderHardResync
attrClear = undefined
#endif
getAudioEncoderMarkGranule :: (MonadIO m, IsAudioEncoder o) => o -> m Bool
getAudioEncoderMarkGranule :: o -> m Bool
getAudioEncoderMarkGranule obj :: o
obj = 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
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "mark-granule"
#if defined(ENABLE_OVERLOADING)
data AudioEncoderMarkGranulePropertyInfo
instance AttrInfo AudioEncoderMarkGranulePropertyInfo where
type AttrAllowedOps AudioEncoderMarkGranulePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint AudioEncoderMarkGranulePropertyInfo = IsAudioEncoder
type AttrSetTypeConstraint AudioEncoderMarkGranulePropertyInfo = (~) ()
type AttrTransferTypeConstraint AudioEncoderMarkGranulePropertyInfo = (~) ()
type AttrTransferType AudioEncoderMarkGranulePropertyInfo = ()
type AttrGetType AudioEncoderMarkGranulePropertyInfo = Bool
type AttrLabel AudioEncoderMarkGranulePropertyInfo = "mark-granule"
type AttrOrigin AudioEncoderMarkGranulePropertyInfo = AudioEncoder
attrGet = getAudioEncoderMarkGranule
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getAudioEncoderPerfectTimestamp :: (MonadIO m, IsAudioEncoder o) => o -> m Bool
getAudioEncoderPerfectTimestamp :: o -> m Bool
getAudioEncoderPerfectTimestamp obj :: o
obj = 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
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "perfect-timestamp"
setAudioEncoderPerfectTimestamp :: (MonadIO m, IsAudioEncoder o) => o -> Bool -> m ()
setAudioEncoderPerfectTimestamp :: o -> Bool -> m ()
setAudioEncoderPerfectTimestamp obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj "perfect-timestamp" Bool
val
constructAudioEncoderPerfectTimestamp :: (IsAudioEncoder o) => Bool -> IO (GValueConstruct o)
constructAudioEncoderPerfectTimestamp :: Bool -> IO (GValueConstruct o)
constructAudioEncoderPerfectTimestamp val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "perfect-timestamp" Bool
val
#if defined(ENABLE_OVERLOADING)
data AudioEncoderPerfectTimestampPropertyInfo
instance AttrInfo AudioEncoderPerfectTimestampPropertyInfo where
type AttrAllowedOps AudioEncoderPerfectTimestampPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AudioEncoderPerfectTimestampPropertyInfo = IsAudioEncoder
type AttrSetTypeConstraint AudioEncoderPerfectTimestampPropertyInfo = (~) Bool
type AttrTransferTypeConstraint AudioEncoderPerfectTimestampPropertyInfo = (~) Bool
type AttrTransferType AudioEncoderPerfectTimestampPropertyInfo = Bool
type AttrGetType AudioEncoderPerfectTimestampPropertyInfo = Bool
type AttrLabel AudioEncoderPerfectTimestampPropertyInfo = "perfect-timestamp"
type AttrOrigin AudioEncoderPerfectTimestampPropertyInfo = AudioEncoder
attrGet = getAudioEncoderPerfectTimestamp
attrSet = setAudioEncoderPerfectTimestamp
attrTransfer _ v = do
return v
attrConstruct = constructAudioEncoderPerfectTimestamp
attrClear = undefined
#endif
getAudioEncoderTolerance :: (MonadIO m, IsAudioEncoder o) => o -> m Int64
getAudioEncoderTolerance :: o -> m Int64
getAudioEncoderTolerance obj :: o
obj = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int64
forall a. GObject a => a -> String -> IO Int64
B.Properties.getObjectPropertyInt64 o
obj "tolerance"
setAudioEncoderTolerance :: (MonadIO m, IsAudioEncoder o) => o -> Int64 -> m ()
setAudioEncoderTolerance :: o -> Int64 -> m ()
setAudioEncoderTolerance obj :: o
obj val :: Int64
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Int64 -> IO ()
forall a. GObject a => a -> String -> Int64 -> IO ()
B.Properties.setObjectPropertyInt64 o
obj "tolerance" Int64
val
constructAudioEncoderTolerance :: (IsAudioEncoder o) => Int64 -> IO (GValueConstruct o)
constructAudioEncoderTolerance :: Int64 -> IO (GValueConstruct o)
constructAudioEncoderTolerance val :: Int64
val = String -> Int64 -> IO (GValueConstruct o)
forall o. String -> Int64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt64 "tolerance" Int64
val
#if defined(ENABLE_OVERLOADING)
data AudioEncoderTolerancePropertyInfo
instance AttrInfo AudioEncoderTolerancePropertyInfo where
type AttrAllowedOps AudioEncoderTolerancePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint AudioEncoderTolerancePropertyInfo = IsAudioEncoder
type AttrSetTypeConstraint AudioEncoderTolerancePropertyInfo = (~) Int64
type AttrTransferTypeConstraint AudioEncoderTolerancePropertyInfo = (~) Int64
type AttrTransferType AudioEncoderTolerancePropertyInfo = Int64
type AttrGetType AudioEncoderTolerancePropertyInfo = Int64
type AttrLabel AudioEncoderTolerancePropertyInfo = "tolerance"
type AttrOrigin AudioEncoderTolerancePropertyInfo = AudioEncoder
attrGet = getAudioEncoderTolerance
attrSet = setAudioEncoderTolerance
attrTransfer _ v = do
return v
attrConstruct = constructAudioEncoderTolerance
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AudioEncoder
type instance O.AttributeList AudioEncoder = AudioEncoderAttributeList
type AudioEncoderAttributeList = ('[ '("hardResync", AudioEncoderHardResyncPropertyInfo), '("markGranule", AudioEncoderMarkGranulePropertyInfo), '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("perfectTimestamp", AudioEncoderPerfectTimestampPropertyInfo), '("tolerance", AudioEncoderTolerancePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
audioEncoderHardResync :: AttrLabelProxy "hardResync"
audioEncoderHardResync = AttrLabelProxy
audioEncoderMarkGranule :: AttrLabelProxy "markGranule"
audioEncoderMarkGranule = AttrLabelProxy
audioEncoderPerfectTimestamp :: AttrLabelProxy "perfectTimestamp"
audioEncoderPerfectTimestamp = AttrLabelProxy
audioEncoderTolerance :: AttrLabelProxy "tolerance"
audioEncoderTolerance = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AudioEncoder = AudioEncoderSignalList
type AudioEncoderSignalList = ('[ '("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_encoder_allocate_output_buffer" gst_audio_encoder_allocate_output_buffer ::
Ptr AudioEncoder ->
Word64 ->
IO (Ptr Gst.Buffer.Buffer)
audioEncoderAllocateOutputBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Word64
-> m Gst.Buffer.Buffer
audioEncoderAllocateOutputBuffer :: a -> Word64 -> m Buffer
audioEncoderAllocateOutputBuffer enc :: a
enc size :: 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr Buffer
result <- Ptr AudioEncoder -> Word64 -> IO (Ptr Buffer)
gst_audio_encoder_allocate_output_buffer Ptr AudioEncoder
enc' Word64
size
Text -> Ptr Buffer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "audioEncoderAllocateOutputBuffer" Ptr Buffer
result
Buffer
result' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderAllocateOutputBufferMethodInfo
instance (signature ~ (Word64 -> m Gst.Buffer.Buffer), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderAllocateOutputBufferMethodInfo a signature where
overloadedMethod = audioEncoderAllocateOutputBuffer
#endif
foreign import ccall "gst_audio_encoder_finish_frame" gst_audio_encoder_finish_frame ::
Ptr AudioEncoder ->
Ptr Gst.Buffer.Buffer ->
Int32 ->
IO CInt
audioEncoderFinishFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Gst.Buffer.Buffer
-> Int32
-> m Gst.Enums.FlowReturn
audioEncoderFinishFrame :: a -> Buffer -> Int32 -> m FlowReturn
audioEncoderFinishFrame enc :: a
enc buffer :: Buffer
buffer samples :: Int32
samples = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr Buffer
buffer' <- Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Buffer
buffer
CInt
result <- Ptr AudioEncoder -> Ptr Buffer -> Int32 -> IO CInt
gst_audio_encoder_finish_frame Ptr AudioEncoder
enc' Ptr Buffer
buffer' Int32
samples
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
enc
Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Buffer
buffer
FlowReturn -> IO FlowReturn
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderFinishFrameMethodInfo
instance (signature ~ (Gst.Buffer.Buffer -> Int32 -> m Gst.Enums.FlowReturn), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderFinishFrameMethodInfo a signature where
overloadedMethod = audioEncoderFinishFrame
#endif
foreign import ccall "gst_audio_encoder_get_allocator" gst_audio_encoder_get_allocator ::
Ptr AudioEncoder ->
Ptr (Ptr Gst.Allocator.Allocator) ->
Ptr Gst.AllocationParams.AllocationParams ->
IO ()
audioEncoderGetAllocator ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))
audioEncoderGetAllocator :: a -> m (Allocator, AllocationParams)
audioEncoderGetAllocator enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr (Ptr Allocator)
allocator <- IO (Ptr (Ptr Allocator))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr Gst.Allocator.Allocator))
Ptr AllocationParams
params <- Int -> IO (Ptr AllocationParams)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 64 :: IO (Ptr Gst.AllocationParams.AllocationParams)
Ptr AudioEncoder
-> Ptr (Ptr Allocator) -> Ptr AllocationParams -> IO ()
gst_audio_encoder_get_allocator Ptr AudioEncoder
enc' Ptr (Ptr Allocator)
allocator Ptr AllocationParams
params
Ptr Allocator
allocator' <- Ptr (Ptr Allocator) -> IO (Ptr Allocator)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Allocator)
allocator
Allocator
allocator'' <- ((ManagedPtr Allocator -> Allocator)
-> Ptr Allocator -> IO Allocator
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Allocator -> Allocator
Gst.Allocator.Allocator) Ptr Allocator
allocator'
AllocationParams
params' <- ((ManagedPtr AllocationParams -> AllocationParams)
-> Ptr AllocationParams -> IO AllocationParams
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr AllocationParams -> AllocationParams
Gst.AllocationParams.AllocationParams) Ptr AllocationParams
params
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
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 AudioEncoderGetAllocatorMethodInfo
instance (signature ~ (m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetAllocatorMethodInfo a signature where
overloadedMethod = audioEncoderGetAllocator
#endif
foreign import ccall "gst_audio_encoder_get_audio_info" gst_audio_encoder_get_audio_info ::
Ptr AudioEncoder ->
IO (Ptr GstAudio.AudioInfo.AudioInfo)
audioEncoderGetAudioInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m GstAudio.AudioInfo.AudioInfo
audioEncoderGetAudioInfo :: a -> m AudioInfo
audioEncoderGetAudioInfo enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr AudioInfo
result <- Ptr AudioEncoder -> IO (Ptr AudioInfo)
gst_audio_encoder_get_audio_info Ptr AudioEncoder
enc'
Text -> Ptr AudioInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "audioEncoderGetAudioInfo" Ptr AudioInfo
result
AudioInfo
result' <- ((ManagedPtr AudioInfo -> AudioInfo)
-> Ptr AudioInfo -> IO AudioInfo
forall a.
(HasCallStack, BoxedObject 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
enc
AudioInfo -> IO AudioInfo
forall (m :: * -> *) a. Monad m => a -> m a
return AudioInfo
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetAudioInfoMethodInfo
instance (signature ~ (m GstAudio.AudioInfo.AudioInfo), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetAudioInfoMethodInfo a signature where
overloadedMethod = audioEncoderGetAudioInfo
#endif
foreign import ccall "gst_audio_encoder_get_drainable" gst_audio_encoder_get_drainable ::
Ptr AudioEncoder ->
IO CInt
audioEncoderGetDrainable ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Bool
audioEncoderGetDrainable :: a -> m Bool
audioEncoderGetDrainable enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
CInt
result <- Ptr AudioEncoder -> IO CInt
gst_audio_encoder_get_drainable Ptr AudioEncoder
enc'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetDrainableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetDrainableMethodInfo a signature where
overloadedMethod = audioEncoderGetDrainable
#endif
foreign import ccall "gst_audio_encoder_get_frame_max" gst_audio_encoder_get_frame_max ::
Ptr AudioEncoder ->
IO Int32
audioEncoderGetFrameMax ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Int32
audioEncoderGetFrameMax :: a -> m Int32
audioEncoderGetFrameMax enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Int32
result <- Ptr AudioEncoder -> IO Int32
gst_audio_encoder_get_frame_max Ptr AudioEncoder
enc'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetFrameMaxMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetFrameMaxMethodInfo a signature where
overloadedMethod = audioEncoderGetFrameMax
#endif
foreign import ccall "gst_audio_encoder_get_frame_samples_max" gst_audio_encoder_get_frame_samples_max ::
Ptr AudioEncoder ->
IO Int32
audioEncoderGetFrameSamplesMax ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Int32
audioEncoderGetFrameSamplesMax :: a -> m Int32
audioEncoderGetFrameSamplesMax enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Int32
result <- Ptr AudioEncoder -> IO Int32
gst_audio_encoder_get_frame_samples_max Ptr AudioEncoder
enc'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetFrameSamplesMaxMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetFrameSamplesMaxMethodInfo a signature where
overloadedMethod = audioEncoderGetFrameSamplesMax
#endif
foreign import ccall "gst_audio_encoder_get_frame_samples_min" gst_audio_encoder_get_frame_samples_min ::
Ptr AudioEncoder ->
IO Int32
audioEncoderGetFrameSamplesMin ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Int32
audioEncoderGetFrameSamplesMin :: a -> m Int32
audioEncoderGetFrameSamplesMin enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Int32
result <- Ptr AudioEncoder -> IO Int32
gst_audio_encoder_get_frame_samples_min Ptr AudioEncoder
enc'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetFrameSamplesMinMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetFrameSamplesMinMethodInfo a signature where
overloadedMethod = audioEncoderGetFrameSamplesMin
#endif
foreign import ccall "gst_audio_encoder_get_hard_min" gst_audio_encoder_get_hard_min ::
Ptr AudioEncoder ->
IO CInt
audioEncoderGetHardMin ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Bool
audioEncoderGetHardMin :: a -> m Bool
audioEncoderGetHardMin enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
CInt
result <- Ptr AudioEncoder -> IO CInt
gst_audio_encoder_get_hard_min Ptr AudioEncoder
enc'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetHardMinMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetHardMinMethodInfo a signature where
overloadedMethod = audioEncoderGetHardMin
#endif
foreign import ccall "gst_audio_encoder_get_hard_resync" gst_audio_encoder_get_hard_resync ::
Ptr AudioEncoder ->
IO CInt
audioEncoderGetHardResync ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Bool
audioEncoderGetHardResync :: a -> m Bool
audioEncoderGetHardResync enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
CInt
result <- Ptr AudioEncoder -> IO CInt
gst_audio_encoder_get_hard_resync Ptr AudioEncoder
enc'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetHardResyncMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetHardResyncMethodInfo a signature where
overloadedMethod = audioEncoderGetHardResync
#endif
foreign import ccall "gst_audio_encoder_get_latency" gst_audio_encoder_get_latency ::
Ptr AudioEncoder ->
Ptr Word64 ->
Ptr Word64 ->
IO ()
audioEncoderGetLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m ((Word64, Word64))
audioEncoderGetLatency :: a -> m (Word64, Word64)
audioEncoderGetLatency enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
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 AudioEncoder -> Ptr Word64 -> Ptr Word64 -> IO ()
gst_audio_encoder_get_latency Ptr AudioEncoder
enc' 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
enc
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 AudioEncoderGetLatencyMethodInfo
instance (signature ~ (m ((Word64, Word64))), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetLatencyMethodInfo a signature where
overloadedMethod = audioEncoderGetLatency
#endif
foreign import ccall "gst_audio_encoder_get_lookahead" gst_audio_encoder_get_lookahead ::
Ptr AudioEncoder ->
IO Int32
audioEncoderGetLookahead ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Int32
audioEncoderGetLookahead :: a -> m Int32
audioEncoderGetLookahead enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Int32
result <- Ptr AudioEncoder -> IO Int32
gst_audio_encoder_get_lookahead Ptr AudioEncoder
enc'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetLookaheadMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetLookaheadMethodInfo a signature where
overloadedMethod = audioEncoderGetLookahead
#endif
foreign import ccall "gst_audio_encoder_get_mark_granule" gst_audio_encoder_get_mark_granule ::
Ptr AudioEncoder ->
IO CInt
audioEncoderGetMarkGranule ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Bool
audioEncoderGetMarkGranule :: a -> m Bool
audioEncoderGetMarkGranule enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
CInt
result <- Ptr AudioEncoder -> IO CInt
gst_audio_encoder_get_mark_granule Ptr AudioEncoder
enc'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetMarkGranuleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetMarkGranuleMethodInfo a signature where
overloadedMethod = audioEncoderGetMarkGranule
#endif
foreign import ccall "gst_audio_encoder_get_perfect_timestamp" gst_audio_encoder_get_perfect_timestamp ::
Ptr AudioEncoder ->
IO CInt
audioEncoderGetPerfectTimestamp ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Bool
audioEncoderGetPerfectTimestamp :: a -> m Bool
audioEncoderGetPerfectTimestamp enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
CInt
result <- Ptr AudioEncoder -> IO CInt
gst_audio_encoder_get_perfect_timestamp Ptr AudioEncoder
enc'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetPerfectTimestampMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetPerfectTimestampMethodInfo a signature where
overloadedMethod = audioEncoderGetPerfectTimestamp
#endif
foreign import ccall "gst_audio_encoder_get_tolerance" gst_audio_encoder_get_tolerance ::
Ptr AudioEncoder ->
IO Word64
audioEncoderGetTolerance ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Word64
audioEncoderGetTolerance :: a -> m Word64
audioEncoderGetTolerance enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Word64
result <- Ptr AudioEncoder -> IO Word64
gst_audio_encoder_get_tolerance Ptr AudioEncoder
enc'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data AudioEncoderGetToleranceMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderGetToleranceMethodInfo a signature where
overloadedMethod = audioEncoderGetTolerance
#endif
foreign import ccall "gst_audio_encoder_merge_tags" gst_audio_encoder_merge_tags ::
Ptr AudioEncoder ->
Ptr Gst.TagList.TagList ->
CUInt ->
IO ()
audioEncoderMergeTags ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Maybe (Gst.TagList.TagList)
-> Gst.Enums.TagMergeMode
-> m ()
audioEncoderMergeTags :: a -> Maybe TagList -> TagMergeMode -> m ()
audioEncoderMergeTags enc :: a
enc tags :: Maybe TagList
tags mode :: TagMergeMode
mode = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr TagList
maybeTags <- case Maybe TagList
tags of
Nothing -> Ptr TagList -> IO (Ptr TagList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TagList
forall a. Ptr a
nullPtr
Just jTags :: TagList
jTags -> do
Ptr TagList
jTags' <- TagList -> IO (Ptr TagList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TagList
jTags
Ptr TagList -> IO (Ptr TagList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TagList
jTags'
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (TagMergeMode -> Int) -> TagMergeMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TagMergeMode -> Int
forall a. Enum a => a -> Int
fromEnum) TagMergeMode
mode
Ptr AudioEncoder -> Ptr TagList -> CUInt -> IO ()
gst_audio_encoder_merge_tags Ptr AudioEncoder
enc' Ptr TagList
maybeTags CUInt
mode'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
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 AudioEncoderMergeTagsMethodInfo
instance (signature ~ (Maybe (Gst.TagList.TagList) -> Gst.Enums.TagMergeMode -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderMergeTagsMethodInfo a signature where
overloadedMethod = audioEncoderMergeTags
#endif
foreign import ccall "gst_audio_encoder_negotiate" gst_audio_encoder_negotiate ::
Ptr AudioEncoder ->
IO CInt
audioEncoderNegotiate ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> m Bool
audioEncoderNegotiate :: a -> m Bool
audioEncoderNegotiate enc :: a
enc = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
CInt
result <- Ptr AudioEncoder -> IO CInt
gst_audio_encoder_negotiate Ptr AudioEncoder
enc'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data AudioEncoderNegotiateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderNegotiateMethodInfo a signature where
overloadedMethod = audioEncoderNegotiate
#endif
foreign import ccall "gst_audio_encoder_proxy_getcaps" gst_audio_encoder_proxy_getcaps ::
Ptr AudioEncoder ->
Ptr Gst.Caps.Caps ->
Ptr Gst.Caps.Caps ->
IO (Ptr Gst.Caps.Caps)
audioEncoderProxyGetcaps ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Maybe (Gst.Caps.Caps)
-> Maybe (Gst.Caps.Caps)
-> m Gst.Caps.Caps
audioEncoderProxyGetcaps :: a -> Maybe Caps -> Maybe Caps -> m Caps
audioEncoderProxyGetcaps enc :: a
enc caps :: Maybe Caps
caps filter :: Maybe Caps
filter = IO Caps -> m Caps
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr Caps
maybeCaps <- case Maybe Caps
caps of
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just jCaps :: Caps
jCaps -> do
Ptr Caps
jCaps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jCaps
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jCaps'
Ptr Caps
maybeFilter <- case Maybe Caps
filter of
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just jFilter :: Caps
jFilter -> do
Ptr Caps
jFilter' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
jFilter
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jFilter'
Ptr Caps
result <- Ptr AudioEncoder -> Ptr Caps -> Ptr Caps -> IO (Ptr Caps)
gst_audio_encoder_proxy_getcaps Ptr AudioEncoder
enc' Ptr Caps
maybeCaps Ptr Caps
maybeFilter
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "audioEncoderProxyGetcaps" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
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 AudioEncoderProxyGetcapsMethodInfo
instance (signature ~ (Maybe (Gst.Caps.Caps) -> Maybe (Gst.Caps.Caps) -> m Gst.Caps.Caps), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderProxyGetcapsMethodInfo a signature where
overloadedMethod = audioEncoderProxyGetcaps
#endif
foreign import ccall "gst_audio_encoder_set_allocation_caps" gst_audio_encoder_set_allocation_caps ::
Ptr AudioEncoder ->
Ptr Gst.Caps.Caps ->
IO ()
audioEncoderSetAllocationCaps ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Maybe (Gst.Caps.Caps)
-> m ()
audioEncoderSetAllocationCaps :: a -> Maybe Caps -> m ()
audioEncoderSetAllocationCaps enc :: a
enc allocationCaps :: 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr Caps
maybeAllocationCaps <- case Maybe Caps
allocationCaps of
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just jAllocationCaps :: 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 AudioEncoder -> Ptr Caps -> IO ()
gst_audio_encoder_set_allocation_caps Ptr AudioEncoder
enc' Ptr Caps
maybeAllocationCaps
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
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 AudioEncoderSetAllocationCapsMethodInfo
instance (signature ~ (Maybe (Gst.Caps.Caps) -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetAllocationCapsMethodInfo a signature where
overloadedMethod = audioEncoderSetAllocationCaps
#endif
foreign import ccall "gst_audio_encoder_set_drainable" gst_audio_encoder_set_drainable ::
Ptr AudioEncoder ->
CInt ->
IO ()
audioEncoderSetDrainable ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Bool
-> m ()
audioEncoderSetDrainable :: a -> Bool -> m ()
audioEncoderSetDrainable enc :: a
enc enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
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 AudioEncoder -> CInt -> IO ()
gst_audio_encoder_set_drainable Ptr AudioEncoder
enc' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetDrainableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetDrainableMethodInfo a signature where
overloadedMethod = audioEncoderSetDrainable
#endif
foreign import ccall "gst_audio_encoder_set_frame_max" gst_audio_encoder_set_frame_max ::
Ptr AudioEncoder ->
Int32 ->
IO ()
audioEncoderSetFrameMax ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Int32
-> m ()
audioEncoderSetFrameMax :: a -> Int32 -> m ()
audioEncoderSetFrameMax enc :: a
enc num :: Int32
num = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr AudioEncoder -> Int32 -> IO ()
gst_audio_encoder_set_frame_max Ptr AudioEncoder
enc' Int32
num
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetFrameMaxMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetFrameMaxMethodInfo a signature where
overloadedMethod = audioEncoderSetFrameMax
#endif
foreign import ccall "gst_audio_encoder_set_frame_samples_max" gst_audio_encoder_set_frame_samples_max ::
Ptr AudioEncoder ->
Int32 ->
IO ()
audioEncoderSetFrameSamplesMax ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Int32
-> m ()
audioEncoderSetFrameSamplesMax :: a -> Int32 -> m ()
audioEncoderSetFrameSamplesMax enc :: a
enc num :: Int32
num = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr AudioEncoder -> Int32 -> IO ()
gst_audio_encoder_set_frame_samples_max Ptr AudioEncoder
enc' Int32
num
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetFrameSamplesMaxMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetFrameSamplesMaxMethodInfo a signature where
overloadedMethod = audioEncoderSetFrameSamplesMax
#endif
foreign import ccall "gst_audio_encoder_set_frame_samples_min" gst_audio_encoder_set_frame_samples_min ::
Ptr AudioEncoder ->
Int32 ->
IO ()
audioEncoderSetFrameSamplesMin ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Int32
-> m ()
audioEncoderSetFrameSamplesMin :: a -> Int32 -> m ()
audioEncoderSetFrameSamplesMin enc :: a
enc num :: Int32
num = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr AudioEncoder -> Int32 -> IO ()
gst_audio_encoder_set_frame_samples_min Ptr AudioEncoder
enc' Int32
num
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetFrameSamplesMinMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetFrameSamplesMinMethodInfo a signature where
overloadedMethod = audioEncoderSetFrameSamplesMin
#endif
foreign import ccall "gst_audio_encoder_set_hard_min" gst_audio_encoder_set_hard_min ::
Ptr AudioEncoder ->
CInt ->
IO ()
audioEncoderSetHardMin ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Bool
-> m ()
audioEncoderSetHardMin :: a -> Bool -> m ()
audioEncoderSetHardMin enc :: a
enc enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
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 AudioEncoder -> CInt -> IO ()
gst_audio_encoder_set_hard_min Ptr AudioEncoder
enc' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetHardMinMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetHardMinMethodInfo a signature where
overloadedMethod = audioEncoderSetHardMin
#endif
foreign import ccall "gst_audio_encoder_set_hard_resync" gst_audio_encoder_set_hard_resync ::
Ptr AudioEncoder ->
CInt ->
IO ()
audioEncoderSetHardResync ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Bool
-> m ()
audioEncoderSetHardResync :: a -> Bool -> m ()
audioEncoderSetHardResync enc :: a
enc enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
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 AudioEncoder -> CInt -> IO ()
gst_audio_encoder_set_hard_resync Ptr AudioEncoder
enc' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetHardResyncMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetHardResyncMethodInfo a signature where
overloadedMethod = audioEncoderSetHardResync
#endif
foreign import ccall "gst_audio_encoder_set_headers" ::
Ptr AudioEncoder ->
Ptr (GList (Ptr Gst.Buffer.Buffer)) ->
IO ()
audioEncoderSetHeaders ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> [Gst.Buffer.Buffer]
-> m ()
enc :: a
enc headers :: [Buffer]
headers = 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
[Ptr Buffer]
headers' <- (Buffer -> IO (Ptr Buffer)) -> [Buffer] -> IO [Ptr Buffer]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, BoxedObject a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed [Buffer]
headers
Ptr (GList (Ptr Buffer))
headers'' <- [Ptr Buffer] -> IO (Ptr (GList (Ptr Buffer)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr Buffer]
headers'
Ptr AudioEncoder -> Ptr (GList (Ptr Buffer)) -> IO ()
gst_audio_encoder_set_headers Ptr AudioEncoder
enc' Ptr (GList (Ptr Buffer))
headers''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
(Buffer -> IO ()) -> [Buffer] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Buffer -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Buffer]
headers
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetHeadersMethodInfo
instance (signature ~ ([Gst.Buffer.Buffer] -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetHeadersMethodInfo a signature where
overloadedMethod = audioEncoderSetHeaders
#endif
foreign import ccall "gst_audio_encoder_set_latency" gst_audio_encoder_set_latency ::
Ptr AudioEncoder ->
Word64 ->
Word64 ->
IO ()
audioEncoderSetLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Word64
-> Word64
-> m ()
audioEncoderSetLatency :: a -> Word64 -> Word64 -> m ()
audioEncoderSetLatency enc :: a
enc min :: Word64
min max :: 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr AudioEncoder -> Word64 -> Word64 -> IO ()
gst_audio_encoder_set_latency Ptr AudioEncoder
enc' Word64
min Word64
max
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetLatencyMethodInfo
instance (signature ~ (Word64 -> Word64 -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetLatencyMethodInfo a signature where
overloadedMethod = audioEncoderSetLatency
#endif
foreign import ccall "gst_audio_encoder_set_lookahead" gst_audio_encoder_set_lookahead ::
Ptr AudioEncoder ->
Int32 ->
IO ()
audioEncoderSetLookahead ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Int32
-> m ()
audioEncoderSetLookahead :: a -> Int32 -> m ()
audioEncoderSetLookahead enc :: a
enc num :: Int32
num = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr AudioEncoder -> Int32 -> IO ()
gst_audio_encoder_set_lookahead Ptr AudioEncoder
enc' Int32
num
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetLookaheadMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetLookaheadMethodInfo a signature where
overloadedMethod = audioEncoderSetLookahead
#endif
foreign import ccall "gst_audio_encoder_set_mark_granule" gst_audio_encoder_set_mark_granule ::
Ptr AudioEncoder ->
CInt ->
IO ()
audioEncoderSetMarkGranule ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Bool
-> m ()
audioEncoderSetMarkGranule :: a -> Bool -> m ()
audioEncoderSetMarkGranule enc :: a
enc enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
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 AudioEncoder -> CInt -> IO ()
gst_audio_encoder_set_mark_granule Ptr AudioEncoder
enc' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetMarkGranuleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetMarkGranuleMethodInfo a signature where
overloadedMethod = audioEncoderSetMarkGranule
#endif
foreign import ccall "gst_audio_encoder_set_output_format" gst_audio_encoder_set_output_format ::
Ptr AudioEncoder ->
Ptr Gst.Caps.Caps ->
IO CInt
audioEncoderSetOutputFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Gst.Caps.Caps
-> m Bool
audioEncoderSetOutputFormat :: a -> Caps -> m Bool
audioEncoderSetOutputFormat enc :: a
enc caps :: 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
CInt
result <- Ptr AudioEncoder -> Ptr Caps -> IO CInt
gst_audio_encoder_set_output_format Ptr AudioEncoder
enc' Ptr Caps
caps'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
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 AudioEncoderSetOutputFormatMethodInfo
instance (signature ~ (Gst.Caps.Caps -> m Bool), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetOutputFormatMethodInfo a signature where
overloadedMethod = audioEncoderSetOutputFormat
#endif
foreign import ccall "gst_audio_encoder_set_perfect_timestamp" gst_audio_encoder_set_perfect_timestamp ::
Ptr AudioEncoder ->
CInt ->
IO ()
audioEncoderSetPerfectTimestamp ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Bool
-> m ()
audioEncoderSetPerfectTimestamp :: a -> Bool -> m ()
audioEncoderSetPerfectTimestamp enc :: a
enc enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
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 AudioEncoder -> CInt -> IO ()
gst_audio_encoder_set_perfect_timestamp Ptr AudioEncoder
enc' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetPerfectTimestampMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetPerfectTimestampMethodInfo a signature where
overloadedMethod = audioEncoderSetPerfectTimestamp
#endif
foreign import ccall "gst_audio_encoder_set_tolerance" gst_audio_encoder_set_tolerance ::
Ptr AudioEncoder ->
Word64 ->
IO ()
audioEncoderSetTolerance ::
(B.CallStack.HasCallStack, MonadIO m, IsAudioEncoder a) =>
a
-> Word64
-> m ()
audioEncoderSetTolerance :: a -> Word64 -> m ()
audioEncoderSetTolerance enc :: a
enc tolerance :: 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 AudioEncoder
enc' <- a -> IO (Ptr AudioEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr AudioEncoder -> Word64 -> IO ()
gst_audio_encoder_set_tolerance Ptr AudioEncoder
enc' Word64
tolerance
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
enc
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data AudioEncoderSetToleranceMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsAudioEncoder a) => O.MethodInfo AudioEncoderSetToleranceMethodInfo a signature where
overloadedMethod = audioEncoderSetTolerance
#endif