Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
The Meta
structure should be included as the first member of a Buffer
metadata structure. The structure defines the API of the metadata and should
be accessible to all elements using the metadata.
A metadata API is registered with metaApiTypeRegister
which takes a
name for the metadata API and some tags associated with the metadata.
With metaApiTypeHasTag
one can check if a certain metadata API
contains a given tag.
Multiple implementations of a metadata API can be registered.
To implement a metadata API, metaRegister
should be used. This
function takes all parameters needed to create, free and transform metadata
along with the size of the metadata. The function returns a MetaInfo
structure that contains the information for the implementation of the API.
A specific implementation can be retrieved by name with metaGetInfo
.
See Buffer
for how the metadata can be added, retrieved and removed from
buffers.
Synopsis
- newtype Meta = Meta (ManagedPtr Meta)
- newZeroMeta :: MonadIO m => m Meta
- noMeta :: Maybe Meta
- metaApiTypeGetTags :: (HasCallStack, MonadIO m) => GType -> m [Text]
- metaApiTypeHasTag :: (HasCallStack, MonadIO m) => GType -> Word32 -> m Bool
- metaApiTypeRegister :: (HasCallStack, MonadIO m) => Text -> [Text] -> m GType
- metaCompareSeqnum :: (HasCallStack, MonadIO m) => Meta -> Meta -> m Int32
- metaGetInfo :: (HasCallStack, MonadIO m) => Text -> m (Maybe MetaInfo)
- metaGetSeqnum :: (HasCallStack, MonadIO m) => Meta -> m Word64
- metaRegister :: (HasCallStack, MonadIO m) => GType -> Text -> Word64 -> MetaInitFunction -> MetaFreeFunction -> MetaTransformFunction -> m (Maybe MetaInfo)
- getMetaFlags :: MonadIO m => Meta -> m [MetaFlags]
- setMetaFlags :: MonadIO m => Meta -> [MetaFlags] -> m ()
- clearMetaInfo :: MonadIO m => Meta -> m ()
- getMetaInfo :: MonadIO m => Meta -> m (Maybe MetaInfo)
- setMetaInfo :: MonadIO m => Meta -> Ptr MetaInfo -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Meta Source # | |
WrappedPtr Meta Source # | |
Defined in GI.Gst.Structs.Meta wrappedPtrCalloc :: IO (Ptr Meta) # wrappedPtrCopy :: Meta -> IO Meta # | |
tag ~ 'AttrSet => Constructible Meta tag Source # | |
Defined in GI.Gst.Structs.Meta |
Methods
Overloaded methods
apiTypeGetTags
:: (HasCallStack, MonadIO m) | |
=> GType |
|
-> m [Text] | Returns: an array of tags as strings. |
No description available in the introspection data.
Since: 1.2
apiTypeHasTag
:: (HasCallStack, MonadIO m) | |
=> GType |
|
-> Word32 |
|
-> m Bool | Returns: |
Check if api
was registered with tag
.
apiTypeRegister
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> [Text] |
|
-> m GType | Returns: a unique GType for |
Register and return a GType for the api
and associate it with
tags
.
compareSeqnum
:: (HasCallStack, MonadIO m) | |
=> Meta |
|
-> Meta |
|
-> m Int32 | Returns: a negative number if |
Meta sequence number compare function. Can be used as CompareFunc
or a CompareDataFunc
.
Since: 1.16
getInfo
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe MetaInfo) | Returns: a |
Lookup a previously registered meta info structure by its implementation name
impl
.
getSeqnum
:: (HasCallStack, MonadIO m) | |
=> Meta |
|
-> m Word64 |
Gets seqnum for this meta.
Since: 1.16
register
:: (HasCallStack, MonadIO m) | |
=> GType |
|
-> Text |
|
-> Word64 |
|
-> MetaInitFunction |
|
-> MetaFreeFunction |
|
-> MetaTransformFunction |
|
-> m (Maybe MetaInfo) | Returns: a |
Register a new Meta
implementation.
The same info
can be retrieved later with metaGetInfo
by using
impl
as the key.
Properties
flags
extra flags for the metadata
getMetaFlags :: MonadIO m => Meta -> m [MetaFlags] Source #
Get the value of the “flags
” field.
When overloading is enabled, this is equivalent to
get
meta #flags
setMetaFlags :: MonadIO m => Meta -> [MetaFlags] -> m () Source #
Set the value of the “flags
” field.
When overloading is enabled, this is equivalent to
set
meta [ #flags:=
value ]
info
pointer to the MetaInfo
clearMetaInfo :: MonadIO m => Meta -> m () Source #
Set the value of the “info
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#info
getMetaInfo :: MonadIO m => Meta -> m (Maybe MetaInfo) Source #
Get the value of the “info
” field.
When overloading is enabled, this is equivalent to
get
meta #info
setMetaInfo :: MonadIO m => Meta -> Ptr MetaInfo -> m () Source #
Set the value of the “info
” field.
When overloading is enabled, this is equivalent to
set
meta [ #info:=
value ]