Gjsify LogoGjsify Logo

The #GstMeta structure should be included as the first member of a #GstBuffer 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 gst_meta_api_type_register() which takes a name for the metadata API and some tags associated with the metadata. With gst_meta_api_type_has_tag() 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, gst_meta_register() 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 #GstMetaInfo structure that contains the information for the implementation of the API.

A specific implementation can be retrieved by name with gst_meta_get_info().

See #GstBuffer for how the metadata can be added, retrieved and removed from buffers.

record

Hierarchy

  • Meta

Index

Constructors

Properties

flags: MetaFlags

extra flags for the metadata

field

pointer to the #GstMetaInfo

field
name: string

Methods

  • compare_seqnum(meta2: Meta): number
  • Meta sequence number compare function. Can be used as #GCompareFunc or a #GCompareDataFunc.

    Parameters

    • meta2: Meta

      a #GstMeta

    Returns number

  • get_seqnum(): number
  • api_type_get_tags(api: GType<unknown>): string[]
  • api_type_has_tag(api: GType<unknown>, tag: number): boolean
  • api_type_register(api: string, tags: string[]): GType<unknown>
  • Register and return a GType for the api and associate it with tags.

    Parameters

    • api: string

      an API to register

    • tags: string[]

      tags for api

    Returns GType<unknown>

  • Register a new #GstMeta implementation.

    The same info can be retrieved later with gst_meta_get_info() by using impl as the key.

    Parameters

    • api: GType<unknown>

      the type of the #GstMeta API

    • impl: string

      the name of the #GstMeta implementation

    • size: number

      the size of the #GstMeta structure

    • init_func: MetaInitFunction

      a #GstMetaInitFunction

    • free_func: MetaFreeFunction

      a #GstMetaFreeFunction

    • transform_func: MetaTransformFunction

      a #GstMetaTransformFunction

    Returns Gst.MetaInfo

  • Register a new custom #GstMeta implementation, backed by an opaque structure holding a #GstStructure.

    The registered info can be retrieved later with gst_meta_get_info() by using name as the key.

    The backing #GstStructure can be retrieved with gst_custom_meta_get_structure(), its mutability is conditioned by the writability of the buffer the meta is attached to.

    When transform_func is %NULL, the meta and its backing #GstStructure will always be copied when the transform operation is copy, other operations are discarded, copy regions are ignored.

    Parameters

    • name: string

      the name of the #GstMeta implementation

    • tags: string[]

      tags for api

    • transform_func: CustomMetaTransformFunction

      a #GstMetaTransformFunction

    Returns Gst.MetaInfo

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method