{- | 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.VideoScaler.VideoScaler' is a utility object for rescaling and resampling video frames using various interpolation \/ sampling methods. -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GstVideo.Structs.VideoScaler ( -- * Exported types VideoScaler(..) , noVideoScaler , -- * Methods -- ** 2d #method:2d# #if ENABLE_OVERLOADING VideoScaler2dMethodInfo , #endif videoScaler2d , -- ** free #method:free# #if ENABLE_OVERLOADING VideoScalerFreeMethodInfo , #endif videoScalerFree , -- ** getCoeff #method:getCoeff# #if ENABLE_OVERLOADING VideoScalerGetCoeffMethodInfo , #endif videoScalerGetCoeff , -- ** getMaxTaps #method:getMaxTaps# #if ENABLE_OVERLOADING VideoScalerGetMaxTapsMethodInfo , #endif videoScalerGetMaxTaps , -- ** horizontal #method:horizontal# #if ENABLE_OVERLOADING VideoScalerHorizontalMethodInfo , #endif videoScalerHorizontal , -- ** vertical #method:vertical# #if ENABLE_OVERLOADING VideoScalerVerticalMethodInfo , #endif videoScalerVertical , ) 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 {-# SOURCE #-} qualified GI.GstVideo.Enums as GstVideo.Enums -- | Memory-managed wrapper type. newtype VideoScaler = VideoScaler (ManagedPtr VideoScaler) -- XXX Wrapping a foreign struct/union with no known destructor or size, leak? instance WrappedPtr VideoScaler where wrappedPtrCalloc = return nullPtr wrappedPtrCopy = return wrappedPtrFree = Nothing -- | A convenience alias for `Nothing` :: `Maybe` `VideoScaler`. noVideoScaler :: Maybe VideoScaler noVideoScaler = Nothing #if ENABLE_OVERLOADING instance O.HasAttributeList VideoScaler type instance O.AttributeList VideoScaler = VideoScalerAttributeList type VideoScalerAttributeList = ('[ ] :: [(Symbol, *)]) #endif -- method VideoScaler::2d -- method type : OrdinaryMethod -- Args : [Arg {argCName = "hscale", argType = TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a horzontal #GstVideoScaler", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "vscale", argType = TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a vertical #GstVideoScaler", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "format", argType = TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoFormat for @srcs and @dest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "source pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src_stride", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "source pixels stride", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "destination pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_stride", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "destination pixels stride", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the horizontal destination offset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the vertical destination offset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of output pixels to scale", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of output lines to scale", 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_scaler_2d" gst_video_scaler_2d :: Ptr VideoScaler -> -- hscale : TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}) Ptr VideoScaler -> -- vscale : TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}) CUInt -> -- format : TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}) Ptr () -> -- src : TBasicType TPtr Int32 -> -- src_stride : TBasicType TInt Ptr () -> -- dest : TBasicType TPtr Int32 -> -- dest_stride : TBasicType TInt Word32 -> -- x : TBasicType TUInt Word32 -> -- y : TBasicType TUInt Word32 -> -- width : TBasicType TUInt Word32 -> -- height : TBasicType TUInt IO () {- | Scale a rectangle of pixels in /@src@/ with /@srcStride@/ to /@dest@/ with /@destStride@/ using the horizontal scaler /@hscaler@/ and the vertical scaler /@vscale@/. One or both of /@hscale@/ and /@vscale@/ can be NULL to only perform scaling in one dimension or do a copy without scaling. /@x@/ and /@y@/ are the coordinates in the destination image to process. -} videoScaler2d :: (B.CallStack.HasCallStack, MonadIO m) => VideoScaler {- ^ /@hscale@/: a horzontal 'GI.GstVideo.Structs.VideoScaler.VideoScaler' -} -> VideoScaler {- ^ /@vscale@/: a vertical 'GI.GstVideo.Structs.VideoScaler.VideoScaler' -} -> GstVideo.Enums.VideoFormat {- ^ /@format@/: a 'GI.GstVideo.Enums.VideoFormat' for /@srcs@/ and /@dest@/ -} -> Ptr () {- ^ /@src@/: source pixels -} -> Int32 {- ^ /@srcStride@/: source pixels stride -} -> Ptr () {- ^ /@dest@/: destination pixels -} -> Int32 {- ^ /@destStride@/: destination pixels stride -} -> Word32 {- ^ /@x@/: the horizontal destination offset -} -> Word32 {- ^ /@y@/: the vertical destination offset -} -> Word32 {- ^ /@width@/: the number of output pixels to scale -} -> Word32 {- ^ /@height@/: the number of output lines to scale -} -> m () videoScaler2d hscale vscale format src srcStride dest destStride x y width height = liftIO $ do hscale' <- unsafeManagedPtrGetPtr hscale vscale' <- unsafeManagedPtrGetPtr vscale let format' = (fromIntegral . fromEnum) format gst_video_scaler_2d hscale' vscale' format' src srcStride dest destStride x y width height touchManagedPtr hscale touchManagedPtr vscale return () #if ENABLE_OVERLOADING data VideoScaler2dMethodInfo instance (signature ~ (VideoScaler -> GstVideo.Enums.VideoFormat -> Ptr () -> Int32 -> Ptr () -> Int32 -> Word32 -> Word32 -> Word32 -> Word32 -> m ()), MonadIO m) => O.MethodInfo VideoScaler2dMethodInfo VideoScaler signature where overloadedMethod _ = videoScaler2d #endif -- method VideoScaler::free -- method type : OrdinaryMethod -- Args : [Arg {argCName = "scale", argType = TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoScaler", 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_scaler_free" gst_video_scaler_free :: Ptr VideoScaler -> -- scale : TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}) IO () {- | Free a previously allocated 'GI.GstVideo.Structs.VideoScaler.VideoScaler' /@scale@/. -} videoScalerFree :: (B.CallStack.HasCallStack, MonadIO m) => VideoScaler {- ^ /@scale@/: a 'GI.GstVideo.Structs.VideoScaler.VideoScaler' -} -> m () videoScalerFree scale = liftIO $ do scale' <- unsafeManagedPtrGetPtr scale gst_video_scaler_free scale' touchManagedPtr scale return () #if ENABLE_OVERLOADING data VideoScalerFreeMethodInfo instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoScalerFreeMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerFree #endif -- method VideoScaler::get_coeff -- method type : OrdinaryMethod -- Args : [Arg {argCName = "scale", argType = TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoScaler", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "out_offset", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an output offset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "in_offset", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "result input offset", 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 = Just "result n_taps", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TDouble) -- throws : False -- Skip return : False foreign import ccall "gst_video_scaler_get_coeff" gst_video_scaler_get_coeff :: Ptr VideoScaler -> -- scale : TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}) Word32 -> -- out_offset : TBasicType TUInt Word32 -> -- in_offset : TBasicType TUInt Word32 -> -- n_taps : TBasicType TUInt IO CDouble {- | For a given pixel at /@outOffset@/, get the first required input pixel at /@inOffset@/ and the /@nTaps@/ filter coefficients. Note that for interlaced content, /@inOffset@/ needs to be incremented with 2 to get the next input line. -} videoScalerGetCoeff :: (B.CallStack.HasCallStack, MonadIO m) => VideoScaler {- ^ /@scale@/: a 'GI.GstVideo.Structs.VideoScaler.VideoScaler' -} -> Word32 {- ^ /@outOffset@/: an output offset -} -> Word32 {- ^ /@inOffset@/: result input offset -} -> Word32 {- ^ /@nTaps@/: result n_taps -} -> m Double {- ^ __Returns:__ an array of /@nTap@/ gdouble values with filter coefficients. -} videoScalerGetCoeff scale outOffset inOffset nTaps = liftIO $ do scale' <- unsafeManagedPtrGetPtr scale result <- gst_video_scaler_get_coeff scale' outOffset inOffset nTaps let result' = realToFrac result touchManagedPtr scale return result' #if ENABLE_OVERLOADING data VideoScalerGetCoeffMethodInfo instance (signature ~ (Word32 -> Word32 -> Word32 -> m Double), MonadIO m) => O.MethodInfo VideoScalerGetCoeffMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerGetCoeff #endif -- method VideoScaler::get_max_taps -- method type : OrdinaryMethod -- Args : [Arg {argCName = "scale", argType = TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoScaler", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_video_scaler_get_max_taps" gst_video_scaler_get_max_taps :: Ptr VideoScaler -> -- scale : TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}) IO Word32 {- | Get the maximum number of taps for /@scale@/. -} videoScalerGetMaxTaps :: (B.CallStack.HasCallStack, MonadIO m) => VideoScaler {- ^ /@scale@/: a 'GI.GstVideo.Structs.VideoScaler.VideoScaler' -} -> m Word32 {- ^ __Returns:__ the maximum number of taps -} videoScalerGetMaxTaps scale = liftIO $ do scale' <- unsafeManagedPtrGetPtr scale result <- gst_video_scaler_get_max_taps scale' touchManagedPtr scale return result #if ENABLE_OVERLOADING data VideoScalerGetMaxTapsMethodInfo instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo VideoScalerGetMaxTapsMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerGetMaxTaps #endif -- method VideoScaler::horizontal -- method type : OrdinaryMethod -- Args : [Arg {argCName = "scale", argType = TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoScaler", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "format", argType = TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoFormat for @src and @dest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "source pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "destination pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_offset", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the horizontal destination offset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of pixels to scale", 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_scaler_horizontal" gst_video_scaler_horizontal :: Ptr VideoScaler -> -- scale : TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}) CUInt -> -- format : TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}) Ptr () -> -- src : TBasicType TPtr Ptr () -> -- dest : TBasicType TPtr Word32 -> -- dest_offset : TBasicType TUInt Word32 -> -- width : TBasicType TUInt IO () {- | Horizontally scale the pixels in /@src@/ to /@dest@/, starting from /@destOffset@/ for /@width@/ samples. -} videoScalerHorizontal :: (B.CallStack.HasCallStack, MonadIO m) => VideoScaler {- ^ /@scale@/: a 'GI.GstVideo.Structs.VideoScaler.VideoScaler' -} -> GstVideo.Enums.VideoFormat {- ^ /@format@/: a 'GI.GstVideo.Enums.VideoFormat' for /@src@/ and /@dest@/ -} -> Ptr () {- ^ /@src@/: source pixels -} -> Ptr () {- ^ /@dest@/: destination pixels -} -> Word32 {- ^ /@destOffset@/: the horizontal destination offset -} -> Word32 {- ^ /@width@/: the number of pixels to scale -} -> m () videoScalerHorizontal scale format src dest destOffset width = liftIO $ do scale' <- unsafeManagedPtrGetPtr scale let format' = (fromIntegral . fromEnum) format gst_video_scaler_horizontal scale' format' src dest destOffset width touchManagedPtr scale return () #if ENABLE_OVERLOADING data VideoScalerHorizontalMethodInfo instance (signature ~ (GstVideo.Enums.VideoFormat -> Ptr () -> Ptr () -> Word32 -> Word32 -> m ()), MonadIO m) => O.MethodInfo VideoScalerHorizontalMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerHorizontal #endif -- method VideoScaler::vertical -- method type : OrdinaryMethod -- Args : [Arg {argCName = "scale", argType = TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoScaler", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "format", argType = TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoFormat for @srcs and @dest", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "src_lines", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "source pixels lines", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "destination pixels", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest_offset", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the vertical destination offset", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the number of pixels to scale", 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_scaler_vertical" gst_video_scaler_vertical :: Ptr VideoScaler -> -- scale : TInterface (Name {namespace = "GstVideo", name = "VideoScaler"}) CUInt -> -- format : TInterface (Name {namespace = "GstVideo", name = "VideoFormat"}) Ptr () -> -- src_lines : TBasicType TPtr Ptr () -> -- dest : TBasicType TPtr Word32 -> -- dest_offset : TBasicType TUInt Word32 -> -- width : TBasicType TUInt IO () {- | Vertically combine /@width@/ pixels in the lines in /@srcLines@/ to /@dest@/. /@dest@/ is the location of the target line at /@destOffset@/ and /@srcs@/ are the input lines for /@destOffset@/, as obtained with @/gst_video_scaler_get_info()/@. -} videoScalerVertical :: (B.CallStack.HasCallStack, MonadIO m) => VideoScaler {- ^ /@scale@/: a 'GI.GstVideo.Structs.VideoScaler.VideoScaler' -} -> GstVideo.Enums.VideoFormat {- ^ /@format@/: a 'GI.GstVideo.Enums.VideoFormat' for /@srcs@/ and /@dest@/ -} -> Ptr () {- ^ /@srcLines@/: source pixels lines -} -> Ptr () {- ^ /@dest@/: destination pixels -} -> Word32 {- ^ /@destOffset@/: the vertical destination offset -} -> Word32 {- ^ /@width@/: the number of pixels to scale -} -> m () videoScalerVertical scale format srcLines dest destOffset width = liftIO $ do scale' <- unsafeManagedPtrGetPtr scale let format' = (fromIntegral . fromEnum) format gst_video_scaler_vertical scale' format' srcLines dest destOffset width touchManagedPtr scale return () #if ENABLE_OVERLOADING data VideoScalerVerticalMethodInfo instance (signature ~ (GstVideo.Enums.VideoFormat -> Ptr () -> Ptr () -> Word32 -> Word32 -> m ()), MonadIO m) => O.MethodInfo VideoScalerVerticalMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerVertical #endif #if ENABLE_OVERLOADING type family ResolveVideoScalerMethod (t :: Symbol) (o :: *) :: * where ResolveVideoScalerMethod "2d" o = VideoScaler2dMethodInfo ResolveVideoScalerMethod "free" o = VideoScalerFreeMethodInfo ResolveVideoScalerMethod "horizontal" o = VideoScalerHorizontalMethodInfo ResolveVideoScalerMethod "vertical" o = VideoScalerVerticalMethodInfo ResolveVideoScalerMethod "getCoeff" o = VideoScalerGetCoeffMethodInfo ResolveVideoScalerMethod "getMaxTaps" o = VideoScalerGetMaxTapsMethodInfo ResolveVideoScalerMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveVideoScalerMethod t VideoScaler, O.MethodInfo info VideoScaler p) => OL.IsLabel t (VideoScaler -> 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