{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstVideo.Objects.VideoEncoder
(
VideoEncoder(..) ,
IsVideoEncoder ,
toVideoEncoder ,
#if defined(ENABLE_OVERLOADING)
ResolveVideoEncoderMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
VideoEncoderAllocateOutputBufferMethodInfo,
#endif
videoEncoderAllocateOutputBuffer ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderAllocateOutputFrameMethodInfo,
#endif
videoEncoderAllocateOutputFrame ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderFinishFrameMethodInfo ,
#endif
videoEncoderFinishFrame ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderFinishSubframeMethodInfo ,
#endif
videoEncoderFinishSubframe ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderGetAllocatorMethodInfo ,
#endif
videoEncoderGetAllocator ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderGetFrameMethodInfo ,
#endif
videoEncoderGetFrame ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderGetFramesMethodInfo ,
#endif
videoEncoderGetFrames ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderGetLatencyMethodInfo ,
#endif
videoEncoderGetLatency ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderGetMaxEncodeTimeMethodInfo ,
#endif
videoEncoderGetMaxEncodeTime ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderGetMinForceKeyUnitIntervalMethodInfo,
#endif
videoEncoderGetMinForceKeyUnitInterval ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderGetOldestFrameMethodInfo ,
#endif
videoEncoderGetOldestFrame ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderGetOutputStateMethodInfo ,
#endif
videoEncoderGetOutputState ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderIsQosEnabledMethodInfo ,
#endif
videoEncoderIsQosEnabled ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderMergeTagsMethodInfo ,
#endif
videoEncoderMergeTags ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderNegotiateMethodInfo ,
#endif
videoEncoderNegotiate ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderProxyGetcapsMethodInfo ,
#endif
videoEncoderProxyGetcaps ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderSetHeadersMethodInfo ,
#endif
videoEncoderSetHeaders ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderSetLatencyMethodInfo ,
#endif
videoEncoderSetLatency ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderSetMinForceKeyUnitIntervalMethodInfo,
#endif
videoEncoderSetMinForceKeyUnitInterval ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderSetMinPtsMethodInfo ,
#endif
videoEncoderSetMinPts ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderSetOutputStateMethodInfo ,
#endif
videoEncoderSetOutputState ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderSetQosEnabledMethodInfo ,
#endif
videoEncoderSetQosEnabled ,
#if defined(ENABLE_OVERLOADING)
VideoEncoderMinForceKeyUnitIntervalPropertyInfo,
#endif
constructVideoEncoderMinForceKeyUnitInterval,
getVideoEncoderMinForceKeyUnitInterval ,
setVideoEncoderMinForceKeyUnitInterval ,
#if defined(ENABLE_OVERLOADING)
videoEncoderMinForceKeyUnitInterval ,
#endif
#if defined(ENABLE_OVERLOADING)
VideoEncoderQosPropertyInfo ,
#endif
constructVideoEncoderQos ,
getVideoEncoderQos ,
setVideoEncoderQos ,
#if defined(ENABLE_OVERLOADING)
videoEncoderQos ,
#endif
) 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.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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.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.GstVideo.Structs.VideoCodecFrame as GstVideo.VideoCodecFrame
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoCodecState as GstVideo.VideoCodecState
newtype VideoEncoder = VideoEncoder (SP.ManagedPtr VideoEncoder)
deriving (VideoEncoder -> VideoEncoder -> Bool
(VideoEncoder -> VideoEncoder -> Bool)
-> (VideoEncoder -> VideoEncoder -> Bool) -> Eq VideoEncoder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VideoEncoder -> VideoEncoder -> Bool
== :: VideoEncoder -> VideoEncoder -> Bool
$c/= :: VideoEncoder -> VideoEncoder -> Bool
/= :: VideoEncoder -> VideoEncoder -> Bool
Eq)
instance SP.ManagedPtrNewtype VideoEncoder where
toManagedPtr :: VideoEncoder -> ManagedPtr VideoEncoder
toManagedPtr (VideoEncoder ManagedPtr VideoEncoder
p) = ManagedPtr VideoEncoder
p
foreign import ccall "gst_video_encoder_get_type"
c_gst_video_encoder_get_type :: IO B.Types.GType
instance B.Types.TypedObject VideoEncoder where
glibType :: IO GType
glibType = IO GType
c_gst_video_encoder_get_type
instance B.Types.GObject VideoEncoder
class (SP.GObject o, O.IsDescendantOf VideoEncoder o) => IsVideoEncoder o
instance (SP.GObject o, O.IsDescendantOf VideoEncoder o) => IsVideoEncoder o
instance O.HasParentTypes VideoEncoder
type instance O.ParentTypes VideoEncoder = '[Gst.Element.Element, Gst.Object.Object, GObject.Object.Object, Gst.Preset.Preset]
toVideoEncoder :: (MIO.MonadIO m, IsVideoEncoder o) => o -> m VideoEncoder
toVideoEncoder :: forall (m :: * -> *) o.
(MonadIO m, IsVideoEncoder o) =>
o -> m VideoEncoder
toVideoEncoder = IO VideoEncoder -> m VideoEncoder
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO VideoEncoder -> m VideoEncoder)
-> (o -> IO VideoEncoder) -> o -> m VideoEncoder
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr VideoEncoder -> VideoEncoder) -> o -> IO VideoEncoder
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr VideoEncoder -> VideoEncoder
VideoEncoder
instance B.GValue.IsGValue (Maybe VideoEncoder) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_video_encoder_get_type
gvalueSet_ :: Ptr GValue -> Maybe VideoEncoder -> IO ()
gvalueSet_ Ptr GValue
gv Maybe VideoEncoder
P.Nothing = Ptr GValue -> Ptr VideoEncoder -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr VideoEncoder
forall a. Ptr a
FP.nullPtr :: FP.Ptr VideoEncoder)
gvalueSet_ Ptr GValue
gv (P.Just VideoEncoder
obj) = VideoEncoder -> (Ptr VideoEncoder -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr VideoEncoder
obj (Ptr GValue -> Ptr VideoEncoder -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe VideoEncoder)
gvalueGet_ Ptr GValue
gv = do
Ptr VideoEncoder
ptr <- Ptr GValue -> IO (Ptr VideoEncoder)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr VideoEncoder)
if Ptr VideoEncoder
ptr Ptr VideoEncoder -> Ptr VideoEncoder -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr VideoEncoder
forall a. Ptr a
FP.nullPtr
then VideoEncoder -> Maybe VideoEncoder
forall a. a -> Maybe a
P.Just (VideoEncoder -> Maybe VideoEncoder)
-> IO VideoEncoder -> IO (Maybe VideoEncoder)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr VideoEncoder -> VideoEncoder)
-> Ptr VideoEncoder -> IO VideoEncoder
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr VideoEncoder -> VideoEncoder
VideoEncoder Ptr VideoEncoder
ptr
else Maybe VideoEncoder -> IO (Maybe VideoEncoder)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoEncoder
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveVideoEncoderMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveVideoEncoderMethod "abortState" o = Gst.Element.ElementAbortStateMethodInfo
ResolveVideoEncoderMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
ResolveVideoEncoderMethod "addPad" o = Gst.Element.ElementAddPadMethodInfo
ResolveVideoEncoderMethod "addPropertyDeepNotifyWatch" o = Gst.Element.ElementAddPropertyDeepNotifyWatchMethodInfo
ResolveVideoEncoderMethod "addPropertyNotifyWatch" o = Gst.Element.ElementAddPropertyNotifyWatchMethodInfo
ResolveVideoEncoderMethod "allocateOutputBuffer" o = VideoEncoderAllocateOutputBufferMethodInfo
ResolveVideoEncoderMethod "allocateOutputFrame" o = VideoEncoderAllocateOutputFrameMethodInfo
ResolveVideoEncoderMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveVideoEncoderMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveVideoEncoderMethod "callAsync" o = Gst.Element.ElementCallAsyncMethodInfo
ResolveVideoEncoderMethod "changeState" o = Gst.Element.ElementChangeStateMethodInfo
ResolveVideoEncoderMethod "continueState" o = Gst.Element.ElementContinueStateMethodInfo
ResolveVideoEncoderMethod "createAllPads" o = Gst.Element.ElementCreateAllPadsMethodInfo
ResolveVideoEncoderMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
ResolveVideoEncoderMethod "deletePreset" o = Gst.Preset.PresetDeletePresetMethodInfo
ResolveVideoEncoderMethod "finishFrame" o = VideoEncoderFinishFrameMethodInfo
ResolveVideoEncoderMethod "finishSubframe" o = VideoEncoderFinishSubframeMethodInfo
ResolveVideoEncoderMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveVideoEncoderMethod "foreachPad" o = Gst.Element.ElementForeachPadMethodInfo
ResolveVideoEncoderMethod "foreachSinkPad" o = Gst.Element.ElementForeachSinkPadMethodInfo
ResolveVideoEncoderMethod "foreachSrcPad" o = Gst.Element.ElementForeachSrcPadMethodInfo
ResolveVideoEncoderMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveVideoEncoderMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveVideoEncoderMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
ResolveVideoEncoderMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
ResolveVideoEncoderMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
ResolveVideoEncoderMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
ResolveVideoEncoderMethod "isEditable" o = Gst.Preset.PresetIsEditableMethodInfo
ResolveVideoEncoderMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveVideoEncoderMethod "isLockedState" o = Gst.Element.ElementIsLockedStateMethodInfo
ResolveVideoEncoderMethod "isQosEnabled" o = VideoEncoderIsQosEnabledMethodInfo
ResolveVideoEncoderMethod "iteratePads" o = Gst.Element.ElementIteratePadsMethodInfo
ResolveVideoEncoderMethod "iterateSinkPads" o = Gst.Element.ElementIterateSinkPadsMethodInfo
ResolveVideoEncoderMethod "iterateSrcPads" o = Gst.Element.ElementIterateSrcPadsMethodInfo
ResolveVideoEncoderMethod "link" o = Gst.Element.ElementLinkMethodInfo
ResolveVideoEncoderMethod "linkFiltered" o = Gst.Element.ElementLinkFilteredMethodInfo
ResolveVideoEncoderMethod "linkPads" o = Gst.Element.ElementLinkPadsMethodInfo
ResolveVideoEncoderMethod "linkPadsFiltered" o = Gst.Element.ElementLinkPadsFilteredMethodInfo
ResolveVideoEncoderMethod "linkPadsFull" o = Gst.Element.ElementLinkPadsFullMethodInfo
ResolveVideoEncoderMethod "loadPreset" o = Gst.Preset.PresetLoadPresetMethodInfo
ResolveVideoEncoderMethod "lostState" o = Gst.Element.ElementLostStateMethodInfo
ResolveVideoEncoderMethod "mergeTags" o = VideoEncoderMergeTagsMethodInfo
ResolveVideoEncoderMethod "messageFull" o = Gst.Element.ElementMessageFullMethodInfo
ResolveVideoEncoderMethod "messageFullWithDetails" o = Gst.Element.ElementMessageFullWithDetailsMethodInfo
ResolveVideoEncoderMethod "negotiate" o = VideoEncoderNegotiateMethodInfo
ResolveVideoEncoderMethod "noMorePads" o = Gst.Element.ElementNoMorePadsMethodInfo
ResolveVideoEncoderMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveVideoEncoderMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveVideoEncoderMethod "postMessage" o = Gst.Element.ElementPostMessageMethodInfo
ResolveVideoEncoderMethod "provideClock" o = Gst.Element.ElementProvideClockMethodInfo
ResolveVideoEncoderMethod "proxyGetcaps" o = VideoEncoderProxyGetcapsMethodInfo
ResolveVideoEncoderMethod "query" o = Gst.Element.ElementQueryMethodInfo
ResolveVideoEncoderMethod "queryConvert" o = Gst.Element.ElementQueryConvertMethodInfo
ResolveVideoEncoderMethod "queryDuration" o = Gst.Element.ElementQueryDurationMethodInfo
ResolveVideoEncoderMethod "queryPosition" o = Gst.Element.ElementQueryPositionMethodInfo
ResolveVideoEncoderMethod "ref" o = Gst.Object.ObjectRefMethodInfo
ResolveVideoEncoderMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveVideoEncoderMethod "releaseRequestPad" o = Gst.Element.ElementReleaseRequestPadMethodInfo
ResolveVideoEncoderMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
ResolveVideoEncoderMethod "removePad" o = Gst.Element.ElementRemovePadMethodInfo
ResolveVideoEncoderMethod "removePropertyNotifyWatch" o = Gst.Element.ElementRemovePropertyNotifyWatchMethodInfo
ResolveVideoEncoderMethod "renamePreset" o = Gst.Preset.PresetRenamePresetMethodInfo
ResolveVideoEncoderMethod "requestPad" o = Gst.Element.ElementRequestPadMethodInfo
ResolveVideoEncoderMethod "requestPadSimple" o = Gst.Element.ElementRequestPadSimpleMethodInfo
ResolveVideoEncoderMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveVideoEncoderMethod "savePreset" o = Gst.Preset.PresetSavePresetMethodInfo
ResolveVideoEncoderMethod "seek" o = Gst.Element.ElementSeekMethodInfo
ResolveVideoEncoderMethod "seekSimple" o = Gst.Element.ElementSeekSimpleMethodInfo
ResolveVideoEncoderMethod "sendEvent" o = Gst.Element.ElementSendEventMethodInfo
ResolveVideoEncoderMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveVideoEncoderMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveVideoEncoderMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
ResolveVideoEncoderMethod "syncStateWithParent" o = Gst.Element.ElementSyncStateWithParentMethodInfo
ResolveVideoEncoderMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
ResolveVideoEncoderMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveVideoEncoderMethod "unlink" o = Gst.Element.ElementUnlinkMethodInfo
ResolveVideoEncoderMethod "unlinkPads" o = Gst.Element.ElementUnlinkPadsMethodInfo
ResolveVideoEncoderMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
ResolveVideoEncoderMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
ResolveVideoEncoderMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveVideoEncoderMethod "getAllocator" o = VideoEncoderGetAllocatorMethodInfo
ResolveVideoEncoderMethod "getBaseTime" o = Gst.Element.ElementGetBaseTimeMethodInfo
ResolveVideoEncoderMethod "getBus" o = Gst.Element.ElementGetBusMethodInfo
ResolveVideoEncoderMethod "getClock" o = Gst.Element.ElementGetClockMethodInfo
ResolveVideoEncoderMethod "getCompatiblePad" o = Gst.Element.ElementGetCompatiblePadMethodInfo
ResolveVideoEncoderMethod "getCompatiblePadTemplate" o = Gst.Element.ElementGetCompatiblePadTemplateMethodInfo
ResolveVideoEncoderMethod "getContext" o = Gst.Element.ElementGetContextMethodInfo
ResolveVideoEncoderMethod "getContextUnlocked" o = Gst.Element.ElementGetContextUnlockedMethodInfo
ResolveVideoEncoderMethod "getContexts" o = Gst.Element.ElementGetContextsMethodInfo
ResolveVideoEncoderMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
ResolveVideoEncoderMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
ResolveVideoEncoderMethod "getCurrentClockTime" o = Gst.Element.ElementGetCurrentClockTimeMethodInfo
ResolveVideoEncoderMethod "getCurrentRunningTime" o = Gst.Element.ElementGetCurrentRunningTimeMethodInfo
ResolveVideoEncoderMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveVideoEncoderMethod "getFactory" o = Gst.Element.ElementGetFactoryMethodInfo
ResolveVideoEncoderMethod "getFrame" o = VideoEncoderGetFrameMethodInfo
ResolveVideoEncoderMethod "getFrames" o = VideoEncoderGetFramesMethodInfo
ResolveVideoEncoderMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
ResolveVideoEncoderMethod "getLatency" o = VideoEncoderGetLatencyMethodInfo
ResolveVideoEncoderMethod "getMaxEncodeTime" o = VideoEncoderGetMaxEncodeTimeMethodInfo
ResolveVideoEncoderMethod "getMeta" o = Gst.Preset.PresetGetMetaMethodInfo
ResolveVideoEncoderMethod "getMetadata" o = Gst.Element.ElementGetMetadataMethodInfo
ResolveVideoEncoderMethod "getMinForceKeyUnitInterval" o = VideoEncoderGetMinForceKeyUnitIntervalMethodInfo
ResolveVideoEncoderMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
ResolveVideoEncoderMethod "getOldestFrame" o = VideoEncoderGetOldestFrameMethodInfo
ResolveVideoEncoderMethod "getOutputState" o = VideoEncoderGetOutputStateMethodInfo
ResolveVideoEncoderMethod "getPadTemplate" o = Gst.Element.ElementGetPadTemplateMethodInfo
ResolveVideoEncoderMethod "getPadTemplateList" o = Gst.Element.ElementGetPadTemplateListMethodInfo
ResolveVideoEncoderMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
ResolveVideoEncoderMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
ResolveVideoEncoderMethod "getPresetNames" o = Gst.Preset.PresetGetPresetNamesMethodInfo
ResolveVideoEncoderMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveVideoEncoderMethod "getPropertyNames" o = Gst.Preset.PresetGetPropertyNamesMethodInfo
ResolveVideoEncoderMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveVideoEncoderMethod "getRequestPad" o = Gst.Element.ElementGetRequestPadMethodInfo
ResolveVideoEncoderMethod "getStartTime" o = Gst.Element.ElementGetStartTimeMethodInfo
ResolveVideoEncoderMethod "getState" o = Gst.Element.ElementGetStateMethodInfo
ResolveVideoEncoderMethod "getStaticPad" o = Gst.Element.ElementGetStaticPadMethodInfo
ResolveVideoEncoderMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
ResolveVideoEncoderMethod "setBaseTime" o = Gst.Element.ElementSetBaseTimeMethodInfo
ResolveVideoEncoderMethod "setBus" o = Gst.Element.ElementSetBusMethodInfo
ResolveVideoEncoderMethod "setClock" o = Gst.Element.ElementSetClockMethodInfo
ResolveVideoEncoderMethod "setContext" o = Gst.Element.ElementSetContextMethodInfo
ResolveVideoEncoderMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
ResolveVideoEncoderMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
ResolveVideoEncoderMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
ResolveVideoEncoderMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveVideoEncoderMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveVideoEncoderMethod "setHeaders" o = VideoEncoderSetHeadersMethodInfo
ResolveVideoEncoderMethod "setLatency" o = VideoEncoderSetLatencyMethodInfo
ResolveVideoEncoderMethod "setLockedState" o = Gst.Element.ElementSetLockedStateMethodInfo
ResolveVideoEncoderMethod "setMeta" o = Gst.Preset.PresetSetMetaMethodInfo
ResolveVideoEncoderMethod "setMinForceKeyUnitInterval" o = VideoEncoderSetMinForceKeyUnitIntervalMethodInfo
ResolveVideoEncoderMethod "setMinPts" o = VideoEncoderSetMinPtsMethodInfo
ResolveVideoEncoderMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
ResolveVideoEncoderMethod "setOutputState" o = VideoEncoderSetOutputStateMethodInfo
ResolveVideoEncoderMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
ResolveVideoEncoderMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveVideoEncoderMethod "setQosEnabled" o = VideoEncoderSetQosEnabledMethodInfo
ResolveVideoEncoderMethod "setStartTime" o = Gst.Element.ElementSetStartTimeMethodInfo
ResolveVideoEncoderMethod "setState" o = Gst.Element.ElementSetStateMethodInfo
ResolveVideoEncoderMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveVideoEncoderMethod t VideoEncoder, O.OverloadedMethod info VideoEncoder p) => OL.IsLabel t (VideoEncoder -> 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 ~ ResolveVideoEncoderMethod t VideoEncoder, O.OverloadedMethod info VideoEncoder p, R.HasField t VideoEncoder p) => R.HasField t VideoEncoder p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveVideoEncoderMethod t VideoEncoder, O.OverloadedMethodInfo info VideoEncoder) => OL.IsLabel t (O.MethodProxy info VideoEncoder) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getVideoEncoderMinForceKeyUnitInterval :: (MonadIO m, IsVideoEncoder o) => o -> m Word64
getVideoEncoderMinForceKeyUnitInterval :: forall (m :: * -> *) o.
(MonadIO m, IsVideoEncoder o) =>
o -> m Word64
getVideoEncoderMinForceKeyUnitInterval o
obj = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word64
forall a. GObject a => a -> String -> IO Word64
B.Properties.getObjectPropertyUInt64 o
obj String
"min-force-key-unit-interval"
setVideoEncoderMinForceKeyUnitInterval :: (MonadIO m, IsVideoEncoder o) => o -> Word64 -> m ()
setVideoEncoderMinForceKeyUnitInterval :: forall (m :: * -> *) o.
(MonadIO m, IsVideoEncoder o) =>
o -> Word64 -> m ()
setVideoEncoderMinForceKeyUnitInterval o
obj Word64
val = IO () -> m ()
forall a. IO a -> m a
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 -> Word64 -> IO ()
forall a. GObject a => a -> String -> Word64 -> IO ()
B.Properties.setObjectPropertyUInt64 o
obj String
"min-force-key-unit-interval" Word64
val
constructVideoEncoderMinForceKeyUnitInterval :: (IsVideoEncoder o, MIO.MonadIO m) => Word64 -> m (GValueConstruct o)
constructVideoEncoderMinForceKeyUnitInterval :: forall o (m :: * -> *).
(IsVideoEncoder o, MonadIO m) =>
Word64 -> m (GValueConstruct o)
constructVideoEncoderMinForceKeyUnitInterval Word64
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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 -> Word64 -> IO (GValueConstruct o)
forall o. String -> Word64 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyUInt64 String
"min-force-key-unit-interval" Word64
val
#if defined(ENABLE_OVERLOADING)
data VideoEncoderMinForceKeyUnitIntervalPropertyInfo
instance AttrInfo VideoEncoderMinForceKeyUnitIntervalPropertyInfo where
type AttrAllowedOps VideoEncoderMinForceKeyUnitIntervalPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint VideoEncoderMinForceKeyUnitIntervalPropertyInfo = IsVideoEncoder
type AttrSetTypeConstraint VideoEncoderMinForceKeyUnitIntervalPropertyInfo = (~) Word64
type AttrTransferTypeConstraint VideoEncoderMinForceKeyUnitIntervalPropertyInfo = (~) Word64
type AttrTransferType VideoEncoderMinForceKeyUnitIntervalPropertyInfo = Word64
type AttrGetType VideoEncoderMinForceKeyUnitIntervalPropertyInfo = Word64
type AttrLabel VideoEncoderMinForceKeyUnitIntervalPropertyInfo = "min-force-key-unit-interval"
type AttrOrigin VideoEncoderMinForceKeyUnitIntervalPropertyInfo = VideoEncoder
attrGet = getVideoEncoderMinForceKeyUnitInterval
attrSet = setVideoEncoderMinForceKeyUnitInterval
attrTransfer _ v = do
return v
attrConstruct = constructVideoEncoderMinForceKeyUnitInterval
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.minForceKeyUnitInterval"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#g:attr:minForceKeyUnitInterval"
})
#endif
getVideoEncoderQos :: (MonadIO m, IsVideoEncoder o) => o -> m Bool
getVideoEncoderQos :: forall (m :: * -> *) o.
(MonadIO m, IsVideoEncoder o) =>
o -> m Bool
getVideoEncoderQos o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"qos"
setVideoEncoderQos :: (MonadIO m, IsVideoEncoder o) => o -> Bool -> m ()
setVideoEncoderQos :: forall (m :: * -> *) o.
(MonadIO m, IsVideoEncoder o) =>
o -> Bool -> m ()
setVideoEncoderQos o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
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
"qos" Bool
val
constructVideoEncoderQos :: (IsVideoEncoder o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructVideoEncoderQos :: forall o (m :: * -> *).
(IsVideoEncoder o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructVideoEncoderQos Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"qos" Bool
val
#if defined(ENABLE_OVERLOADING)
data VideoEncoderQosPropertyInfo
instance AttrInfo VideoEncoderQosPropertyInfo where
type AttrAllowedOps VideoEncoderQosPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint VideoEncoderQosPropertyInfo = IsVideoEncoder
type AttrSetTypeConstraint VideoEncoderQosPropertyInfo = (~) Bool
type AttrTransferTypeConstraint VideoEncoderQosPropertyInfo = (~) Bool
type AttrTransferType VideoEncoderQosPropertyInfo = Bool
type AttrGetType VideoEncoderQosPropertyInfo = Bool
type AttrLabel VideoEncoderQosPropertyInfo = "qos"
type AttrOrigin VideoEncoderQosPropertyInfo = VideoEncoder
attrGet = getVideoEncoderQos
attrSet = setVideoEncoderQos
attrTransfer _ v = do
return v
attrConstruct = constructVideoEncoderQos
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.qos"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#g:attr:qos"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList VideoEncoder
type instance O.AttributeList VideoEncoder = VideoEncoderAttributeList
type VideoEncoderAttributeList = ('[ '("minForceKeyUnitInterval", VideoEncoderMinForceKeyUnitIntervalPropertyInfo), '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("qos", VideoEncoderQosPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
videoEncoderMinForceKeyUnitInterval :: AttrLabelProxy "minForceKeyUnitInterval"
videoEncoderMinForceKeyUnitInterval = AttrLabelProxy
videoEncoderQos :: AttrLabelProxy "qos"
videoEncoderQos = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList VideoEncoder = VideoEncoderSignalList
type VideoEncoderSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("noMorePads", Gst.Element.ElementNoMorePadsSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("padAdded", Gst.Element.ElementPadAddedSignalInfo), '("padRemoved", Gst.Element.ElementPadRemovedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gst_video_encoder_allocate_output_buffer" gst_video_encoder_allocate_output_buffer ::
Ptr VideoEncoder ->
Word64 ->
IO (Ptr Gst.Buffer.Buffer)
videoEncoderAllocateOutputBuffer ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Word64
-> m Gst.Buffer.Buffer
videoEncoderAllocateOutputBuffer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Word64 -> m Buffer
videoEncoderAllocateOutputBuffer a
encoder Word64
size = IO Buffer -> m Buffer
forall a. IO a -> m a
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 VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr Buffer
result <- Ptr VideoEncoder -> Word64 -> IO (Ptr Buffer)
gst_video_encoder_allocate_output_buffer Ptr VideoEncoder
encoder' Word64
size
Text -> Ptr Buffer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoEncoderAllocateOutputBuffer" 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
encoder
Buffer -> IO Buffer
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
result'
#if defined(ENABLE_OVERLOADING)
data VideoEncoderAllocateOutputBufferMethodInfo
instance (signature ~ (Word64 -> m Gst.Buffer.Buffer), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderAllocateOutputBufferMethodInfo a signature where
overloadedMethod = videoEncoderAllocateOutputBuffer
instance O.OverloadedMethodInfo VideoEncoderAllocateOutputBufferMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderAllocateOutputBuffer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderAllocateOutputBuffer"
})
#endif
foreign import ccall "gst_video_encoder_allocate_output_frame" gst_video_encoder_allocate_output_frame ::
Ptr VideoEncoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
Word64 ->
IO CInt
videoEncoderAllocateOutputFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> Word64
-> m Gst.Enums.FlowReturn
videoEncoderAllocateOutputFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> VideoCodecFrame -> Word64 -> m FlowReturn
videoEncoderAllocateOutputFrame a
encoder VideoCodecFrame
frame Word64
size = IO FlowReturn -> m FlowReturn
forall a. IO a -> m a
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 VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecFrame
frame
CInt
result <- Ptr VideoEncoder -> Ptr VideoCodecFrame -> Word64 -> IO CInt
gst_video_encoder_allocate_output_frame Ptr VideoEncoder
encoder' Ptr VideoCodecFrame
frame' Word64
size
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
encoder
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
FlowReturn -> IO FlowReturn
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data VideoEncoderAllocateOutputFrameMethodInfo
instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> Word64 -> m Gst.Enums.FlowReturn), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderAllocateOutputFrameMethodInfo a signature where
overloadedMethod = videoEncoderAllocateOutputFrame
instance O.OverloadedMethodInfo VideoEncoderAllocateOutputFrameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderAllocateOutputFrame",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderAllocateOutputFrame"
})
#endif
foreign import ccall "gst_video_encoder_finish_frame" gst_video_encoder_finish_frame ::
Ptr VideoEncoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
IO CInt
videoEncoderFinishFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> m Gst.Enums.FlowReturn
videoEncoderFinishFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> VideoCodecFrame -> m FlowReturn
videoEncoderFinishFrame a
encoder VideoCodecFrame
frame = IO FlowReturn -> m FlowReturn
forall a. IO a -> m a
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 VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed VideoCodecFrame
frame
CInt
result <- Ptr VideoEncoder -> Ptr VideoCodecFrame -> IO CInt
gst_video_encoder_finish_frame Ptr VideoEncoder
encoder' Ptr VideoCodecFrame
frame'
let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
FlowReturn -> IO FlowReturn
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data VideoEncoderFinishFrameMethodInfo
instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m Gst.Enums.FlowReturn), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderFinishFrameMethodInfo a signature where
overloadedMethod = videoEncoderFinishFrame
instance O.OverloadedMethodInfo VideoEncoderFinishFrameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderFinishFrame",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderFinishFrame"
})
#endif
foreign import ccall "gst_video_encoder_finish_subframe" gst_video_encoder_finish_subframe ::
Ptr VideoEncoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
IO CInt
videoEncoderFinishSubframe ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> m Gst.Enums.FlowReturn
videoEncoderFinishSubframe :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> VideoCodecFrame -> m FlowReturn
videoEncoderFinishSubframe a
encoder VideoCodecFrame
frame = IO FlowReturn -> m FlowReturn
forall a. IO a -> m a
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 VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecFrame
frame
CInt
result <- Ptr VideoEncoder -> Ptr VideoCodecFrame -> IO CInt
gst_video_encoder_finish_subframe Ptr VideoEncoder
encoder' Ptr VideoCodecFrame
frame'
let result' :: FlowReturn
result' = (Int -> FlowReturn
forall a. Enum a => Int -> a
toEnum (Int -> FlowReturn) -> (CInt -> Int) -> CInt -> FlowReturn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
FlowReturn -> IO FlowReturn
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FlowReturn
result'
#if defined(ENABLE_OVERLOADING)
data VideoEncoderFinishSubframeMethodInfo
instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m Gst.Enums.FlowReturn), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderFinishSubframeMethodInfo a signature where
overloadedMethod = videoEncoderFinishSubframe
instance O.OverloadedMethodInfo VideoEncoderFinishSubframeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderFinishSubframe",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderFinishSubframe"
})
#endif
foreign import ccall "gst_video_encoder_get_allocator" gst_video_encoder_get_allocator ::
Ptr VideoEncoder ->
Ptr (Ptr Gst.Allocator.Allocator) ->
Ptr Gst.AllocationParams.AllocationParams ->
IO ()
videoEncoderGetAllocator ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> m ((Maybe Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))
videoEncoderGetAllocator :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> m (Maybe Allocator, AllocationParams)
videoEncoderGetAllocator a
encoder = IO (Maybe Allocator, AllocationParams)
-> m (Maybe Allocator, AllocationParams)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Allocator, AllocationParams)
-> m (Maybe Allocator, AllocationParams))
-> IO (Maybe Allocator, AllocationParams)
-> m (Maybe Allocator, AllocationParams)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
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 VideoEncoder
-> Ptr (Ptr Allocator) -> Ptr AllocationParams -> IO ()
gst_video_encoder_get_allocator Ptr VideoEncoder
encoder' 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
Maybe Allocator
maybeAllocator' <- Ptr Allocator
-> (Ptr Allocator -> IO Allocator) -> IO (Maybe Allocator)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Allocator
allocator' ((Ptr Allocator -> IO Allocator) -> IO (Maybe Allocator))
-> (Ptr Allocator -> IO Allocator) -> IO (Maybe Allocator)
forall a b. (a -> b) -> a -> b
$ \Ptr Allocator
allocator'' -> do
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''
Allocator -> IO Allocator
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return 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
encoder
Ptr (Ptr Allocator) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Allocator)
allocator
(Maybe Allocator, AllocationParams)
-> IO (Maybe Allocator, AllocationParams)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Allocator
maybeAllocator', AllocationParams
params')
#if defined(ENABLE_OVERLOADING)
data VideoEncoderGetAllocatorMethodInfo
instance (signature ~ (m ((Maybe Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderGetAllocatorMethodInfo a signature where
overloadedMethod = videoEncoderGetAllocator
instance O.OverloadedMethodInfo VideoEncoderGetAllocatorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderGetAllocator",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderGetAllocator"
})
#endif
foreign import ccall "gst_video_encoder_get_frame" gst_video_encoder_get_frame ::
Ptr VideoEncoder ->
Int32 ->
IO (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame)
videoEncoderGetFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Int32
-> m (Maybe GstVideo.VideoCodecFrame.VideoCodecFrame)
videoEncoderGetFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Int32 -> m (Maybe VideoCodecFrame)
videoEncoderGetFrame a
encoder Int32
frameNumber = IO (Maybe VideoCodecFrame) -> m (Maybe VideoCodecFrame)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoCodecFrame) -> m (Maybe VideoCodecFrame))
-> IO (Maybe VideoCodecFrame) -> m (Maybe VideoCodecFrame)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoCodecFrame
result <- Ptr VideoEncoder -> Int32 -> IO (Ptr VideoCodecFrame)
gst_video_encoder_get_frame Ptr VideoEncoder
encoder' Int32
frameNumber
Maybe VideoCodecFrame
maybeResult <- Ptr VideoCodecFrame
-> (Ptr VideoCodecFrame -> IO VideoCodecFrame)
-> IO (Maybe VideoCodecFrame)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoCodecFrame
result ((Ptr VideoCodecFrame -> IO VideoCodecFrame)
-> IO (Maybe VideoCodecFrame))
-> (Ptr VideoCodecFrame -> IO VideoCodecFrame)
-> IO (Maybe VideoCodecFrame)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecFrame
result' -> do
VideoCodecFrame
result'' <- ((ManagedPtr VideoCodecFrame -> VideoCodecFrame)
-> Ptr VideoCodecFrame -> IO VideoCodecFrame
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecFrame -> VideoCodecFrame
GstVideo.VideoCodecFrame.VideoCodecFrame) Ptr VideoCodecFrame
result'
VideoCodecFrame -> IO VideoCodecFrame
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecFrame
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
Maybe VideoCodecFrame -> IO (Maybe VideoCodecFrame)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoCodecFrame
maybeResult
#if defined(ENABLE_OVERLOADING)
data VideoEncoderGetFrameMethodInfo
instance (signature ~ (Int32 -> m (Maybe GstVideo.VideoCodecFrame.VideoCodecFrame)), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderGetFrameMethodInfo a signature where
overloadedMethod = videoEncoderGetFrame
instance O.OverloadedMethodInfo VideoEncoderGetFrameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderGetFrame",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderGetFrame"
})
#endif
foreign import ccall "gst_video_encoder_get_frames" gst_video_encoder_get_frames ::
Ptr VideoEncoder ->
IO (Ptr (GList (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame)))
videoEncoderGetFrames ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> m [GstVideo.VideoCodecFrame.VideoCodecFrame]
videoEncoderGetFrames :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> m [VideoCodecFrame]
videoEncoderGetFrames a
encoder = IO [VideoCodecFrame] -> m [VideoCodecFrame]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [VideoCodecFrame] -> m [VideoCodecFrame])
-> IO [VideoCodecFrame] -> m [VideoCodecFrame]
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr (GList (Ptr VideoCodecFrame))
result <- Ptr VideoEncoder -> IO (Ptr (GList (Ptr VideoCodecFrame)))
gst_video_encoder_get_frames Ptr VideoEncoder
encoder'
[Ptr VideoCodecFrame]
result' <- Ptr (GList (Ptr VideoCodecFrame)) -> IO [Ptr VideoCodecFrame]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr VideoCodecFrame))
result
[VideoCodecFrame]
result'' <- (Ptr VideoCodecFrame -> IO VideoCodecFrame)
-> [Ptr VideoCodecFrame] -> IO [VideoCodecFrame]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr VideoCodecFrame -> VideoCodecFrame)
-> Ptr VideoCodecFrame -> IO VideoCodecFrame
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecFrame -> VideoCodecFrame
GstVideo.VideoCodecFrame.VideoCodecFrame) [Ptr VideoCodecFrame]
result'
Ptr (GList (Ptr VideoCodecFrame)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr VideoCodecFrame))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
[VideoCodecFrame] -> IO [VideoCodecFrame]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [VideoCodecFrame]
result''
#if defined(ENABLE_OVERLOADING)
data VideoEncoderGetFramesMethodInfo
instance (signature ~ (m [GstVideo.VideoCodecFrame.VideoCodecFrame]), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderGetFramesMethodInfo a signature where
overloadedMethod = videoEncoderGetFrames
instance O.OverloadedMethodInfo VideoEncoderGetFramesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderGetFrames",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderGetFrames"
})
#endif
foreign import ccall "gst_video_encoder_get_latency" gst_video_encoder_get_latency ::
Ptr VideoEncoder ->
Ptr Word64 ->
Ptr Word64 ->
IO ()
videoEncoderGetLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> m ((Word64, Word64))
videoEncoderGetLatency :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> m (Word64, Word64)
videoEncoderGetLatency a
encoder = IO (Word64, Word64) -> m (Word64, Word64)
forall a. IO a -> m a
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 VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr Word64
minLatency <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Word64
maxLatency <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr VideoEncoder -> Ptr Word64 -> Ptr Word64 -> IO ()
gst_video_encoder_get_latency Ptr VideoEncoder
encoder' Ptr Word64
minLatency Ptr Word64
maxLatency
Word64
minLatency' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
minLatency
Word64
maxLatency' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
maxLatency
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
minLatency
Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
maxLatency
(Word64, Word64) -> IO (Word64, Word64)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word64
minLatency', Word64
maxLatency')
#if defined(ENABLE_OVERLOADING)
data VideoEncoderGetLatencyMethodInfo
instance (signature ~ (m ((Word64, Word64))), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderGetLatencyMethodInfo a signature where
overloadedMethod = videoEncoderGetLatency
instance O.OverloadedMethodInfo VideoEncoderGetLatencyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderGetLatency",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderGetLatency"
})
#endif
foreign import ccall "gst_video_encoder_get_max_encode_time" gst_video_encoder_get_max_encode_time ::
Ptr VideoEncoder ->
Ptr GstVideo.VideoCodecFrame.VideoCodecFrame ->
IO Int64
videoEncoderGetMaxEncodeTime ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> GstVideo.VideoCodecFrame.VideoCodecFrame
-> m Int64
videoEncoderGetMaxEncodeTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> VideoCodecFrame -> m Int64
videoEncoderGetMaxEncodeTime a
encoder VideoCodecFrame
frame = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoCodecFrame
frame' <- VideoCodecFrame -> IO (Ptr VideoCodecFrame)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecFrame
frame
Int64
result <- Ptr VideoEncoder -> Ptr VideoCodecFrame -> IO Int64
gst_video_encoder_get_max_encode_time Ptr VideoEncoder
encoder' Ptr VideoCodecFrame
frame'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
VideoCodecFrame -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecFrame
frame
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result
#if defined(ENABLE_OVERLOADING)
data VideoEncoderGetMaxEncodeTimeMethodInfo
instance (signature ~ (GstVideo.VideoCodecFrame.VideoCodecFrame -> m Int64), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderGetMaxEncodeTimeMethodInfo a signature where
overloadedMethod = videoEncoderGetMaxEncodeTime
instance O.OverloadedMethodInfo VideoEncoderGetMaxEncodeTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderGetMaxEncodeTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderGetMaxEncodeTime"
})
#endif
foreign import ccall "gst_video_encoder_get_min_force_key_unit_interval" gst_video_encoder_get_min_force_key_unit_interval ::
Ptr VideoEncoder ->
IO Word64
videoEncoderGetMinForceKeyUnitInterval ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> m Word64
videoEncoderGetMinForceKeyUnitInterval :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> m Word64
videoEncoderGetMinForceKeyUnitInterval a
encoder = IO Word64 -> m Word64
forall a. IO a -> m a
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 VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Word64
result <- Ptr VideoEncoder -> IO Word64
gst_video_encoder_get_min_force_key_unit_interval Ptr VideoEncoder
encoder'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data VideoEncoderGetMinForceKeyUnitIntervalMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderGetMinForceKeyUnitIntervalMethodInfo a signature where
overloadedMethod = videoEncoderGetMinForceKeyUnitInterval
instance O.OverloadedMethodInfo VideoEncoderGetMinForceKeyUnitIntervalMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderGetMinForceKeyUnitInterval",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderGetMinForceKeyUnitInterval"
})
#endif
foreign import ccall "gst_video_encoder_get_oldest_frame" gst_video_encoder_get_oldest_frame ::
Ptr VideoEncoder ->
IO (Ptr GstVideo.VideoCodecFrame.VideoCodecFrame)
videoEncoderGetOldestFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> m (Maybe GstVideo.VideoCodecFrame.VideoCodecFrame)
videoEncoderGetOldestFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> m (Maybe VideoCodecFrame)
videoEncoderGetOldestFrame a
encoder = IO (Maybe VideoCodecFrame) -> m (Maybe VideoCodecFrame)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoCodecFrame) -> m (Maybe VideoCodecFrame))
-> IO (Maybe VideoCodecFrame) -> m (Maybe VideoCodecFrame)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoCodecFrame
result <- Ptr VideoEncoder -> IO (Ptr VideoCodecFrame)
gst_video_encoder_get_oldest_frame Ptr VideoEncoder
encoder'
Maybe VideoCodecFrame
maybeResult <- Ptr VideoCodecFrame
-> (Ptr VideoCodecFrame -> IO VideoCodecFrame)
-> IO (Maybe VideoCodecFrame)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoCodecFrame
result ((Ptr VideoCodecFrame -> IO VideoCodecFrame)
-> IO (Maybe VideoCodecFrame))
-> (Ptr VideoCodecFrame -> IO VideoCodecFrame)
-> IO (Maybe VideoCodecFrame)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecFrame
result' -> do
VideoCodecFrame
result'' <- ((ManagedPtr VideoCodecFrame -> VideoCodecFrame)
-> Ptr VideoCodecFrame -> IO VideoCodecFrame
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecFrame -> VideoCodecFrame
GstVideo.VideoCodecFrame.VideoCodecFrame) Ptr VideoCodecFrame
result'
VideoCodecFrame -> IO VideoCodecFrame
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecFrame
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
Maybe VideoCodecFrame -> IO (Maybe VideoCodecFrame)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoCodecFrame
maybeResult
#if defined(ENABLE_OVERLOADING)
data VideoEncoderGetOldestFrameMethodInfo
instance (signature ~ (m (Maybe GstVideo.VideoCodecFrame.VideoCodecFrame)), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderGetOldestFrameMethodInfo a signature where
overloadedMethod = videoEncoderGetOldestFrame
instance O.OverloadedMethodInfo VideoEncoderGetOldestFrameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderGetOldestFrame",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderGetOldestFrame"
})
#endif
foreign import ccall "gst_video_encoder_get_output_state" gst_video_encoder_get_output_state ::
Ptr VideoEncoder ->
IO (Ptr GstVideo.VideoCodecState.VideoCodecState)
videoEncoderGetOutputState ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> m (Maybe GstVideo.VideoCodecState.VideoCodecState)
videoEncoderGetOutputState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> m (Maybe VideoCodecState)
videoEncoderGetOutputState a
encoder = IO (Maybe VideoCodecState) -> m (Maybe VideoCodecState)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoCodecState) -> m (Maybe VideoCodecState))
-> IO (Maybe VideoCodecState) -> m (Maybe VideoCodecState)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoCodecState
result <- Ptr VideoEncoder -> IO (Ptr VideoCodecState)
gst_video_encoder_get_output_state Ptr VideoEncoder
encoder'
Maybe VideoCodecState
maybeResult <- Ptr VideoCodecState
-> (Ptr VideoCodecState -> IO VideoCodecState)
-> IO (Maybe VideoCodecState)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoCodecState
result ((Ptr VideoCodecState -> IO VideoCodecState)
-> IO (Maybe VideoCodecState))
-> (Ptr VideoCodecState -> IO VideoCodecState)
-> IO (Maybe VideoCodecState)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
result' -> do
VideoCodecState
result'' <- ((ManagedPtr VideoCodecState -> VideoCodecState)
-> Ptr VideoCodecState -> IO VideoCodecState
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecState -> VideoCodecState
GstVideo.VideoCodecState.VideoCodecState) Ptr VideoCodecState
result'
VideoCodecState -> IO VideoCodecState
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecState
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
Maybe VideoCodecState -> IO (Maybe VideoCodecState)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoCodecState
maybeResult
#if defined(ENABLE_OVERLOADING)
data VideoEncoderGetOutputStateMethodInfo
instance (signature ~ (m (Maybe GstVideo.VideoCodecState.VideoCodecState)), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderGetOutputStateMethodInfo a signature where
overloadedMethod = videoEncoderGetOutputState
instance O.OverloadedMethodInfo VideoEncoderGetOutputStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderGetOutputState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderGetOutputState"
})
#endif
foreign import ccall "gst_video_encoder_is_qos_enabled" gst_video_encoder_is_qos_enabled ::
Ptr VideoEncoder ->
IO CInt
videoEncoderIsQosEnabled ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> m Bool
videoEncoderIsQosEnabled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> m Bool
videoEncoderIsQosEnabled a
encoder = IO Bool -> m Bool
forall a. IO a -> m a
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 VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
CInt
result <- Ptr VideoEncoder -> IO CInt
gst_video_encoder_is_qos_enabled Ptr VideoEncoder
encoder'
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
encoder
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VideoEncoderIsQosEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderIsQosEnabledMethodInfo a signature where
overloadedMethod = videoEncoderIsQosEnabled
instance O.OverloadedMethodInfo VideoEncoderIsQosEnabledMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderIsQosEnabled",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderIsQosEnabled"
})
#endif
foreign import ccall "gst_video_encoder_merge_tags" gst_video_encoder_merge_tags ::
Ptr VideoEncoder ->
Ptr Gst.TagList.TagList ->
CUInt ->
IO ()
videoEncoderMergeTags ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Maybe (Gst.TagList.TagList)
-> Gst.Enums.TagMergeMode
-> m ()
videoEncoderMergeTags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Maybe TagList -> TagMergeMode -> m ()
videoEncoderMergeTags a
encoder Maybe TagList
tags TagMergeMode
mode = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr TagList
maybeTags <- case Maybe TagList
tags of
Maybe TagList
Nothing -> Ptr TagList -> IO (Ptr TagList)
forall a. a -> IO a
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 a. a -> IO a
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 VideoEncoder -> Ptr TagList -> CUInt -> IO ()
gst_video_encoder_merge_tags Ptr VideoEncoder
encoder' Ptr TagList
maybeTags CUInt
mode'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoEncoderMergeTagsMethodInfo
instance (signature ~ (Maybe (Gst.TagList.TagList) -> Gst.Enums.TagMergeMode -> m ()), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderMergeTagsMethodInfo a signature where
overloadedMethod = videoEncoderMergeTags
instance O.OverloadedMethodInfo VideoEncoderMergeTagsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderMergeTags",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderMergeTags"
})
#endif
foreign import ccall "gst_video_encoder_negotiate" gst_video_encoder_negotiate ::
Ptr VideoEncoder ->
IO CInt
videoEncoderNegotiate ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> m Bool
videoEncoderNegotiate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> m Bool
videoEncoderNegotiate a
encoder = IO Bool -> m Bool
forall a. IO a -> m a
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 VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
CInt
result <- Ptr VideoEncoder -> IO CInt
gst_video_encoder_negotiate Ptr VideoEncoder
encoder'
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
encoder
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data VideoEncoderNegotiateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderNegotiateMethodInfo a signature where
overloadedMethod = videoEncoderNegotiate
instance O.OverloadedMethodInfo VideoEncoderNegotiateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderNegotiate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderNegotiate"
})
#endif
foreign import ccall "gst_video_encoder_proxy_getcaps" gst_video_encoder_proxy_getcaps ::
Ptr VideoEncoder ->
Ptr Gst.Caps.Caps ->
Ptr Gst.Caps.Caps ->
IO (Ptr Gst.Caps.Caps)
videoEncoderProxyGetcaps ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Maybe (Gst.Caps.Caps)
-> Maybe (Gst.Caps.Caps)
-> m Gst.Caps.Caps
videoEncoderProxyGetcaps :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Maybe Caps -> Maybe Caps -> m Caps
videoEncoderProxyGetcaps a
enc Maybe Caps
caps Maybe Caps
filter = IO Caps -> m Caps
forall a. IO a -> m a
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 VideoEncoder
enc' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
enc
Ptr Caps
maybeCaps <- case Maybe Caps
caps of
Maybe Caps
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall a. a -> IO a
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 a. a -> IO a
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 a. a -> IO a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jFilter'
Ptr Caps
result <- Ptr VideoEncoder -> Ptr Caps -> Ptr Caps -> IO (Ptr Caps)
gst_video_encoder_proxy_getcaps Ptr VideoEncoder
enc' Ptr Caps
maybeCaps Ptr Caps
maybeFilter
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoEncoderProxyGetcaps" 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
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data VideoEncoderProxyGetcapsMethodInfo
instance (signature ~ (Maybe (Gst.Caps.Caps) -> Maybe (Gst.Caps.Caps) -> m Gst.Caps.Caps), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderProxyGetcapsMethodInfo a signature where
overloadedMethod = videoEncoderProxyGetcaps
instance O.OverloadedMethodInfo VideoEncoderProxyGetcapsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderProxyGetcaps",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderProxyGetcaps"
})
#endif
foreign import ccall "gst_video_encoder_set_headers" ::
Ptr VideoEncoder ->
Ptr (GList (Ptr Gst.Buffer.Buffer)) ->
IO ()
videoEncoderSetHeaders ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> [Gst.Buffer.Buffer]
-> m ()
a
encoder [Buffer]
headers = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
[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)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM Buffer -> IO (Ptr Buffer)
forall a. (HasCallStack, GBoxed 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 VideoEncoder -> Ptr (GList (Ptr Buffer)) -> IO ()
gst_video_encoder_set_headers Ptr VideoEncoder
encoder' Ptr (GList (Ptr Buffer))
headers''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
(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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoEncoderSetHeadersMethodInfo
instance (signature ~ ([Gst.Buffer.Buffer] -> m ()), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderSetHeadersMethodInfo a signature where
overloadedMethod = videoEncoderSetHeaders
instance O.OverloadedMethodInfo VideoEncoderSetHeadersMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderSetHeaders",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderSetHeaders"
})
#endif
foreign import ccall "gst_video_encoder_set_latency" gst_video_encoder_set_latency ::
Ptr VideoEncoder ->
Word64 ->
Word64 ->
IO ()
videoEncoderSetLatency ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Word64
-> Word64
-> m ()
videoEncoderSetLatency :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Word64 -> Word64 -> m ()
videoEncoderSetLatency a
encoder Word64
minLatency Word64
maxLatency = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoEncoder -> Word64 -> Word64 -> IO ()
gst_video_encoder_set_latency Ptr VideoEncoder
encoder' Word64
minLatency Word64
maxLatency
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoEncoderSetLatencyMethodInfo
instance (signature ~ (Word64 -> Word64 -> m ()), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderSetLatencyMethodInfo a signature where
overloadedMethod = videoEncoderSetLatency
instance O.OverloadedMethodInfo VideoEncoderSetLatencyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderSetLatency",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderSetLatency"
})
#endif
foreign import ccall "gst_video_encoder_set_min_force_key_unit_interval" gst_video_encoder_set_min_force_key_unit_interval ::
Ptr VideoEncoder ->
Word64 ->
IO ()
videoEncoderSetMinForceKeyUnitInterval ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Word64
-> m ()
videoEncoderSetMinForceKeyUnitInterval :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Word64 -> m ()
videoEncoderSetMinForceKeyUnitInterval a
encoder Word64
interval = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoEncoder -> Word64 -> IO ()
gst_video_encoder_set_min_force_key_unit_interval Ptr VideoEncoder
encoder' Word64
interval
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoEncoderSetMinForceKeyUnitIntervalMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderSetMinForceKeyUnitIntervalMethodInfo a signature where
overloadedMethod = videoEncoderSetMinForceKeyUnitInterval
instance O.OverloadedMethodInfo VideoEncoderSetMinForceKeyUnitIntervalMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderSetMinForceKeyUnitInterval",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderSetMinForceKeyUnitInterval"
})
#endif
foreign import ccall "gst_video_encoder_set_min_pts" gst_video_encoder_set_min_pts ::
Ptr VideoEncoder ->
Word64 ->
IO ()
videoEncoderSetMinPts ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Word64
-> m ()
videoEncoderSetMinPts :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Word64 -> m ()
videoEncoderSetMinPts a
encoder Word64
minPts = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr VideoEncoder -> Word64 -> IO ()
gst_video_encoder_set_min_pts Ptr VideoEncoder
encoder' Word64
minPts
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoEncoderSetMinPtsMethodInfo
instance (signature ~ (Word64 -> m ()), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderSetMinPtsMethodInfo a signature where
overloadedMethod = videoEncoderSetMinPts
instance O.OverloadedMethodInfo VideoEncoderSetMinPtsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderSetMinPts",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderSetMinPts"
})
#endif
foreign import ccall "gst_video_encoder_set_output_state" gst_video_encoder_set_output_state ::
Ptr VideoEncoder ->
Ptr Gst.Caps.Caps ->
Ptr GstVideo.VideoCodecState.VideoCodecState ->
IO (Ptr GstVideo.VideoCodecState.VideoCodecState)
videoEncoderSetOutputState ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Gst.Caps.Caps
-> Maybe (GstVideo.VideoCodecState.VideoCodecState)
-> m (Maybe GstVideo.VideoCodecState.VideoCodecState)
videoEncoderSetOutputState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Caps -> Maybe VideoCodecState -> m (Maybe VideoCodecState)
videoEncoderSetOutputState a
encoder Caps
caps Maybe VideoCodecState
reference = IO (Maybe VideoCodecState) -> m (Maybe VideoCodecState)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoCodecState) -> m (Maybe VideoCodecState))
-> IO (Maybe VideoCodecState) -> m (Maybe VideoCodecState)
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps
Ptr VideoCodecState
maybeReference <- case Maybe VideoCodecState
reference of
Maybe VideoCodecState
Nothing -> Ptr VideoCodecState -> IO (Ptr VideoCodecState)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VideoCodecState
forall a. Ptr a
nullPtr
Just VideoCodecState
jReference -> do
Ptr VideoCodecState
jReference' <- VideoCodecState -> IO (Ptr VideoCodecState)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecState
jReference
Ptr VideoCodecState -> IO (Ptr VideoCodecState)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VideoCodecState
jReference'
Ptr VideoCodecState
result <- Ptr VideoEncoder
-> Ptr Caps -> Ptr VideoCodecState -> IO (Ptr VideoCodecState)
gst_video_encoder_set_output_state Ptr VideoEncoder
encoder' Ptr Caps
caps' Ptr VideoCodecState
maybeReference
Maybe VideoCodecState
maybeResult <- Ptr VideoCodecState
-> (Ptr VideoCodecState -> IO VideoCodecState)
-> IO (Maybe VideoCodecState)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr VideoCodecState
result ((Ptr VideoCodecState -> IO VideoCodecState)
-> IO (Maybe VideoCodecState))
-> (Ptr VideoCodecState -> IO VideoCodecState)
-> IO (Maybe VideoCodecState)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
result' -> do
VideoCodecState
result'' <- ((ManagedPtr VideoCodecState -> VideoCodecState)
-> Ptr VideoCodecState -> IO VideoCodecState
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecState -> VideoCodecState
GstVideo.VideoCodecState.VideoCodecState) Ptr VideoCodecState
result'
VideoCodecState -> IO VideoCodecState
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecState
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Maybe VideoCodecState -> (VideoCodecState -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe VideoCodecState
reference VideoCodecState -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe VideoCodecState -> IO (Maybe VideoCodecState)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoCodecState
maybeResult
#if defined(ENABLE_OVERLOADING)
data VideoEncoderSetOutputStateMethodInfo
instance (signature ~ (Gst.Caps.Caps -> Maybe (GstVideo.VideoCodecState.VideoCodecState) -> m (Maybe GstVideo.VideoCodecState.VideoCodecState)), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderSetOutputStateMethodInfo a signature where
overloadedMethod = videoEncoderSetOutputState
instance O.OverloadedMethodInfo VideoEncoderSetOutputStateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderSetOutputState",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderSetOutputState"
})
#endif
foreign import ccall "gst_video_encoder_set_qos_enabled" gst_video_encoder_set_qos_enabled ::
Ptr VideoEncoder ->
CInt ->
IO ()
videoEncoderSetQosEnabled ::
(B.CallStack.HasCallStack, MonadIO m, IsVideoEncoder a) =>
a
-> Bool
-> m ()
videoEncoderSetQosEnabled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsVideoEncoder a) =>
a -> Bool -> m ()
videoEncoderSetQosEnabled a
encoder Bool
enabled = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoEncoder
encoder' <- a -> IO (Ptr VideoEncoder)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
encoder
let enabled' :: CInt
enabled' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
enabled
Ptr VideoEncoder -> CInt -> IO ()
gst_video_encoder_set_qos_enabled Ptr VideoEncoder
encoder' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
encoder
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoEncoderSetQosEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsVideoEncoder a) => O.OverloadedMethod VideoEncoderSetQosEnabledMethodInfo a signature where
overloadedMethod = videoEncoderSetQosEnabled
instance O.OverloadedMethodInfo VideoEncoderSetQosEnabledMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Objects.VideoEncoder.videoEncoderSetQosEnabled",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.28/docs/GI-GstVideo-Objects-VideoEncoder.html#v:videoEncoderSetQosEnabled"
})
#endif