gi-gst-1.0.20: GStreamer bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Structs.Meta

Contents

Description

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

Exported types

newtype Meta Source #

Memory-managed wrapper type.

Constructors

Meta (ManagedPtr Meta) 
Instances
WrappedPtr Meta Source # 
Instance details

Defined in GI.Gst.Structs.Meta

tag ~ AttrSet => Constructible Meta tag Source # 
Instance details

Defined in GI.Gst.Structs.Meta

Methods

new :: MonadIO m => (ManagedPtr Meta -> Meta) -> [AttrOp Meta tag] -> m Meta

newZeroMeta :: MonadIO m => m Meta Source #

Construct a Meta struct initialized to zero.

noMeta :: Maybe Meta Source #

A convenience alias for Nothing :: Maybe Meta.

Methods

apiTypeGetTags

metaApiTypeGetTags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

api: an API

-> m [Text]

Returns: an array of tags as strings.

No description available in the introspection data.

Since: 1.2

apiTypeHasTag

metaApiTypeHasTag Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

api: an API

-> Word32

tag: the tag to check

-> m Bool

Returns: True if api was registered with tag.

Check if api was registered with tag.

apiTypeRegister

metaApiTypeRegister Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

api: an API to register

-> [Text]

tags: tags for api

-> m GType

Returns: a unique GType for api.

Register and return a GType for the api and associate it with tags.

compareSeqnum

metaCompareSeqnum Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Meta

meta1: a Meta

-> Meta

meta2: a Meta

-> m Int32

Returns: a negative number if meta1 comes before meta2, 0 if both metas have an equal sequence number, or a positive integer if meta1 comes after meta2.

Meta sequence number compare function. Can be used as CompareFunc or a CompareDataFunc.

Since: 1.16

getInfo

metaGetInfo Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

impl: the name

-> m (Maybe MetaInfo)

Returns: a MetaInfo with impl, or Nothing when no such metainfo exists.

Lookup a previously registered meta info structure by its implementation name impl.

getSeqnum

metaGetSeqnum Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Meta

meta: a Meta

-> m Word64 

Gets seqnum for this meta.

Since: 1.16

register

metaRegister Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

api: the type of the Meta API

-> Text

impl: the name of the Meta implementation

-> Word64

size: the size of the Meta structure

-> MetaInitFunction

initFunc: a MetaInitFunction

-> MetaFreeFunction

freeFunc: a MetaFreeFunction

-> MetaTransformFunction

transformFunc: a MetaTransformFunction

-> m (Maybe MetaInfo)

Returns: a MetaInfo that can be used to access metadata.

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 ]