{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) Extra data passed to a video transform #GstMetaTransformFunction such as: "gst-video-scale". -} module GI.GstVideo.Structs.VideoMetaTransform ( -- * Exported types VideoMetaTransform(..) , newZeroVideoMetaTransform , noVideoMetaTransform , -- * Methods -- ** videoMetaTransformScaleGetQuark videoMetaTransformScaleGetQuark , -- * Properties -- ** InInfo videoMetaTransformReadInInfo , -- ** OutInfo videoMetaTransformReadOutInfo , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.GstVideo.Types import GI.GstVideo.Callbacks newtype VideoMetaTransform = VideoMetaTransform (ForeignPtr VideoMetaTransform) -- | Construct a `VideoMetaTransform` struct initialized to zero. newZeroVideoMetaTransform :: MonadIO m => m VideoMetaTransform newZeroVideoMetaTransform = liftIO $ callocBytes 16 >>= wrapPtr VideoMetaTransform noVideoMetaTransform :: Maybe VideoMetaTransform noVideoMetaTransform = Nothing videoMetaTransformReadInInfo :: VideoMetaTransform -> IO VideoInfo videoMetaTransformReadInInfo s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 0) :: IO (Ptr VideoInfo) val' <- (newBoxed VideoInfo) val return val' videoMetaTransformReadOutInfo :: VideoMetaTransform -> IO VideoInfo videoMetaTransformReadOutInfo s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 8) :: IO (Ptr VideoInfo) val' <- (newBoxed VideoInfo) val return val' -- method VideoMetaTransform::scale_get_quark -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "gst_video_meta_transform_scale_get_quark" gst_video_meta_transform_scale_get_quark :: IO Word32 videoMetaTransformScaleGetQuark :: (MonadIO m) => m Word32 -- result videoMetaTransformScaleGetQuark = liftIO $ do result <- gst_video_meta_transform_scale_get_quark return result type family ResolveVideoMetaTransformMethod (t :: Symbol) (o :: *) :: * where ResolveVideoMetaTransformMethod l o = MethodResolutionFailed l o instance (info ~ ResolveVideoMetaTransformMethod t VideoMetaTransform, MethodInfo info VideoMetaTransform p) => IsLabelProxy t (VideoMetaTransform -> p) where fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info) #if MIN_VERSION_base(4,9,0) instance (info ~ ResolveVideoMetaTransformMethod t VideoMetaTransform, MethodInfo info VideoMetaTransform p) => IsLabel t (VideoMetaTransform -> p) where fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info) #endif