Class MetaInfo

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.MetaInfo
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class MetaInfo extends ProxyInstance
The GstMetaInfo provides information about a specific metadata structure.
  • Constructor Details

    • MetaInfo

      public MetaInfo(MemorySegment address)
      Create a MetaInfo proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • MetaInfo

      public MetaInfo(Arena arena)
      Allocate a new MetaInfo.
      Parameters:
      arena - to control the memory allocation scope
    • MetaInfo

      public MetaInfo()
      Allocate a new MetaInfo. The memory is allocated with Arena.ofAuto().
    • MetaInfo

      public MetaInfo(Type api, Type type, long size, MetaInitFunction initFunc, MetaFreeFunction freeFunc, MetaTransformFunction transformFunc, MetaSerializeFunction serializeFunc, MetaDeserializeFunction deserializeFunc, MetaClearFunction clearFunc, Arena arena)
      Allocate a new MetaInfo with the fields set to the provided values.
      Parameters:
      api - value for the field api
      type - value for the field type
      size - value for the field size
      initFunc - value for the field initFunc
      freeFunc - value for the field freeFunc
      transformFunc - value for the field transformFunc
      serializeFunc - value for the field serializeFunc
      deserializeFunc - value for the field deserializeFunc
      clearFunc - value for the field clearFunc
      arena - to control the memory allocation scope
    • MetaInfo

      public MetaInfo(Type api, Type type, long size, MetaInitFunction initFunc, MetaFreeFunction freeFunc, MetaTransformFunction transformFunc, MetaSerializeFunction serializeFunc, MetaDeserializeFunction deserializeFunc, MetaClearFunction clearFunc)
      Allocate a new MetaInfo with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      api - value for the field api
      type - value for the field type
      size - value for the field size
      initFunc - value for the field initFunc
      freeFunc - value for the field freeFunc
      transformFunc - value for the field transformFunc
      serializeFunc - value for the field serializeFunc
      deserializeFunc - value for the field deserializeFunc
      clearFunc - value for the field clearFunc
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readApi

      public Type readApi()
      Read the value of the field api.
      Returns:
      The value of the field api
    • writeApi

      public void writeApi(Type api)
      Write a value in the field api.
      Parameters:
      api - The new value for the field api
    • readType

      public Type readType()
      Read the value of the field type.
      Returns:
      The value of the field type
    • writeType

      public void writeType(Type type)
      Write a value in the field type.
      Parameters:
      type - The new value for the field type
    • readSize

      public long readSize()
      Read the value of the field size.
      Returns:
      The value of the field size
    • writeSize

      public void writeSize(long size)
      Write a value in the field size.
      Parameters:
      size - The new value for the field size
    • readInitFunc

      public @Nullable MetaInitFunction readInitFunc()
      Read the value of the field init_func.
      Returns:
      The value of the field init_func
    • writeInitFunc

      public void writeInitFunc(@Nullable MetaInitFunction initFunc, Arena _arena)
      Write a value in the field init_func.
      Parameters:
      initFunc - The new value for the field init_func
      _arena - to control the memory allocation scope
    • readFreeFunc

      public @Nullable MetaFreeFunction readFreeFunc()
      Read the value of the field free_func.
      Returns:
      The value of the field free_func
    • writeFreeFunc

      public void writeFreeFunc(@Nullable MetaFreeFunction freeFunc, Arena _arena)
      Write a value in the field free_func.
      Parameters:
      freeFunc - The new value for the field free_func
      _arena - to control the memory allocation scope
    • readTransformFunc

      public @Nullable MetaTransformFunction readTransformFunc()
      Read the value of the field transform_func.
      Returns:
      The value of the field transform_func
    • writeTransformFunc

      public void writeTransformFunc(@Nullable MetaTransformFunction transformFunc, Arena _arena)
      Write a value in the field transform_func.
      Parameters:
      transformFunc - The new value for the field transform_func
      _arena - to control the memory allocation scope
    • readSerializeFunc

      public @Nullable MetaSerializeFunction readSerializeFunc()
      Read the value of the field serialize_func.
      Returns:
      The value of the field serialize_func
    • writeSerializeFunc

      public void writeSerializeFunc(@Nullable MetaSerializeFunction serializeFunc, Arena _arena)
      Write a value in the field serialize_func.
      Parameters:
      serializeFunc - The new value for the field serialize_func
      _arena - to control the memory allocation scope
    • readDeserializeFunc

      public @Nullable MetaDeserializeFunction readDeserializeFunc()
      Read the value of the field deserialize_func.
      Returns:
      The value of the field deserialize_func
    • writeDeserializeFunc

      public void writeDeserializeFunc(@Nullable MetaDeserializeFunction deserializeFunc, Arena _arena)
      Write a value in the field deserialize_func.
      Parameters:
      deserializeFunc - The new value for the field deserialize_func
      _arena - to control the memory allocation scope
    • readClearFunc

      public @Nullable MetaClearFunction readClearFunc()
      Read the value of the field clear_func.
      Returns:
      The value of the field clear_func
    • writeClearFunc

      public void writeClearFunc(@Nullable MetaClearFunction clearFunc, Arena _arena)
      Write a value in the field clear_func.
      Parameters:
      clearFunc - The new value for the field clear_func
      _arena - to control the memory allocation scope
    • new_

      public static MetaInfo new_(Type api, String impl, long size)

      Creates a new structure that needs to be filled before being registered. This structure should filled and then registered with gst_meta_info_register().

      Example:

      const GstMetaInfo *
      gst_my_meta_get_info (void)
      {
        static const GstMetaInfo *meta_info = NULL;
      
        if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
          GstMetaInfo *info = gst_meta_info_new (
            gst_my_meta_api_get_type (),
              "GstMyMeta",
             sizeof (GstMyMeta));
          const GstMetaInfo *meta = NULL;
      
          info->init_func = my_meta_init;
          info->free_func = my_meta_free;
          info->transform_func = my_meta_transform;
          info->serialize_func = my_meta_serialize;
          info->deserialize_func = my_meta_deserialize;
          meta = gst_meta_info_register (info);
          g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) meta);
        }
      
        return meta_info;
      }
      
      Parameters:
      api - the type of the GstMeta API
      impl - the name of the GstMeta implementation
      size - the size of the GstMeta structure
      Returns:
      a new GstMetaInfo that needs to be filled
      Since:
      1.24
    • isCustom

      public boolean isCustom()
    • register

      public MetaInfo register()

      Registers a new meta.

      Use the structure returned by gst_meta_info_new(), it consumes it and the structure shouldnt be used after. The one returned by the function can be kept.

      Returns:
      the registered meta
      Since:
      1.24