{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) Extra buffer metadata describing an image region of interest -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GstVideo.Structs.VideoRegionOfInterestMeta ( -- * Exported types VideoRegionOfInterestMeta(..) , newZeroVideoRegionOfInterestMeta , noVideoRegionOfInterestMeta , -- * Methods -- ** addParam #method:addParam# #if ENABLE_OVERLOADING VideoRegionOfInterestMetaAddParamMethodInfo, #endif videoRegionOfInterestMetaAddParam , -- ** getInfo #method:getInfo# videoRegionOfInterestMetaGetInfo , -- ** getParam #method:getParam# #if ENABLE_OVERLOADING VideoRegionOfInterestMetaGetParamMethodInfo, #endif videoRegionOfInterestMetaGetParam , -- * Properties -- ** h #attr:h# {- | bounding box height -} getVideoRegionOfInterestMetaH , setVideoRegionOfInterestMetaH , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_h , #endif -- ** id #attr:id# {- | identifier of this particular ROI -} getVideoRegionOfInterestMetaId , setVideoRegionOfInterestMetaId , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_id , #endif -- ** meta #attr:meta# {- | parent 'GI.Gst.Structs.Meta.Meta' -} getVideoRegionOfInterestMetaMeta , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_meta , #endif -- ** params #attr:params# {- | list of 'GI.Gst.Structs.Structure.Structure' containing element-specific params for downstream, see @/gst_video_region_of_interest_meta_add_params()/@. (Since: 1.14) -} clearVideoRegionOfInterestMetaParams , getVideoRegionOfInterestMetaParams , setVideoRegionOfInterestMetaParams , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_params , #endif -- ** parentId #attr:parentId# {- | identifier of its parent ROI, used f.i. for ROI hierarchisation. -} getVideoRegionOfInterestMetaParentId , setVideoRegionOfInterestMetaParentId , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_parentId , #endif -- ** roiType #attr:roiType# {- | GQuark describing the semantic of the Roi (f.i. a face, a pedestrian) -} getVideoRegionOfInterestMetaRoiType , setVideoRegionOfInterestMetaRoiType , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_roiType , #endif -- ** w #attr:w# {- | bounding box width -} getVideoRegionOfInterestMetaW , setVideoRegionOfInterestMetaW , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_w , #endif -- ** x #attr:x# {- | x component of upper-left corner -} getVideoRegionOfInterestMetaX , setVideoRegionOfInterestMetaX , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_x , #endif -- ** y #attr:y# {- | y component of upper-left corner -} getVideoRegionOfInterestMetaY , setVideoRegionOfInterestMetaY , #if ENABLE_OVERLOADING videoRegionOfInterestMeta_y , #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.Meta as Gst.Meta import qualified GI.Gst.Structs.MetaInfo as Gst.MetaInfo import qualified GI.Gst.Structs.Structure as Gst.Structure -- | Memory-managed wrapper type. newtype VideoRegionOfInterestMeta = VideoRegionOfInterestMeta (ManagedPtr VideoRegionOfInterestMeta) instance WrappedPtr VideoRegionOfInterestMeta where wrappedPtrCalloc = callocBytes 56 wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 56 >=> wrapPtr VideoRegionOfInterestMeta) wrappedPtrFree = Just ptr_to_g_free -- | Construct a `VideoRegionOfInterestMeta` struct initialized to zero. newZeroVideoRegionOfInterestMeta :: MonadIO m => m VideoRegionOfInterestMeta newZeroVideoRegionOfInterestMeta = liftIO $ wrappedPtrCalloc >>= wrapPtr VideoRegionOfInterestMeta instance tag ~ 'AttrSet => Constructible VideoRegionOfInterestMeta tag where new _ attrs = do o <- newZeroVideoRegionOfInterestMeta GI.Attributes.set o attrs return o -- | A convenience alias for `Nothing` :: `Maybe` `VideoRegionOfInterestMeta`. noVideoRegionOfInterestMeta :: Maybe VideoRegionOfInterestMeta noVideoRegionOfInterestMeta = Nothing {- | Get the value of the “@meta@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #meta @ -} getVideoRegionOfInterestMetaMeta :: MonadIO m => VideoRegionOfInterestMeta -> m Gst.Meta.Meta getVideoRegionOfInterestMetaMeta s = liftIO $ withManagedPtr s $ \ptr -> do let val = ptr `plusPtr` 0 :: (Ptr Gst.Meta.Meta) val' <- (newPtr Gst.Meta.Meta) val return val' #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaMetaFieldInfo instance AttrInfo VideoRegionOfInterestMetaMetaFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaMetaFieldInfo = '[ 'AttrGet] type AttrSetTypeConstraint VideoRegionOfInterestMetaMetaFieldInfo = (~) (Ptr Gst.Meta.Meta) type AttrBaseTypeConstraint VideoRegionOfInterestMetaMetaFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaMetaFieldInfo = Gst.Meta.Meta type AttrLabel VideoRegionOfInterestMetaMetaFieldInfo = "meta" type AttrOrigin VideoRegionOfInterestMetaMetaFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaMeta attrSet _ = undefined attrConstruct = undefined attrClear _ = undefined videoRegionOfInterestMeta_meta :: AttrLabelProxy "meta" videoRegionOfInterestMeta_meta = AttrLabelProxy #endif {- | Get the value of the “@roi_type@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #roiType @ -} getVideoRegionOfInterestMetaRoiType :: MonadIO m => VideoRegionOfInterestMeta -> m Word32 getVideoRegionOfInterestMetaRoiType s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 16) :: IO Word32 return val {- | Set the value of the “@roi_type@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' videoRegionOfInterestMeta [ #roiType 'Data.GI.Base.Attributes.:=' value ] @ -} setVideoRegionOfInterestMetaRoiType :: MonadIO m => VideoRegionOfInterestMeta -> Word32 -> m () setVideoRegionOfInterestMetaRoiType s val = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 16) (val :: Word32) #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaRoiTypeFieldInfo instance AttrInfo VideoRegionOfInterestMetaRoiTypeFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaRoiTypeFieldInfo = '[ 'AttrSet, 'AttrGet] type AttrSetTypeConstraint VideoRegionOfInterestMetaRoiTypeFieldInfo = (~) Word32 type AttrBaseTypeConstraint VideoRegionOfInterestMetaRoiTypeFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaRoiTypeFieldInfo = Word32 type AttrLabel VideoRegionOfInterestMetaRoiTypeFieldInfo = "roi_type" type AttrOrigin VideoRegionOfInterestMetaRoiTypeFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaRoiType attrSet _ = setVideoRegionOfInterestMetaRoiType attrConstruct = undefined attrClear _ = undefined videoRegionOfInterestMeta_roiType :: AttrLabelProxy "roiType" videoRegionOfInterestMeta_roiType = AttrLabelProxy #endif {- | Get the value of the “@id@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #id @ -} getVideoRegionOfInterestMetaId :: MonadIO m => VideoRegionOfInterestMeta -> m Int32 getVideoRegionOfInterestMetaId s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 20) :: IO Int32 return val {- | Set the value of the “@id@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' videoRegionOfInterestMeta [ #id 'Data.GI.Base.Attributes.:=' value ] @ -} setVideoRegionOfInterestMetaId :: MonadIO m => VideoRegionOfInterestMeta -> Int32 -> m () setVideoRegionOfInterestMetaId s val = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 20) (val :: Int32) #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaIdFieldInfo instance AttrInfo VideoRegionOfInterestMetaIdFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaIdFieldInfo = '[ 'AttrSet, 'AttrGet] type AttrSetTypeConstraint VideoRegionOfInterestMetaIdFieldInfo = (~) Int32 type AttrBaseTypeConstraint VideoRegionOfInterestMetaIdFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaIdFieldInfo = Int32 type AttrLabel VideoRegionOfInterestMetaIdFieldInfo = "id" type AttrOrigin VideoRegionOfInterestMetaIdFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaId attrSet _ = setVideoRegionOfInterestMetaId attrConstruct = undefined attrClear _ = undefined videoRegionOfInterestMeta_id :: AttrLabelProxy "id" videoRegionOfInterestMeta_id = AttrLabelProxy #endif {- | Get the value of the “@parent_id@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #parentId @ -} getVideoRegionOfInterestMetaParentId :: MonadIO m => VideoRegionOfInterestMeta -> m Int32 getVideoRegionOfInterestMetaParentId s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 24) :: IO Int32 return val {- | Set the value of the “@parent_id@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' videoRegionOfInterestMeta [ #parentId 'Data.GI.Base.Attributes.:=' value ] @ -} setVideoRegionOfInterestMetaParentId :: MonadIO m => VideoRegionOfInterestMeta -> Int32 -> m () setVideoRegionOfInterestMetaParentId s val = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 24) (val :: Int32) #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaParentIdFieldInfo instance AttrInfo VideoRegionOfInterestMetaParentIdFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaParentIdFieldInfo = '[ 'AttrSet, 'AttrGet] type AttrSetTypeConstraint VideoRegionOfInterestMetaParentIdFieldInfo = (~) Int32 type AttrBaseTypeConstraint VideoRegionOfInterestMetaParentIdFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaParentIdFieldInfo = Int32 type AttrLabel VideoRegionOfInterestMetaParentIdFieldInfo = "parent_id" type AttrOrigin VideoRegionOfInterestMetaParentIdFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaParentId attrSet _ = setVideoRegionOfInterestMetaParentId attrConstruct = undefined attrClear _ = undefined videoRegionOfInterestMeta_parentId :: AttrLabelProxy "parentId" videoRegionOfInterestMeta_parentId = AttrLabelProxy #endif {- | Get the value of the “@x@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #x @ -} getVideoRegionOfInterestMetaX :: MonadIO m => VideoRegionOfInterestMeta -> m Word32 getVideoRegionOfInterestMetaX s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 28) :: IO Word32 return val {- | Set the value of the “@x@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' videoRegionOfInterestMeta [ #x 'Data.GI.Base.Attributes.:=' value ] @ -} setVideoRegionOfInterestMetaX :: MonadIO m => VideoRegionOfInterestMeta -> Word32 -> m () setVideoRegionOfInterestMetaX s val = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 28) (val :: Word32) #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaXFieldInfo instance AttrInfo VideoRegionOfInterestMetaXFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaXFieldInfo = '[ 'AttrSet, 'AttrGet] type AttrSetTypeConstraint VideoRegionOfInterestMetaXFieldInfo = (~) Word32 type AttrBaseTypeConstraint VideoRegionOfInterestMetaXFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaXFieldInfo = Word32 type AttrLabel VideoRegionOfInterestMetaXFieldInfo = "x" type AttrOrigin VideoRegionOfInterestMetaXFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaX attrSet _ = setVideoRegionOfInterestMetaX attrConstruct = undefined attrClear _ = undefined videoRegionOfInterestMeta_x :: AttrLabelProxy "x" videoRegionOfInterestMeta_x = AttrLabelProxy #endif {- | Get the value of the “@y@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #y @ -} getVideoRegionOfInterestMetaY :: MonadIO m => VideoRegionOfInterestMeta -> m Word32 getVideoRegionOfInterestMetaY s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 32) :: IO Word32 return val {- | Set the value of the “@y@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' videoRegionOfInterestMeta [ #y 'Data.GI.Base.Attributes.:=' value ] @ -} setVideoRegionOfInterestMetaY :: MonadIO m => VideoRegionOfInterestMeta -> Word32 -> m () setVideoRegionOfInterestMetaY s val = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 32) (val :: Word32) #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaYFieldInfo instance AttrInfo VideoRegionOfInterestMetaYFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaYFieldInfo = '[ 'AttrSet, 'AttrGet] type AttrSetTypeConstraint VideoRegionOfInterestMetaYFieldInfo = (~) Word32 type AttrBaseTypeConstraint VideoRegionOfInterestMetaYFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaYFieldInfo = Word32 type AttrLabel VideoRegionOfInterestMetaYFieldInfo = "y" type AttrOrigin VideoRegionOfInterestMetaYFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaY attrSet _ = setVideoRegionOfInterestMetaY attrConstruct = undefined attrClear _ = undefined videoRegionOfInterestMeta_y :: AttrLabelProxy "y" videoRegionOfInterestMeta_y = AttrLabelProxy #endif {- | Get the value of the “@w@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #w @ -} getVideoRegionOfInterestMetaW :: MonadIO m => VideoRegionOfInterestMeta -> m Word32 getVideoRegionOfInterestMetaW s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 36) :: IO Word32 return val {- | Set the value of the “@w@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' videoRegionOfInterestMeta [ #w 'Data.GI.Base.Attributes.:=' value ] @ -} setVideoRegionOfInterestMetaW :: MonadIO m => VideoRegionOfInterestMeta -> Word32 -> m () setVideoRegionOfInterestMetaW s val = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 36) (val :: Word32) #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaWFieldInfo instance AttrInfo VideoRegionOfInterestMetaWFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaWFieldInfo = '[ 'AttrSet, 'AttrGet] type AttrSetTypeConstraint VideoRegionOfInterestMetaWFieldInfo = (~) Word32 type AttrBaseTypeConstraint VideoRegionOfInterestMetaWFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaWFieldInfo = Word32 type AttrLabel VideoRegionOfInterestMetaWFieldInfo = "w" type AttrOrigin VideoRegionOfInterestMetaWFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaW attrSet _ = setVideoRegionOfInterestMetaW attrConstruct = undefined attrClear _ = undefined videoRegionOfInterestMeta_w :: AttrLabelProxy "w" videoRegionOfInterestMeta_w = AttrLabelProxy #endif {- | Get the value of the “@h@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #h @ -} getVideoRegionOfInterestMetaH :: MonadIO m => VideoRegionOfInterestMeta -> m Word32 getVideoRegionOfInterestMetaH s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 40) :: IO Word32 return val {- | Set the value of the “@h@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' videoRegionOfInterestMeta [ #h 'Data.GI.Base.Attributes.:=' value ] @ -} setVideoRegionOfInterestMetaH :: MonadIO m => VideoRegionOfInterestMeta -> Word32 -> m () setVideoRegionOfInterestMetaH s val = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 40) (val :: Word32) #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaHFieldInfo instance AttrInfo VideoRegionOfInterestMetaHFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaHFieldInfo = '[ 'AttrSet, 'AttrGet] type AttrSetTypeConstraint VideoRegionOfInterestMetaHFieldInfo = (~) Word32 type AttrBaseTypeConstraint VideoRegionOfInterestMetaHFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaHFieldInfo = Word32 type AttrLabel VideoRegionOfInterestMetaHFieldInfo = "h" type AttrOrigin VideoRegionOfInterestMetaHFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaH attrSet _ = setVideoRegionOfInterestMetaH attrConstruct = undefined attrClear _ = undefined videoRegionOfInterestMeta_h :: AttrLabelProxy "h" videoRegionOfInterestMeta_h = AttrLabelProxy #endif {- | Get the value of the “@params@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' videoRegionOfInterestMeta #params @ -} getVideoRegionOfInterestMetaParams :: MonadIO m => VideoRegionOfInterestMeta -> m ([Ptr ()]) getVideoRegionOfInterestMetaParams s = liftIO $ withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 48) :: IO (Ptr (GList (Ptr ()))) val' <- unpackGList val return val' {- | Set the value of the “@params@” field. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' videoRegionOfInterestMeta [ #params 'Data.GI.Base.Attributes.:=' value ] @ -} setVideoRegionOfInterestMetaParams :: MonadIO m => VideoRegionOfInterestMeta -> Ptr (GList (Ptr ())) -> m () setVideoRegionOfInterestMetaParams s val = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 48) (val :: Ptr (GList (Ptr ()))) {- | Set the value of the “@params@” field to `Nothing`. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.clear' #params @ -} clearVideoRegionOfInterestMetaParams :: MonadIO m => VideoRegionOfInterestMeta -> m () clearVideoRegionOfInterestMetaParams s = liftIO $ withManagedPtr s $ \ptr -> do poke (ptr `plusPtr` 48) (FP.nullPtr :: Ptr (GList (Ptr ()))) #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaParamsFieldInfo instance AttrInfo VideoRegionOfInterestMetaParamsFieldInfo where type AttrAllowedOps VideoRegionOfInterestMetaParamsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear] type AttrSetTypeConstraint VideoRegionOfInterestMetaParamsFieldInfo = (~) (Ptr (GList (Ptr ()))) type AttrBaseTypeConstraint VideoRegionOfInterestMetaParamsFieldInfo = (~) VideoRegionOfInterestMeta type AttrGetType VideoRegionOfInterestMetaParamsFieldInfo = [Ptr ()] type AttrLabel VideoRegionOfInterestMetaParamsFieldInfo = "params" type AttrOrigin VideoRegionOfInterestMetaParamsFieldInfo = VideoRegionOfInterestMeta attrGet _ = getVideoRegionOfInterestMetaParams attrSet _ = setVideoRegionOfInterestMetaParams attrConstruct = undefined attrClear _ = clearVideoRegionOfInterestMetaParams videoRegionOfInterestMeta_params :: AttrLabelProxy "params" videoRegionOfInterestMeta_params = AttrLabelProxy #endif #if ENABLE_OVERLOADING instance O.HasAttributeList VideoRegionOfInterestMeta type instance O.AttributeList VideoRegionOfInterestMeta = VideoRegionOfInterestMetaAttributeList type VideoRegionOfInterestMetaAttributeList = ('[ '("meta", VideoRegionOfInterestMetaMetaFieldInfo), '("roiType", VideoRegionOfInterestMetaRoiTypeFieldInfo), '("id", VideoRegionOfInterestMetaIdFieldInfo), '("parentId", VideoRegionOfInterestMetaParentIdFieldInfo), '("x", VideoRegionOfInterestMetaXFieldInfo), '("y", VideoRegionOfInterestMetaYFieldInfo), '("w", VideoRegionOfInterestMetaWFieldInfo), '("h", VideoRegionOfInterestMetaHFieldInfo), '("params", VideoRegionOfInterestMetaParamsFieldInfo)] :: [(Symbol, *)]) #endif -- method VideoRegionOfInterestMeta::add_param -- method type : OrdinaryMethod -- Args : [Arg {argCName = "meta", argType = TInterface (Name {namespace = "GstVideo", name = "VideoRegionOfInterestMeta"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoRegionOfInterestMeta", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "s", argType = TInterface (Name {namespace = "Gst", name = "Structure"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstStructure", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gst_video_region_of_interest_meta_add_param" gst_video_region_of_interest_meta_add_param :: Ptr VideoRegionOfInterestMeta -> -- meta : TInterface (Name {namespace = "GstVideo", name = "VideoRegionOfInterestMeta"}) Ptr Gst.Structure.Structure -> -- s : TInterface (Name {namespace = "Gst", name = "Structure"}) IO () {- | Attach element-specific parameters to /@meta@/ meant to be used by downstream elements which may handle this ROI. The name of /@s@/ is used to identify the element these parameters are meant for. This is typically used to tell encoders how they should encode this specific region. For example, a structure named \"roi\/x264enc\" could be used to give the QP offsets this encoder should use when encoding the region described in /@meta@/. Multiple parameters can be defined for the same meta so different encoders can be supported by cross platform applications). /Since: 1.14/ -} videoRegionOfInterestMetaAddParam :: (B.CallStack.HasCallStack, MonadIO m) => VideoRegionOfInterestMeta {- ^ /@meta@/: a 'GI.GstVideo.Structs.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta' -} -> Gst.Structure.Structure {- ^ /@s@/: a 'GI.Gst.Structs.Structure.Structure' -} -> m () videoRegionOfInterestMetaAddParam meta s = liftIO $ do meta' <- unsafeManagedPtrGetPtr meta s' <- B.ManagedPtr.disownBoxed s gst_video_region_of_interest_meta_add_param meta' s' touchManagedPtr meta touchManagedPtr s return () #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaAddParamMethodInfo instance (signature ~ (Gst.Structure.Structure -> m ()), MonadIO m) => O.MethodInfo VideoRegionOfInterestMetaAddParamMethodInfo VideoRegionOfInterestMeta signature where overloadedMethod _ = videoRegionOfInterestMetaAddParam #endif -- method VideoRegionOfInterestMeta::get_param -- method type : OrdinaryMethod -- Args : [Arg {argCName = "meta", argType = TInterface (Name {namespace = "GstVideo", name = "VideoRegionOfInterestMeta"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoRegionOfInterestMeta", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a name.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "Structure"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_region_of_interest_meta_get_param" gst_video_region_of_interest_meta_get_param :: Ptr VideoRegionOfInterestMeta -> -- meta : TInterface (Name {namespace = "GstVideo", name = "VideoRegionOfInterestMeta"}) CString -> -- name : TBasicType TUTF8 IO (Ptr Gst.Structure.Structure) {- | Retrieve the parameter for /@meta@/ having /@name@/ as structure name, or 'Nothing' if there is none. /Since: 1.14/ -} videoRegionOfInterestMetaGetParam :: (B.CallStack.HasCallStack, MonadIO m) => VideoRegionOfInterestMeta {- ^ /@meta@/: a 'GI.GstVideo.Structs.VideoRegionOfInterestMeta.VideoRegionOfInterestMeta' -} -> T.Text {- ^ /@name@/: a name. -} -> m (Maybe Gst.Structure.Structure) {- ^ __Returns:__ a 'GI.Gst.Structs.Structure.Structure' -} videoRegionOfInterestMetaGetParam meta name = liftIO $ do meta' <- unsafeManagedPtrGetPtr meta name' <- textToCString name result <- gst_video_region_of_interest_meta_get_param meta' name' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newBoxed Gst.Structure.Structure) result' return result'' touchManagedPtr meta freeMem name' return maybeResult #if ENABLE_OVERLOADING data VideoRegionOfInterestMetaGetParamMethodInfo instance (signature ~ (T.Text -> m (Maybe Gst.Structure.Structure)), MonadIO m) => O.MethodInfo VideoRegionOfInterestMetaGetParamMethodInfo VideoRegionOfInterestMeta signature where overloadedMethod _ = videoRegionOfInterestMetaGetParam #endif -- method VideoRegionOfInterestMeta::get_info -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gst", name = "MetaInfo"})) -- throws : False -- Skip return : False foreign import ccall "gst_video_region_of_interest_meta_get_info" gst_video_region_of_interest_meta_get_info :: IO (Ptr Gst.MetaInfo.MetaInfo) {- | /No description available in the introspection data./ -} videoRegionOfInterestMetaGetInfo :: (B.CallStack.HasCallStack, MonadIO m) => m Gst.MetaInfo.MetaInfo videoRegionOfInterestMetaGetInfo = liftIO $ do result <- gst_video_region_of_interest_meta_get_info checkUnexpectedReturnNULL "videoRegionOfInterestMetaGetInfo" result result' <- (newPtr Gst.MetaInfo.MetaInfo) result return result' #if ENABLE_OVERLOADING #endif #if ENABLE_OVERLOADING type family ResolveVideoRegionOfInterestMetaMethod (t :: Symbol) (o :: *) :: * where ResolveVideoRegionOfInterestMetaMethod "addParam" o = VideoRegionOfInterestMetaAddParamMethodInfo ResolveVideoRegionOfInterestMetaMethod "getParam" o = VideoRegionOfInterestMetaGetParamMethodInfo ResolveVideoRegionOfInterestMetaMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveVideoRegionOfInterestMetaMethod t VideoRegionOfInterestMeta, O.MethodInfo info VideoRegionOfInterestMeta p) => OL.IsLabel t (VideoRegionOfInterestMeta -> 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