Klasse Meta

Alle implementierten Schnittstellen:
PointerInterface

public class Meta extends Record
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.

https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html

  • Felddetails

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setFieldFlags

      public void setFieldFlags(int flags)
      extra flags for the metadata
    • getFieldFlags

      public int getFieldFlags()
      extra flags for the metadata
    • setFieldInfo

      public void setFieldInfo(MetaInfo info)
      pointer to the #GstMetaInfo
    • getFieldInfo

      public MetaInfo getFieldInfo()
      pointer to the #GstMetaInfo
    • compareSeqnum

      public int compareSeqnum(@Nonnull Meta meta2)
      Meta sequence number compare function. Can be used as #GCompareFunc
      or a #GCompareDataFunc.
      Parameter:
      meta2 - a #GstMeta
      Gibt zurück:
      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.
    • getSeqnum

      public long getSeqnum()
      Gets seqnum for this meta.
      Gibt zurück:
    • serialize

      public boolean serialize(@Nonnull ByteArrayInterface data)
      Serialize @meta into a format that can be stored or transmitted and later
      deserialized by gst_meta_deserialize().

      This is only supported for meta that implements #GstMetaInfo.serialize_func,
      %FALSE is returned otherwise.

      Upon failure, @data->data pointer could have been reallocated, but @data->len
      won't be modified. This is intended to be able to append multiple metas
      into the same #GByteArray.

      Since serialization size is often the same for every buffer, caller may want
      to remember the size of previous data to preallocate the next.
      Parameter:
      data - #GstByteArrayInterface to append serialization data
      Gibt zurück:
      %TRUE on success, %FALSE otherwise.
    • serializeSimple

      public boolean serializeSimple(@Nonnull ByteArray data)
      Same as gst_meta_serialize() but with a #GByteArray instead of
      #GstByteArrayInterface.
      Parameter:
      data - #GByteArray to append serialization data
      Gibt zurück:
      %TRUE on success, %FALSE otherwise.
    • apiTypeHasTag

      public static boolean apiTypeHasTag(long api, int tag)
      Check if @api was registered with @tag.
      Parameter:
      api - an API
      tag - the tag to check
      Gibt zurück:
      %TRUE if @api was registered with @tag.
    • getInfo

      public static MetaInfo getInfo(@Nonnull Str impl)
      Lookup a previously registered meta info structure by its implementation name
      @impl.
      Parameter:
      impl - the name
      Gibt zurück:
      a #GstMetaInfo with @impl, or %NULL when no such metainfo exists.
    • register

      public static MetaInfo register(long api, @Nonnull Str impl, long size, Meta.OnMetaInitFunction init_func, Meta.OnMetaFreeFunction free_func, Meta.OnMetaTransformFunction transform_func)
      Register a new #GstMeta implementation.

      The same @info can be retrieved later with gst_meta_get_info() by using
      @impl as the key.
      Parameter:
      api - the type of the #GstMeta API
      impl - the name of the #GstMeta implementation
      size - the size of the #GstMeta structure
      init_func - a #GstMetaInitFunction
      free_func - a #GstMetaFreeFunction
      transform_func - a #GstMetaTransformFunction
      Gibt zurück:
      a #GstMetaInfo that can be used to access metadata.
    • registerCustomSimple

      public static MetaInfo registerCustomSimple(@Nonnull Str name)
      Simplified version of gst_meta_register_custom(), with no tags and no
      transform function.
      Parameter:
      name - the name of the #GstMeta implementation
      Gibt zurück:
      a #GstMetaInfo that can be used to access metadata.