gi-gstvideo-1.0.18: GI/GstVideo/Structs/VideoResampler.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
'GI.GstVideo.Structs.VideoResampler.VideoResampler' is a structure which holds the information
required to perform various kinds of resampling filtering.
/Since: 1.6/
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GstVideo.Structs.VideoResampler
(
-- * Exported types
VideoResampler(..) ,
newZeroVideoResampler ,
noVideoResampler ,
-- * Methods
-- ** clear #method:clear#
#if ENABLE_OVERLOADING
VideoResamplerClearMethodInfo ,
#endif
videoResamplerClear ,
-- ** init #method:init#
#if ENABLE_OVERLOADING
VideoResamplerInitMethodInfo ,
#endif
videoResamplerInit ,
-- * Properties
-- ** inSize #attr:inSize#
{- | the input size
-}
getVideoResamplerInSize ,
setVideoResamplerInSize ,
#if ENABLE_OVERLOADING
videoResampler_inSize ,
#endif
-- ** maxTaps #attr:maxTaps#
{- | the maximum number of taps
-}
getVideoResamplerMaxTaps ,
setVideoResamplerMaxTaps ,
#if ENABLE_OVERLOADING
videoResampler_maxTaps ,
#endif
-- ** nPhases #attr:nPhases#
{- | the number of phases
-}
getVideoResamplerNPhases ,
setVideoResamplerNPhases ,
#if ENABLE_OVERLOADING
videoResampler_nPhases ,
#endif
-- ** nTaps #attr:nTaps#
{- | array with new number of taps for each phase
-}
getVideoResamplerNTaps ,
setVideoResamplerNTaps ,
#if ENABLE_OVERLOADING
videoResampler_nTaps ,
#endif
-- ** offset #attr:offset#
{- | array with the source offset for each output element
-}
getVideoResamplerOffset ,
setVideoResamplerOffset ,
#if ENABLE_OVERLOADING
videoResampler_offset ,
#endif
-- ** outSize #attr:outSize#
{- | the output size
-}
getVideoResamplerOutSize ,
setVideoResamplerOutSize ,
#if ENABLE_OVERLOADING
videoResampler_outSize ,
#endif
-- ** phase #attr:phase#
{- | array with the phase to use for each output element
-}
getVideoResamplerPhase ,
setVideoResamplerPhase ,
#if ENABLE_OVERLOADING
videoResampler_phase ,
#endif
-- ** taps #attr:taps#
{- | the taps for all phases
-}
getVideoResamplerTaps ,
setVideoResamplerTaps ,
#if ENABLE_OVERLOADING
videoResampler_taps ,
#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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.Gst.Structs.Structure as Gst.Structure
import {-# SOURCE #-} qualified GI.GstVideo.Enums as GstVideo.Enums
import {-# SOURCE #-} qualified GI.GstVideo.Flags as GstVideo.Flags
-- | Memory-managed wrapper type.
newtype VideoResampler = VideoResampler (ManagedPtr VideoResampler)
instance WrappedPtr VideoResampler where
wrappedPtrCalloc = callocBytes 80
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 80 >=> wrapPtr VideoResampler)
wrappedPtrFree = Just ptr_to_g_free
-- | Construct a `VideoResampler` struct initialized to zero.
newZeroVideoResampler :: MonadIO m => m VideoResampler
newZeroVideoResampler = liftIO $ wrappedPtrCalloc >>= wrapPtr VideoResampler
instance tag ~ 'AttrSet => Constructible VideoResampler tag where
new _ attrs = do
o <- newZeroVideoResampler
GI.Attributes.set o attrs
return o
-- | A convenience alias for `Nothing` :: `Maybe` `VideoResampler`.
noVideoResampler :: Maybe VideoResampler
noVideoResampler = Nothing
{- |
Get the value of the “@in_size@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoResampler #inSize
@
-}
getVideoResamplerInSize :: MonadIO m => VideoResampler -> m Int32
getVideoResamplerInSize s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Int32
return val
{- |
Set the value of the “@in_size@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoResampler [ #inSize 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoResamplerInSize :: MonadIO m => VideoResampler -> Int32 -> m ()
setVideoResamplerInSize s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (val :: Int32)
#if ENABLE_OVERLOADING
data VideoResamplerInSizeFieldInfo
instance AttrInfo VideoResamplerInSizeFieldInfo where
type AttrAllowedOps VideoResamplerInSizeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoResamplerInSizeFieldInfo = (~) Int32
type AttrBaseTypeConstraint VideoResamplerInSizeFieldInfo = (~) VideoResampler
type AttrGetType VideoResamplerInSizeFieldInfo = Int32
type AttrLabel VideoResamplerInSizeFieldInfo = "in_size"
type AttrOrigin VideoResamplerInSizeFieldInfo = VideoResampler
attrGet _ = getVideoResamplerInSize
attrSet _ = setVideoResamplerInSize
attrConstruct = undefined
attrClear _ = undefined
videoResampler_inSize :: AttrLabelProxy "inSize"
videoResampler_inSize = AttrLabelProxy
#endif
{- |
Get the value of the “@out_size@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoResampler #outSize
@
-}
getVideoResamplerOutSize :: MonadIO m => VideoResampler -> m Int32
getVideoResamplerOutSize s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 4) :: IO Int32
return val
{- |
Set the value of the “@out_size@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoResampler [ #outSize 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoResamplerOutSize :: MonadIO m => VideoResampler -> Int32 -> m ()
setVideoResamplerOutSize s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 4) (val :: Int32)
#if ENABLE_OVERLOADING
data VideoResamplerOutSizeFieldInfo
instance AttrInfo VideoResamplerOutSizeFieldInfo where
type AttrAllowedOps VideoResamplerOutSizeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoResamplerOutSizeFieldInfo = (~) Int32
type AttrBaseTypeConstraint VideoResamplerOutSizeFieldInfo = (~) VideoResampler
type AttrGetType VideoResamplerOutSizeFieldInfo = Int32
type AttrLabel VideoResamplerOutSizeFieldInfo = "out_size"
type AttrOrigin VideoResamplerOutSizeFieldInfo = VideoResampler
attrGet _ = getVideoResamplerOutSize
attrSet _ = setVideoResamplerOutSize
attrConstruct = undefined
attrClear _ = undefined
videoResampler_outSize :: AttrLabelProxy "outSize"
videoResampler_outSize = AttrLabelProxy
#endif
{- |
Get the value of the “@max_taps@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoResampler #maxTaps
@
-}
getVideoResamplerMaxTaps :: MonadIO m => VideoResampler -> m Word32
getVideoResamplerMaxTaps s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO Word32
return val
{- |
Set the value of the “@max_taps@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoResampler [ #maxTaps 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoResamplerMaxTaps :: MonadIO m => VideoResampler -> Word32 -> m ()
setVideoResamplerMaxTaps s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoResamplerMaxTapsFieldInfo
instance AttrInfo VideoResamplerMaxTapsFieldInfo where
type AttrAllowedOps VideoResamplerMaxTapsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoResamplerMaxTapsFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoResamplerMaxTapsFieldInfo = (~) VideoResampler
type AttrGetType VideoResamplerMaxTapsFieldInfo = Word32
type AttrLabel VideoResamplerMaxTapsFieldInfo = "max_taps"
type AttrOrigin VideoResamplerMaxTapsFieldInfo = VideoResampler
attrGet _ = getVideoResamplerMaxTaps
attrSet _ = setVideoResamplerMaxTaps
attrConstruct = undefined
attrClear _ = undefined
videoResampler_maxTaps :: AttrLabelProxy "maxTaps"
videoResampler_maxTaps = AttrLabelProxy
#endif
{- |
Get the value of the “@n_phases@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoResampler #nPhases
@
-}
getVideoResamplerNPhases :: MonadIO m => VideoResampler -> m Word32
getVideoResamplerNPhases s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 12) :: IO Word32
return val
{- |
Set the value of the “@n_phases@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoResampler [ #nPhases 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoResamplerNPhases :: MonadIO m => VideoResampler -> Word32 -> m ()
setVideoResamplerNPhases s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 12) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoResamplerNPhasesFieldInfo
instance AttrInfo VideoResamplerNPhasesFieldInfo where
type AttrAllowedOps VideoResamplerNPhasesFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoResamplerNPhasesFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoResamplerNPhasesFieldInfo = (~) VideoResampler
type AttrGetType VideoResamplerNPhasesFieldInfo = Word32
type AttrLabel VideoResamplerNPhasesFieldInfo = "n_phases"
type AttrOrigin VideoResamplerNPhasesFieldInfo = VideoResampler
attrGet _ = getVideoResamplerNPhases
attrSet _ = setVideoResamplerNPhases
attrConstruct = undefined
attrClear _ = undefined
videoResampler_nPhases :: AttrLabelProxy "nPhases"
videoResampler_nPhases = AttrLabelProxy
#endif
{- |
Get the value of the “@offset@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoResampler #offset
@
-}
getVideoResamplerOffset :: MonadIO m => VideoResampler -> m Word32
getVideoResamplerOffset s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO Word32
return val
{- |
Set the value of the “@offset@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoResampler [ #offset 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoResamplerOffset :: MonadIO m => VideoResampler -> Word32 -> m ()
setVideoResamplerOffset s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoResamplerOffsetFieldInfo
instance AttrInfo VideoResamplerOffsetFieldInfo where
type AttrAllowedOps VideoResamplerOffsetFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoResamplerOffsetFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoResamplerOffsetFieldInfo = (~) VideoResampler
type AttrGetType VideoResamplerOffsetFieldInfo = Word32
type AttrLabel VideoResamplerOffsetFieldInfo = "offset"
type AttrOrigin VideoResamplerOffsetFieldInfo = VideoResampler
attrGet _ = getVideoResamplerOffset
attrSet _ = setVideoResamplerOffset
attrConstruct = undefined
attrClear _ = undefined
videoResampler_offset :: AttrLabelProxy "offset"
videoResampler_offset = AttrLabelProxy
#endif
{- |
Get the value of the “@phase@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoResampler #phase
@
-}
getVideoResamplerPhase :: MonadIO m => VideoResampler -> m Word32
getVideoResamplerPhase s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO Word32
return val
{- |
Set the value of the “@phase@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoResampler [ #phase 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoResamplerPhase :: MonadIO m => VideoResampler -> Word32 -> m ()
setVideoResamplerPhase s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoResamplerPhaseFieldInfo
instance AttrInfo VideoResamplerPhaseFieldInfo where
type AttrAllowedOps VideoResamplerPhaseFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoResamplerPhaseFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoResamplerPhaseFieldInfo = (~) VideoResampler
type AttrGetType VideoResamplerPhaseFieldInfo = Word32
type AttrLabel VideoResamplerPhaseFieldInfo = "phase"
type AttrOrigin VideoResamplerPhaseFieldInfo = VideoResampler
attrGet _ = getVideoResamplerPhase
attrSet _ = setVideoResamplerPhase
attrConstruct = undefined
attrClear _ = undefined
videoResampler_phase :: AttrLabelProxy "phase"
videoResampler_phase = AttrLabelProxy
#endif
{- |
Get the value of the “@n_taps@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoResampler #nTaps
@
-}
getVideoResamplerNTaps :: MonadIO m => VideoResampler -> m Word32
getVideoResamplerNTaps s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 32) :: IO Word32
return val
{- |
Set the value of the “@n_taps@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoResampler [ #nTaps 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoResamplerNTaps :: MonadIO m => VideoResampler -> Word32 -> m ()
setVideoResamplerNTaps s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 32) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoResamplerNTapsFieldInfo
instance AttrInfo VideoResamplerNTapsFieldInfo where
type AttrAllowedOps VideoResamplerNTapsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoResamplerNTapsFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoResamplerNTapsFieldInfo = (~) VideoResampler
type AttrGetType VideoResamplerNTapsFieldInfo = Word32
type AttrLabel VideoResamplerNTapsFieldInfo = "n_taps"
type AttrOrigin VideoResamplerNTapsFieldInfo = VideoResampler
attrGet _ = getVideoResamplerNTaps
attrSet _ = setVideoResamplerNTaps
attrConstruct = undefined
attrClear _ = undefined
videoResampler_nTaps :: AttrLabelProxy "nTaps"
videoResampler_nTaps = AttrLabelProxy
#endif
{- |
Get the value of the “@taps@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoResampler #taps
@
-}
getVideoResamplerTaps :: MonadIO m => VideoResampler -> m Double
getVideoResamplerTaps s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 40) :: IO CDouble
let val' = realToFrac val
return val'
{- |
Set the value of the “@taps@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoResampler [ #taps 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoResamplerTaps :: MonadIO m => VideoResampler -> Double -> m ()
setVideoResamplerTaps s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = realToFrac val
poke (ptr `plusPtr` 40) (val' :: CDouble)
#if ENABLE_OVERLOADING
data VideoResamplerTapsFieldInfo
instance AttrInfo VideoResamplerTapsFieldInfo where
type AttrAllowedOps VideoResamplerTapsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoResamplerTapsFieldInfo = (~) Double
type AttrBaseTypeConstraint VideoResamplerTapsFieldInfo = (~) VideoResampler
type AttrGetType VideoResamplerTapsFieldInfo = Double
type AttrLabel VideoResamplerTapsFieldInfo = "taps"
type AttrOrigin VideoResamplerTapsFieldInfo = VideoResampler
attrGet _ = getVideoResamplerTaps
attrSet _ = setVideoResamplerTaps
attrConstruct = undefined
attrClear _ = undefined
videoResampler_taps :: AttrLabelProxy "taps"
videoResampler_taps = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList VideoResampler
type instance O.AttributeList VideoResampler = VideoResamplerAttributeList
type VideoResamplerAttributeList = ('[ '("inSize", VideoResamplerInSizeFieldInfo), '("outSize", VideoResamplerOutSizeFieldInfo), '("maxTaps", VideoResamplerMaxTapsFieldInfo), '("nPhases", VideoResamplerNPhasesFieldInfo), '("offset", VideoResamplerOffsetFieldInfo), '("phase", VideoResamplerPhaseFieldInfo), '("nTaps", VideoResamplerNTapsFieldInfo), '("taps", VideoResamplerTapsFieldInfo)] :: [(Symbol, *)])
#endif
-- method VideoResampler::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "resampler", argType = TInterface (Name {namespace = "GstVideo", name = "VideoResampler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoResampler", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_resampler_clear" gst_video_resampler_clear ::
Ptr VideoResampler -> -- resampler : TInterface (Name {namespace = "GstVideo", name = "VideoResampler"})
IO ()
{- |
Clear a previously initialized 'GI.GstVideo.Structs.VideoResampler.VideoResampler' /@resampler@/.
/Since: 1.6/
-}
videoResamplerClear ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoResampler
{- ^ /@resampler@/: a 'GI.GstVideo.Structs.VideoResampler.VideoResampler' -}
-> m ()
videoResamplerClear resampler = liftIO $ do
resampler' <- unsafeManagedPtrGetPtr resampler
gst_video_resampler_clear resampler'
touchManagedPtr resampler
return ()
#if ENABLE_OVERLOADING
data VideoResamplerClearMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoResamplerClearMethodInfo VideoResampler signature where
overloadedMethod _ = videoResamplerClear
#endif
-- method VideoResampler::init
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "resampler", argType = TInterface (Name {namespace = "GstVideo", name = "VideoResampler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "method", argType = TInterface (Name {namespace = "GstVideo", name = "VideoResamplerMethod"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GstVideo", name = "VideoResamplerFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_phases", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "n_taps", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "shift", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "in_size", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "out_size", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "Gst", name = "Structure"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_resampler_init" gst_video_resampler_init ::
Ptr VideoResampler -> -- resampler : TInterface (Name {namespace = "GstVideo", name = "VideoResampler"})
CUInt -> -- method : TInterface (Name {namespace = "GstVideo", name = "VideoResamplerMethod"})
CUInt -> -- flags : TInterface (Name {namespace = "GstVideo", name = "VideoResamplerFlags"})
Word32 -> -- n_phases : TBasicType TUInt
Word32 -> -- n_taps : TBasicType TUInt
CDouble -> -- shift : TBasicType TDouble
Word32 -> -- in_size : TBasicType TUInt
Word32 -> -- out_size : TBasicType TUInt
Ptr Gst.Structure.Structure -> -- options : TInterface (Name {namespace = "Gst", name = "Structure"})
IO CInt
{- |
/No description available in the introspection data./
-}
videoResamplerInit ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoResampler
-> GstVideo.Enums.VideoResamplerMethod
-> [GstVideo.Flags.VideoResamplerFlags]
-> Word32
-> Word32
-> Double
-> Word32
-> Word32
-> Gst.Structure.Structure
-> m Bool
videoResamplerInit resampler method flags nPhases nTaps shift inSize outSize options = liftIO $ do
resampler' <- unsafeManagedPtrGetPtr resampler
let method' = (fromIntegral . fromEnum) method
let flags' = gflagsToWord flags
let shift' = realToFrac shift
options' <- unsafeManagedPtrGetPtr options
result <- gst_video_resampler_init resampler' method' flags' nPhases nTaps shift' inSize outSize options'
let result' = (/= 0) result
touchManagedPtr resampler
touchManagedPtr options
return result'
#if ENABLE_OVERLOADING
data VideoResamplerInitMethodInfo
instance (signature ~ (GstVideo.Enums.VideoResamplerMethod -> [GstVideo.Flags.VideoResamplerFlags] -> Word32 -> Word32 -> Double -> Word32 -> Word32 -> Gst.Structure.Structure -> m Bool), MonadIO m) => O.MethodInfo VideoResamplerInitMethodInfo VideoResampler signature where
overloadedMethod _ = videoResamplerInit
#endif
#if ENABLE_OVERLOADING
type family ResolveVideoResamplerMethod (t :: Symbol) (o :: *) :: * where
ResolveVideoResamplerMethod "clear" o = VideoResamplerClearMethodInfo
ResolveVideoResamplerMethod "init" o = VideoResamplerInitMethodInfo
ResolveVideoResamplerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveVideoResamplerMethod t VideoResampler, O.MethodInfo info VideoResampler p) => OL.IsLabel t (VideoResampler -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif