{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) 'GI.GstVideo.Structs.VideoScaler.VideoScaler' is a utility object for rescaling and resampling video frames using various interpolation \/ sampling methods. -} module GI.GstVideo.Structs.VideoScaler ( -- * Exported types VideoScaler(..) , noVideoScaler , -- * Methods -- ** 2d #method:2d# VideoScaler2dMethodInfo , videoScaler2d , -- ** free #method:free# VideoScalerFreeMethodInfo , videoScalerFree , -- ** getCoeff #method:getCoeff# VideoScalerGetCoeffMethodInfo , videoScalerGetCoeff , -- ** getMaxTaps #method:getMaxTaps# VideoScalerGetMaxTapsMethodInfo , videoScalerGetMaxTaps , -- ** horizontal #method:horizontal# VideoScalerHorizontalMethodInfo , videoScalerHorizontal , -- ** vertical #method:vertical# VideoScalerVerticalMethodInfo , 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.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack 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 {-# SOURCE #-} qualified GI.GstVideo.Enums as GstVideo.Enums 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 noVideoScaler :: Maybe VideoScaler noVideoScaler = Nothing instance O.HasAttributeList VideoScaler type instance O.AttributeList VideoScaler = VideoScalerAttributeList type VideoScalerAttributeList = ('[ ] :: [(Symbol, *)]) -- 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 () 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 -- 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 () data VideoScalerFreeMethodInfo instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoScalerFreeMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerFree -- 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' data VideoScalerGetCoeffMethodInfo instance (signature ~ (Word32 -> Word32 -> Word32 -> m Double), MonadIO m) => O.MethodInfo VideoScalerGetCoeffMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerGetCoeff -- 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 data VideoScalerGetMaxTapsMethodInfo instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo VideoScalerGetMaxTapsMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerGetMaxTaps -- 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 () data VideoScalerHorizontalMethodInfo instance (signature ~ (GstVideo.Enums.VideoFormat -> Ptr () -> Ptr () -> Word32 -> Word32 -> m ()), MonadIO m) => O.MethodInfo VideoScalerHorizontalMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerHorizontal -- 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 () data VideoScalerVerticalMethodInfo instance (signature ~ (GstVideo.Enums.VideoFormat -> Ptr () -> Ptr () -> Word32 -> Word32 -> m ()), MonadIO m) => O.MethodInfo VideoScalerVerticalMethodInfo VideoScaler signature where overloadedMethod _ = videoScalerVertical 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) => O.IsLabelProxy t (VideoScaler -> p) where fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #if MIN_VERSION_base(4,9,0) instance (info ~ ResolveVideoScalerMethod t VideoScaler, O.MethodInfo info VideoScaler p) => O.IsLabel t (VideoScaler -> p) where fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #endif