Class Structure

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

@Generated("org.javagi.JavaGI") public class Structure extends ProxyInstance

A GstStructure is a collection of key/value pairs. The keys are expressed as GQuarks and the values can be of any GType.

In addition to the key/value pairs, a GstStructure also has a name. The name starts with a letter and can be filled by letters, numbers and any of "/-_.:".

GstStructure is used by various GStreamer subsystems to store information in a flexible and extensible way. A GstStructure does not have a refcount because it usually is part of a higher level object such as GstCaps, GstMessage, GstEvent, GstQuery. It provides a means to enforce mutability using the refcount of the parent with the gst_structure_set_parent_refcount() method.

A GstStructure can be created with gst_structure_new_empty() or gst_structure_new(), which both take a name and an optional set of key/value pairs along with the types of the values.

Field values can be changed with gst_structure_set_value() or gst_structure_set().

Field values can be retrieved with gst_structure_get_value() or the more convenient gst_structure_get_*() functions.

Fields can be removed with gst_structure_remove_field() or gst_structure_remove_fields().

Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not allowed. Strings may be null however.

The serialization format

GstStructure serialization format serialize the GstStructure name, keys/GType/values in a comma separated list with the structure name as first field without value followed by separated key/value pairs in the form key=value, for example:

a-structure, key=value

The values type will be inferred if not explicitly specified with the (GTypeName)value syntax, for example the following struct will have one field called 'is-string' which has the string 'true' as a value:

a-struct, field-is-string=(string)true, field-is-boolean=true

Note: without specifying (string), field-is-string` type would have been inferred as boolean.

Note: we specified (string) as a type even if gchararray is the actual GType name as for convenience some well known types have been aliased or abbreviated.

To avoid specifying the type, you can give some hints to the "type system". For example to specify a value as a double, you should add a decimal (ie. 1 is an int while 1.0 is a double).

Note: when a structure is serialized with gst_structure_to_string, all values are explicitly typed.

Some types have special delimiters:

  • GstValueArray are inside "less and greater than" (< and >). For example `a-structure, array=<1, 2, 3>
  • Ranges are inside brackets ([ and ]). For example a-structure, range=[1, 6, 2] 1 being the min value, 6 the maximum and 2 the step. To specify a #GST_TYPE_INT64_RANGE you need to explicitly specify it like: a-structure, a-int64-range=(gint64) [1, 5]
  • GstValueList are inside curly brackets ({ and }). For example a-structure, list={1, 2, 3}
  • GStrv are inside "less and greater than" (< and >) and each string is double-quoted. For example a-structure, strv=(GStrv)<"foo", "bar">. Since 1.26.0.

Structures are delimited either by a null character \\0 or a semicolon ; the latter allowing to store multiple structures in the same string (see #GstCaps).

Quotes are used as "default" delimiters and can be used around any types that don't use other delimiters (for example a-struct, i=(int)"1"). They are use to allow adding spaces or special characters (such as delimiters, semicolumns, etc..) inside strings and you can use backslashes \\ to escape characters inside them, for example:

a-struct, special="\\"{[(;)]}\\" can be used inside quotes"

They also allow for nested structure, such as:

a-struct, nested=(GstStructure)"nested-struct, nested=true"

Since 1.20, nested structures and caps can be specified using brackets ([ and ]), for example:

a-struct, nested=[nested-struct, nested=true]

note: gst_structure_to_string() won't use that syntax for backward compatibility reason, gst_structure_serialize_full() has been added for that purpose.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a Structure proxy instance for the provided memory address.
    Structure(String name, String firstfield, Object... varargs)
    Creates a new GstStructure with the given name.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tries intersecting this Structure and struct2 and reports whether the result would not be empty.
    Duplicates a GstStructure and all its fields and values.
    static Structure
    empty(String name)
    Creates a new, empty GstStructure with the given name.
    void
    Deprecated.
    Use gst_structure_filter_and_map_in_place_id_str().
    void
    Calls the provided function once for each field in the GstStructure.
    void
    Fixate all values in this Structure using gst_value_fixate().
    boolean
    fixateField(String fieldName)
    Fixates a GstStructure by changing the given field with its fixated value.
    boolean
    fixateFieldBoolean(String fieldName, boolean target)
    Fixates a GstStructure by changing the given fieldName field to the given target boolean if that field is not fixed yet.
    boolean
    fixateFieldNearestDouble(String fieldName, double target)
    Fixates a GstStructure by changing the given field to the nearest double to target that is a subset of the existing field.
    boolean
    fixateFieldNearestFraction(String fieldName, int targetNumerator, int targetDenominator)
    Fixates a GstStructure by changing the given field to the nearest fraction to targetDenominator that is a subset of the existing field.
    boolean
    fixateFieldNearestInt(String fieldName, int target)
    Fixates a GstStructure by changing the given field to the nearest integer to target that is a subset of the existing field.
    boolean
    fixateFieldString(String fieldName, String target)
    Fixates a GstStructure by changing the given fieldName field to the given target string if that field is not fixed yet.
    boolean
    foreach(@Nullable StructureForeachFunc func)
    Deprecated.
    Use gst_structure_foreach_id_str().
    boolean
    Calls the provided function once for each field in the GstStructure.
    void
    Frees a GstStructure and all its fields and values.
    static @Nullable Structure
    Creates a GstStructure from a string representation.
    static @Nullable Structure
    fromString(String string, @Nullable Out<String> end)
    Creates a GstStructure from a string representation.
    boolean
    get(String firstFieldname, Object... varargs)
    Parses the variable arguments and reads fields from this Structure accordingly.
    boolean
    getArray(String fieldname, Out<ValueArray> array)
    This is useful in language bindings where unknown GValue types are not supported.
    boolean
    getBoolean(String fieldname, Out<Boolean> value)
    Sets the boolean pointed to by value corresponding to the value of the given field.
    boolean
    getClockTime(String fieldname, ClockTime value)
    Sets the clock time pointed to by value corresponding to the clock time of the given field.
    boolean
    getDate(String fieldname, Out<Date> value)
    Sets the date pointed to by value corresponding to the date of the given field.
    boolean
    getDateTime(String fieldname, Out<DateTime> value)
    Sets the datetime pointed to by value corresponding to the datetime of the given field.
    boolean
    getDouble(String fieldname, Out<Double> value)
    Sets the double pointed to by value corresponding to the value of the given field.
    boolean
    getEnum(String fieldname, Type enumtype, Out<Integer> value)
    Sets the int pointed to by value corresponding to the value of the given field.
    getFieldType(String fieldname)
    Finds the field with the given name, and returns the type of the value it contains.
    boolean
    getFlags(String fieldname, Type flagsType, Out<Integer> value)
    Sets the unsigned int pointed to by value corresponding to the value of the given field.
    boolean
    getFlagset(String fieldname, @Nullable Out<Integer> valueFlags, @Nullable Out<Integer> valueMask)
    Read the GstFlagSet flags and mask out of the structure into the provided pointers.
    boolean
    getFraction(String fieldname, Out<Integer> valueNumerator, Out<Integer> valueDenominator)
    Sets the integers pointed to by valueNumerator and valueDenominator corresponding to the value of the given field.
    boolean
    getInt(String fieldname, Out<Integer> value)
    Sets the int pointed to by value corresponding to the value of the given field.
    boolean
    getInt64(String fieldname, Out<Long> value)
    Sets the gint64 pointed to by value corresponding to the value of the given field.
    boolean
    getList(String fieldname, Out<ValueArray> array)
    This is useful in language bindings where unknown GValue types are not supported.
    The memory layout of the native struct.
    Get the name of this Structure as a string.
    Deprecated.
    Use gst_structure_get_name_id_str().
    Get the name of this Structure as a GstIdStr.
    @Nullable String
    getString(String fieldname)
    Finds the field corresponding to fieldname, and returns the string contained in the field's value.
    static @Nullable Type
    Get the GType of the Structure class.
    boolean
    getUint(String fieldname, Out<Integer> value)
    Sets the uint pointed to by value corresponding to the value of the given field.
    boolean
    getUint64(String fieldname, Out<Long> value)
    Sets the guint64 pointed to by value corresponding to the value of the given field.
    @Nullable Value
    getValue(String fieldname)
    Get the value of the field with name fieldname.
    boolean
    hasField(String fieldname)
    Check if this Structure contains a field named fieldname.
    boolean
    hasFieldTyped(String fieldname, Type type)
    Check if this Structure contains a field named fieldname and with GType type.
    boolean
    Checks if the structure has the given name
    static Structure
    id(Quark nameQuark, Quark fieldQuark, Object... varargs)
    Deprecated.
    Use gst_structure_new_id_str().
    static Structure
    idEmpty(Quark quark)
    Deprecated.
    Use gst_structure_new_id_str_empty().
    boolean
    idGet(Quark firstFieldId, Object... varargs)
    Deprecated.
    Use gst_structure_id_str_get().
    @Nullable Value
    Get the value of the field with GQuark field.
    boolean
    Deprecated.
    Use gst_structure_id_str_has_field().
    boolean
    idHasFieldTyped(Quark field, Type type)
    Deprecated.
    Use gst_structure_id_str_has_field_typed().
    void
    idSet(Quark fieldname, Object... varargs)
    Deprecated.
    Use gst_structure_id_str_set().
    void
    idSetValue(Quark field, Value value)
    Deprecated.
    Use gst_structure_id_str_set_value().
    static Structure
    idStr(IdStr name, IdStr fieldname, Object... varargs)
    Creates a new GstStructure with the given name as a GQuark, followed by fieldname GstIdStr, GType, argument(s) "triplets" in the same format as gst_structure_id_str_set().
    static Structure
    Creates a new, empty GstStructure with the given name.
    boolean
    idStrGet(IdStr firstFieldname, Object... varargs)
    Parses the variable arguments and reads fields from this Structure accordingly.
    Finds the field with the given name, and returns the type of the value it contains.
    @Nullable Value
    idStrGetValue(IdStr fieldname)
    Get the value of the field with name fieldname.
    boolean
    idStrHasField(IdStr fieldname)
    Check if this Structure contains a field named fieldname.
    boolean
    idStrHasFieldTyped(IdStr fieldname, Type type)
    Check if this Structure contains a field named fieldname and with GType type.
    idStrNthFieldName(int index)
    Get the name (as a GstIdStr) of the given field number, counting from 0 onwards.
    void
    Removes the field with the given name.
    void
    idStrRemoveFields(IdStr fieldname, Object... varargs)
    Removes the fields with the given names.
    void
    idStrSet(IdStr fieldname, Object... varargs)
    Identical to gst_structure_set, except that field names are passed using a GstIdStr for the field name.
    void
    idStrSetValue(IdStr fieldname, Value value)
    Sets the field with the given name field to value. If the field does not exist, it is created.
    void
    idStrTakeValue(IdStr fieldname, Value value)
    Sets the field with the given GstIdStr field to value. If the field does not exist, it is created.
    void
    idTakeValue(Quark field, Value value)
    Deprecated.
    Use gst_structure_id_str_take_value().
    @Nullable Structure
    Intersects this Structure and struct2 and returns the intersection.
    boolean
    isEqual(Structure structure2)
    Tests if the two GstStructure are equal.
    boolean
    isSubset(Structure superset)
    Checks if this Structure is a subset of superset, i.e.
    boolean
    Checks if the structure is writable.
    boolean
    mapInPlace(@Nullable StructureMapFunc func)
    Deprecated.
    Use gst_structure_map_in_place_id_str().
    boolean
    Calls the provided function once for each field in the GstStructure.
    int
    Get the number of fields in the structure.
    nthFieldName(int index)
    Get the name of the given field number, counting from 0 onwards.
    Read the value of the field name.
    Read the value of the field type.
    void
    Removes all fields in a GstStructure.
    void
    removeField(String fieldname)
    Removes the field with the given name.
    void
    removeFields(String fieldname, Object... varargs)
    Removes the fields with the given names.
    Deprecated.
    Use gst_structure_serialize_full() instead.
    Deprecated.
    Use gst_structure_serialize_full() instead.
    @Nullable String
    Alias for gst_structure_serialize() but with nullable annotation because it can return null when SerializeFlags.STRICT flag is set.
    @Nullable String
    Alias for gst_structure_serialize() but with nullable annotation because it can return null when SerializeFlags.STRICT flag is set.
    void
    set(String fieldname, Object... varargs)
    Parses the variable arguments and sets fields accordingly.
    void
    setArray(String fieldname, ValueArray array)
    This is useful in language bindings where unknown GValue types are not supported.
    void
    setList(String fieldname, ValueArray array)
    This is useful in language bindings where unknown GValue types are not supported.
    void
    Sets the name of the structure to the given name. The string provided is copied before being used.
    void
    Sets the name of the structure to the given name. The string provided is copied before being used.
    void
    Sets the name of the structure to the given name. The string provided is copied before being used.
    boolean
    Sets the parent_refcount field of GstStructure.
    void
    setStaticStr(String fieldname, Object... varargs)
    Parses the variable arguments and sets fields accordingly.
    void
    setValue(String fieldname, Value value)
    Sets the field with the given name field to value. If the field does not exist, it is created.
    void
    setValueStaticStr(String fieldname, Value value)
    Sets the field with the given name field to value. If the field does not exist, it is created.
    static Structure
    staticStr(String name, String firstfield, Object... varargs)
    Creates a new GstStructure with the given name.
    static Structure
    Creates a new, empty GstStructure with the given name.
    static boolean
    take(@Nullable Out<Structure> oldstrPtr, @Nullable Structure newstr)
    Atomically modifies a pointer to point to a new structure.
    void
    takeValue(String fieldname, Value value)
    Sets the field with the given name field to value. If the field does not exist, it is created.
    void
    takeValueStaticStr(String fieldname, Value value)
    Sets the field with the given name field to value. If the field does not exist, it is created.
    Converts this Structure to a human-readable string representation.
    void
    Write a value in the field name.
    void
    Write a value in the field type.

    Methods inherited from class ProxyInstance

    equals, handle, hashCode

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Structure

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

      public Structure(String name, String firstfield, Object... varargs)

      Creates a new GstStructure with the given name. Parses the list of variable arguments and sets fields to the values listed. Variable arguments should be passed as field name, field type, and value. Last variable argument should be null.

      Free-function: gst_structure_free

      Parameters:
      name - name of new structure
      firstfield - name of first field to set
      varargs - additional arguments
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Structure class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • 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
    • readName

      public Quark readName()
      Read the value of the field name.
      Returns:
      The value of the field name
    • writeName

      public void writeName(Quark name)
      Write a value in the field name.
      Parameters:
      name - The new value for the field name
    • fromString

      public static @Nullable Structure fromString(String string, @Nullable Out<String> end)

      Creates a GstStructure from a string representation. If end is not null, a pointer to the place inside the given string where parsing ended will be returned.

      Free-function: gst_structure_free

      Parameters:
      string - a string representation of a GstStructure.
      end - pointer to store the end of the string in.
      Returns:
      a new GstStructure or null when the string could not be parsed. Free with gst_structure_free() after use.
    • empty

      public static Structure empty(String name)

      Creates a new, empty GstStructure with the given name.

      See gst_structure_set_name() for constraints on the name parameter.

      Free-function: gst_structure_free

      Parameters:
      name - name of new structure
      Returns:
      a new, empty GstStructure
    • fromString

      public static @Nullable Structure fromString(String string)

      Creates a GstStructure from a string representation. If end is not null, a pointer to the place inside the given string where parsing ended will be returned.

      The current implementation of serialization will lead to unexpected results when there are nested GstCaps / GstStructure deeper than one level unless the gst_structure_serialize() function is used (without GST_SERIALIZE_FLAG_BACKWARD_COMPAT)

      Free-function: gst_structure_free

      Parameters:
      string - a string representation of a GstStructure
      Returns:
      a new GstStructure or null when the string could not be parsed. Free with gst_structure_free() after use.
      Since:
      1.2
    • id

      @Deprecated public static Structure id(Quark nameQuark, Quark fieldQuark, Object... varargs)
      Deprecated.
      Use gst_structure_new_id_str().

      Creates a new GstStructure with the given name as a GQuark, followed by fieldname quark, GType, argument(s) "triplets" in the same format as gst_structure_id_set(). Basically a convenience wrapper around gst_structure_new_id_empty() and gst_structure_id_set().

      The last variable argument must be null (or 0).

      Free-function: gst_structure_free

      Parameters:
      nameQuark - name of new structure
      fieldQuark - the GQuark for the name of the field to set
      varargs - variable arguments
      Returns:
      a new GstStructure
    • idEmpty

      @Deprecated public static Structure idEmpty(Quark quark)
      Deprecated.
      Use gst_structure_new_id_str_empty().

      Creates a new, empty GstStructure with the given name as a GQuark.

      Free-function: gst_structure_free

      Parameters:
      quark - name of new structure
      Returns:
      a new, empty GstStructure
    • idStr

      public static Structure idStr(IdStr name, IdStr fieldname, Object... varargs)

      Creates a new GstStructure with the given name as a GQuark, followed by fieldname GstIdStr, GType, argument(s) "triplets" in the same format as gst_structure_id_str_set(). Basically a convenience wrapper around gst_structure_new_id_str_empty() and gst_structure_id_str_set().

      The last variable argument must be null (or 0).

      Free-function: gst_structure_free

      Parameters:
      name - name of new structure
      fieldname - the GstIdStr for the name of the field to set
      varargs - variable arguments
      Returns:
      a new GstStructure
      Since:
      1.26
    • idStrEmpty

      public static Structure idStrEmpty(IdStr name)

      Creates a new, empty GstStructure with the given name.

      Free-function: gst_structure_free

      Parameters:
      name - name of new structure
      Returns:
      a new, empty GstStructure
      Since:
      1.26
    • staticStr

      public static Structure staticStr(String name, String firstfield, Object... varargs)

      Creates a new GstStructure with the given name. Parses the list of variable arguments and sets fields to the values listed. Variable arguments should be passed as field name, field type, and value. Last variable argument should be null.

      name, firstfield and all field names need to be valid for the remaining lifetime of the process, e.g. have to be a static string.

      Free-function: gst_structure_free

      Parameters:
      name - name of new structure
      firstfield - name of first field to set
      varargs - additional arguments
      Returns:
      a new GstStructure
      Since:
      1.26
    • staticStrEmpty

      public static Structure staticStrEmpty(String name)

      Creates a new, empty GstStructure with the given name.

      See gst_structure_set_name() for constraints on the name parameter.

      name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.

      Free-function: gst_structure_free

      Parameters:
      name - name of new structure
      Returns:
      a new, empty GstStructure
      Since:
      1.26
    • take

      public static boolean take(@Nullable Out<Structure> oldstrPtr, @Nullable Structure newstr)

      Atomically modifies a pointer to point to a new structure. The GstStructure oldstrPtr is pointing to is freed and newstr is taken ownership over.

      Either newstr and the value pointed to by oldstrPtr may be null.

      It is a programming error if both newstr and the value pointed to by oldstrPtr refer to the same, non-null structure.

      Parameters:
      oldstrPtr - pointer to a place of a GstStructure to take
      newstr - a new GstStructure
      Returns:
      true if newstr was different from oldstrPtr
      Since:
      1.18
    • canIntersect

      public boolean canIntersect(Structure struct2)
      Tries intersecting this Structure and struct2 and reports whether the result would not be empty.
      Parameters:
      struct2 - a GstStructure
      Returns:
      true if intersection would not be empty
    • copy

      public Structure copy()

      Duplicates a GstStructure and all its fields and values.

      Free-function: gst_structure_free

      Returns:
      a new GstStructure.
    • filterAndMapInPlace

      @Deprecated public void filterAndMapInPlace(@Nullable StructureFilterMapFunc func)
      Deprecated.
      Use gst_structure_filter_and_map_in_place_id_str().
      Calls the provided function once for each field in the GstStructure. In contrast to gst_structure_foreach(), the function may modify the fields. In contrast to gst_structure_map_in_place(), the field is removed from the structure if false is returned from the function. The structure must be mutable.
      Parameters:
      func - a function to call for each field
      Since:
      1.6
    • filterAndMapInPlaceIdStr

      public void filterAndMapInPlaceIdStr(@Nullable StructureFilterMapIdStrFunc func)
      Calls the provided function once for each field in the GstStructure. In contrast to gst_structure_foreach_id_str(), the function may modify the fields. In contrast to gst_structure_map_in_place_id_str(), the field is removed from the structure if false is returned from the function. The structure must be mutable.
      Parameters:
      func - a function to call for each field
      Since:
      1.26
    • fixate

      public void fixate()
      Fixate all values in this Structure using gst_value_fixate(). this Structure will be modified in-place and should be writable.
    • fixateField

      public boolean fixateField(String fieldName)
      Fixates a GstStructure by changing the given field with its fixated value.
      Parameters:
      fieldName - a field in this Structure
      Returns:
      true if the structure field could be fixated
    • fixateFieldBoolean

      public boolean fixateFieldBoolean(String fieldName, boolean target)
      Fixates a GstStructure by changing the given fieldName field to the given target boolean if that field is not fixed yet.
      Parameters:
      fieldName - a field in this Structure
      target - the target value of the fixation
      Returns:
      true if the structure could be fixated
    • fixateFieldNearestDouble

      public boolean fixateFieldNearestDouble(String fieldName, double target)
      Fixates a GstStructure by changing the given field to the nearest double to target that is a subset of the existing field.
      Parameters:
      fieldName - a field in this Structure
      target - the target value of the fixation
      Returns:
      true if the structure could be fixated
    • fixateFieldNearestFraction

      public boolean fixateFieldNearestFraction(String fieldName, int targetNumerator, int targetDenominator)
      Fixates a GstStructure by changing the given field to the nearest fraction to targetDenominator that is a subset of the existing field.
      Parameters:
      fieldName - a field in this Structure
      targetNumerator - The numerator of the target value of the fixation
      targetDenominator - The denominator of the target value of the fixation
      Returns:
      true if the structure could be fixated
    • fixateFieldNearestInt

      public boolean fixateFieldNearestInt(String fieldName, int target)
      Fixates a GstStructure by changing the given field to the nearest integer to target that is a subset of the existing field.
      Parameters:
      fieldName - a field in this Structure
      target - the target value of the fixation
      Returns:
      true if the structure could be fixated
    • fixateFieldString

      public boolean fixateFieldString(String fieldName, String target)
      Fixates a GstStructure by changing the given fieldName field to the given target string if that field is not fixed yet.
      Parameters:
      fieldName - a field in this Structure
      target - the target value of the fixation
      Returns:
      true if the structure could be fixated
    • foreach

      @Deprecated public boolean foreach(@Nullable StructureForeachFunc func)
      Deprecated.
      Use gst_structure_foreach_id_str().
      Calls the provided function once for each field in the GstStructure. The function must not modify the fields. Also see gst_structure_map_in_place() and gst_structure_filter_and_map_in_place().
      Parameters:
      func - a function to call for each field
      Returns:
      true if the supplied function returns true For each of the fields, false otherwise.
    • foreachIdStr

      public boolean foreachIdStr(@Nullable StructureForeachIdStrFunc func)
      Calls the provided function once for each field in the GstStructure. The function must not modify the fields. Also see gst_structure_map_in_place_id_str() and gst_structure_filter_and_map_in_place_id_str().
      Parameters:
      func - a function to call for each field
      Returns:
      true if the supplied function returns true For each of the fields, false otherwise.
      Since:
      1.26
    • free

      public void free()
      Frees a GstStructure and all its fields and values. The structure must not have a parent when this function is called.
    • get

      public boolean get(String firstFieldname, Object... varargs)

      Parses the variable arguments and reads fields from this Structure accordingly. Variable arguments should be in the form field name, field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be null.

      For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref\() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free() or the suitable function for the boxed type.

      Parameters:
      firstFieldname - the name of the first field to read
      varargs - variable arguments
      Returns:
      false if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise true.
    • getArray

      public boolean getArray(String fieldname, Out<ValueArray> array)
      This is useful in language bindings where unknown GValue types are not supported. This function will convert the GST_TYPE_ARRAY into a newly allocated GValueArray and return it through array. Be aware that this is slower then getting the GValue directly.
      Parameters:
      fieldname - the name of a field
      array - a pointer to a GValueArray
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_ARRAY, this function returns false.
      Since:
      1.12
    • getBoolean

      public boolean getBoolean(String fieldname, Out<Boolean> value)
      Sets the boolean pointed to by value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type.
      Parameters:
      fieldname - the name of a field
      value - a pointer to a gboolean to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a boolean, this function returns false.
    • getClockTime

      public boolean getClockTime(String fieldname, ClockTime value)
      Sets the clock time pointed to by value corresponding to the clock time of the given field. Caller is responsible for making sure the field exists and has the correct type.
      Parameters:
      fieldname - the name of a field
      value - a pointer to a GstClockTime to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GstClockTime, this function returns false.
    • getDate

      public boolean getDate(String fieldname, Out<Date> value)

      Sets the date pointed to by value corresponding to the date of the given field. Caller is responsible for making sure the field exists and has the correct type.

      On success value will point to a newly-allocated copy of the date which should be freed with g_date_free() when no longer needed (note: this is inconsistent with e.g. gst_structure_get_string() which doesn't return a copy of the string).

      Parameters:
      fieldname - the name of a field
      value - a pointer to a GDate to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a data, this function returns false.
    • getDateTime

      public boolean getDateTime(String fieldname, Out<DateTime> value)

      Sets the datetime pointed to by value corresponding to the datetime of the given field. Caller is responsible for making sure the field exists and has the correct type.

      On success value will point to a reference of the datetime which should be unreffed with gst_date_time_unref() when no longer needed (note: this is inconsistent with e.g. gst_structure_get_string() which doesn't return a copy of the string).

      Parameters:
      fieldname - the name of a field
      value - a pointer to a GstDateTime to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a data, this function returns false.
    • getDouble

      public boolean getDouble(String fieldname, Out<Double> value)
      Sets the double pointed to by value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type.
      Parameters:
      fieldname - the name of a field
      value - a pointer to a gdouble to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a double, this function returns false.
    • getEnum

      public boolean getEnum(String fieldname, Type enumtype, Out<Integer> value)
      Sets the int pointed to by value corresponding to the value of the given field. Caller is responsible for making sure the field exists, has the correct type and that the enumtype is correct.
      Parameters:
      fieldname - the name of a field
      enumtype - the enum type of a field
      value - a pointer to an int to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain an enum of the given type, this function returns false.
    • getFieldType

      public Type getFieldType(String fieldname)
      Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned.
      Parameters:
      fieldname - the name of the field
      Returns:
      the GValue of the field
    • getFlags

      public boolean getFlags(String fieldname, Type flagsType, Out<Integer> value)
      Sets the unsigned int pointed to by value corresponding to the value of the given field. Caller is responsible for making sure the field exists, has the correct type and that the flagstype is correct.
      Parameters:
      fieldname - the name of a field
      flagsType - the flags type of a field
      value - a pointer to an unsigned int to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain flags or did not contain flags of the given type, this function returns false.
      Since:
      1.22
    • getFlagset

      public boolean getFlagset(String fieldname, @Nullable Out<Integer> valueFlags, @Nullable Out<Integer> valueMask)
      Read the GstFlagSet flags and mask out of the structure into the provided pointers.
      Parameters:
      fieldname - the name of a field
      valueFlags - a pointer to a guint for the flags field
      valueMask - a pointer to a guint for the mask field
      Returns:
      true if the values could be set correctly. If there was no field with fieldname or the existing field did not contain a GstFlagSet, this function returns false.
      Since:
      1.6
    • getFraction

      public boolean getFraction(String fieldname, Out<Integer> valueNumerator, Out<Integer> valueDenominator)
      Sets the integers pointed to by valueNumerator and valueDenominator corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type.
      Parameters:
      fieldname - the name of a field
      valueNumerator - a pointer to an int to set
      valueDenominator - a pointer to an int to set
      Returns:
      true if the values could be set correctly. If there was no field with fieldname or the existing field did not contain a GstFraction, this function returns false.
    • getInt

      public boolean getInt(String fieldname, Out<Integer> value)
      Sets the int pointed to by value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type.
      Parameters:
      fieldname - the name of a field
      value - a pointer to an int to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain an int, this function returns false.
    • getInt64

      public boolean getInt64(String fieldname, Out<Long> value)
      Sets the gint64 pointed to by value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type.
      Parameters:
      fieldname - the name of a field
      value - a pointer to a gint64 to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a gint64, this function returns false.
      Since:
      1.4
    • getList

      public boolean getList(String fieldname, Out<ValueArray> array)
      This is useful in language bindings where unknown GValue types are not supported. This function will convert the GST_TYPE_LIST into a newly allocated GValueArray and return it through array. Be aware that this is slower then getting the GValue directly.
      Parameters:
      fieldname - the name of a field
      array - a pointer to a GValueArray
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_LIST, this function returns false.
      Since:
      1.12
    • getName

      public String getName()
      Get the name of this Structure as a string.
      Returns:
      the name of the structure.
    • getNameId

      @Deprecated public Quark getNameId()
      Deprecated.
      Use gst_structure_get_name_id_str().
      Get the name of this Structure as a GQuark.
      Returns:
      the quark representing the name of the structure.
    • getNameIdStr

      public IdStr getNameIdStr()
      Get the name of this Structure as a GstIdStr.
      Returns:
      the name of the structure.
      Since:
      1.26
    • getString

      public @Nullable String getString(String fieldname)

      Finds the field corresponding to fieldname, and returns the string contained in the field's value. Caller is responsible for making sure the field exists and has the correct type.

      The string should not be modified, and remains valid until the next call to a gst_structure_*() function with the given structure.

      Parameters:
      fieldname - the name of a field
      Returns:
      a pointer to the string or null when the field did not exist or did not contain a string.
    • getUint

      public boolean getUint(String fieldname, Out<Integer> value)
      Sets the uint pointed to by value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type.
      Parameters:
      fieldname - the name of a field
      value - a pointer to a uint to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a uint, this function returns false.
    • getUint64

      public boolean getUint64(String fieldname, Out<Long> value)
      Sets the guint64 pointed to by value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type.
      Parameters:
      fieldname - the name of a field
      value - a pointer to a guint64 to set
      Returns:
      true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a guint64, this function returns false.
      Since:
      1.4
    • getValue

      public @Nullable Value getValue(String fieldname)
      Get the value of the field with name fieldname.
      Parameters:
      fieldname - the name of the field to get
      Returns:
      the GValue corresponding to the field with the given name.
    • hasField

      public boolean hasField(String fieldname)
      Check if this Structure contains a field named fieldname.
      Parameters:
      fieldname - the name of a field
      Returns:
      true if the structure contains a field with the given name
    • hasFieldTyped

      public boolean hasFieldTyped(String fieldname, Type type)
      Check if this Structure contains a field named fieldname and with GType type.
      Parameters:
      fieldname - the name of a field
      type - the type of a value
      Returns:
      true if the structure contains a field with the given name and type
    • hasName

      public boolean hasName(String name)
      Checks if the structure has the given name
      Parameters:
      name - structure name to check for
      Returns:
      true if name matches the name of the structure.
    • idGet

      @Deprecated public boolean idGet(Quark firstFieldId, Object... varargs)
      Deprecated.
      Use gst_structure_id_str_get().

      Parses the variable arguments and reads fields from this Structure accordingly. Variable arguments should be in the form field id quark, field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be null (technically it should be a 0 quark, but we require null so compilers that support it can check for the null terminator and warn if it's not there).

      This function is just like gst_structure_get() only that it is slightly more efficient since it saves the string-to-quark lookup in the global quark hashtable.

      For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref\() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free() or the suitable function for the boxed type.

      Parameters:
      firstFieldId - the quark of the first field to read
      varargs - variable arguments
      Returns:
      false if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise true.
    • idGetValue

      public @Nullable Value idGetValue(Quark field)
      Get the value of the field with GQuark field.
      Parameters:
      field - the GQuark of the field to get
      Returns:
      the GValue corresponding to the field with the given name identifier.
    • idHasField

      @Deprecated public boolean idHasField(Quark field)
      Deprecated.
      Use gst_structure_id_str_has_field().
      Check if this Structure contains a field named field.
      Parameters:
      field - GQuark of the field name
      Returns:
      true if the structure contains a field with the given name
    • idHasFieldTyped

      @Deprecated public boolean idHasFieldTyped(Quark field, Type type)
      Deprecated.
      Use gst_structure_id_str_has_field_typed().
      Check if this Structure contains a field named field and with GType type.
      Parameters:
      field - GQuark of the field name
      type - the type of a value
      Returns:
      true if the structure contains a field with the given name and type
    • idSet

      @Deprecated public void idSet(Quark fieldname, Object... varargs)
      Deprecated.
      Use gst_structure_id_str_set().
      Identical to gst_structure_set, except that field names are passed using the GQuark for the field name. This allows more efficient setting of the structure if the caller already knows the associated quark values. The last variable argument must be null.
      Parameters:
      fieldname - the GQuark for the name of the field to set
      varargs - variable arguments
    • idSetValue

      @Deprecated public void idSetValue(Quark field, Value value)
      Deprecated.
      Use gst_structure_id_str_set_value().
      Sets the field with the given GQuark field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.
      Parameters:
      field - a GQuark representing a field
      value - the new value of the field
    • idStrGet

      public boolean idStrGet(IdStr firstFieldname, Object... varargs)

      Parses the variable arguments and reads fields from this Structure accordingly. Variable arguments should be in the form field name (as GstIdStr), field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be null.

      For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref\() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free() or the suitable function for the boxed type.

      Parameters:
      firstFieldname - the name of the first field to read
      varargs - variable arguments
      Returns:
      false if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise true.
      Since:
      1.26
    • idStrGetFieldType

      public Type idStrGetFieldType(IdStr fieldname)
      Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned.
      Parameters:
      fieldname - the name of the field
      Returns:
      the GValue of the field
      Since:
      1.26
    • idStrGetValue

      public @Nullable Value idStrGetValue(IdStr fieldname)
      Get the value of the field with name fieldname.
      Parameters:
      fieldname - the name of the field to get
      Returns:
      the GValue corresponding to the field with the given name.
      Since:
      1.26
    • idStrHasField

      public boolean idStrHasField(IdStr fieldname)
      Check if this Structure contains a field named fieldname.
      Parameters:
      fieldname - the name of a field
      Returns:
      true if the structure contains a field with the given name
      Since:
      1.26
    • idStrHasFieldTyped

      public boolean idStrHasFieldTyped(IdStr fieldname, Type type)
      Check if this Structure contains a field named fieldname and with GType type.
      Parameters:
      fieldname - the name of a field
      type - the type of a value
      Returns:
      true if the structure contains a field with the given name and type
      Since:
      1.26
    • idStrNthFieldName

      public IdStr idStrNthFieldName(int index)
      Get the name (as a GstIdStr) of the given field number, counting from 0 onwards.
      Parameters:
      index - the index to get the name of
      Returns:
      the name of the given field number
      Since:
      1.26
    • idStrRemoveField

      public void idStrRemoveField(IdStr fieldname)
      Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged.
      Parameters:
      fieldname - the name of the field to remove
      Since:
      1.26
    • idStrRemoveFields

      public void idStrRemoveFields(IdStr fieldname, Object... varargs)
      Removes the fields with the given names. If a field does not exist, the argument is ignored.
      Parameters:
      fieldname - the name of the field to remove
      varargs - null-terminated list of more fieldnames to remove
      Since:
      1.26
    • idStrSet

      public void idStrSet(IdStr fieldname, Object... varargs)
      Identical to gst_structure_set, except that field names are passed using a GstIdStr for the field name. This allows more efficient setting of the structure if the caller already owns the associated GstIdStr values or if they can be built from static literals. The last variable argument must be null.
      Parameters:
      fieldname - the the name of the field to set
      varargs - variable arguments
      Since:
      1.26
    • idStrSetValue

      public void idStrSetValue(IdStr fieldname, Value value)
      Sets the field with the given name field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.
      Parameters:
      fieldname - the name of the field to set
      value - the new value of the field
      Since:
      1.26
    • idStrTakeValue

      public void idStrTakeValue(IdStr fieldname, Value value)
      Sets the field with the given GstIdStr field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.
      Parameters:
      fieldname - the name of the field to set
      value - the new value of the field
      Since:
      1.26
    • idTakeValue

      @Deprecated public void idTakeValue(Quark field, Value value)
      Deprecated.
      Use gst_structure_id_str_take_value().
      Sets the field with the given GQuark field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.
      Parameters:
      field - a GQuark representing a field
      value - the new value of the field
    • intersect

      public @Nullable Structure intersect(Structure struct2)
      Intersects this Structure and struct2 and returns the intersection.
      Parameters:
      struct2 - a GstStructure
      Returns:
      Intersection of this Structure and struct2
    • isEqual

      public boolean isEqual(Structure structure2)
      Tests if the two GstStructure are equal.
      Parameters:
      structure2 - a GstStructure.
      Returns:
      true if the two structures have the same name and field.
    • isSubset

      public boolean isSubset(Structure superset)
      Checks if this Structure is a subset of superset, i.e. has the same structure name and for all fields that are existing in superset, this Structure has a value that is a subset of the value in superset.
      Parameters:
      superset - a potentially greater GstStructure
      Returns:
      true if this Structure is a subset of superset
    • isWritable

      public boolean isWritable()
      Checks if the structure is writable. true if parent is not set or its refcount is 1, false otherwise.
      Returns:
      true if the structure is writable.
      Since:
      1.26.2
    • mapInPlace

      @Deprecated public boolean mapInPlace(@Nullable StructureMapFunc func)
      Deprecated.
      Use gst_structure_map_in_place_id_str().
      Calls the provided function once for each field in the GstStructure. In contrast to gst_structure_foreach(), the function may modify but not delete the fields. The structure must be mutable.
      Parameters:
      func - a function to call for each field
      Returns:
      true if the supplied function returns true For each of the fields, false otherwise.
    • mapInPlaceIdStr

      public boolean mapInPlaceIdStr(@Nullable StructureMapIdStrFunc func)
      Calls the provided function once for each field in the GstStructure. In contrast to gst_structure_foreach_id_str(), the function may modify but not delete the fields. The structure must be mutable.
      Parameters:
      func - a function to call for each field
      Returns:
      true if the supplied function returns true For each of the fields, false otherwise.
      Since:
      1.26
    • nFields

      public int nFields()
      Get the number of fields in the structure.
      Returns:
      the number of fields in the structure
    • nthFieldName

      public String nthFieldName(int index)
      Get the name of the given field number, counting from 0 onwards.
      Parameters:
      index - the index to get the name of
      Returns:
      the name of the given field number
    • removeAllFields

      public void removeAllFields()
      Removes all fields in a GstStructure.
    • removeField

      public void removeField(String fieldname)
      Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged.
      Parameters:
      fieldname - the name of the field to remove
    • removeFields

      public void removeFields(String fieldname, Object... varargs)
      Removes the fields with the given names. If a field does not exist, the argument is ignored.
      Parameters:
      fieldname - the name of the field to remove
      varargs - null-terminated list of more fieldnames to remove
    • serialize

      @Deprecated public String serialize(Set<SerializeFlags> flags)
      Deprecated.
      Use gst_structure_serialize_full() instead.

      Converts this Structure to a human-readable string representation.

      This version of the caps serialization function introduces support for nested structures and caps but the resulting strings won't be parsable with GStreamer prior to 1.20 unless GST_SERIALIZE_FLAG_BACKWARD_COMPAT is passed as flag.

      SerializeFlags.STRICT flags is not allowed because it would make this function nullable which is an API break for bindings. Use gst_structure_serialize_full() instead.

      Free-function: g_free

      Parameters:
      flags - The flags to use to serialize structure
      Returns:
      a pointer to string allocated by g_malloc(). g_free() after usage.
      Since:
      1.20
    • serialize

      @Deprecated public String serialize(SerializeFlags... flags)
      Deprecated.
      Use gst_structure_serialize_full() instead.

      Converts this Structure to a human-readable string representation.

      This version of the caps serialization function introduces support for nested structures and caps but the resulting strings won't be parsable with GStreamer prior to 1.20 unless GST_SERIALIZE_FLAG_BACKWARD_COMPAT is passed as flag.

      SerializeFlags.STRICT flags is not allowed because it would make this function nullable which is an API break for bindings. Use gst_structure_serialize_full() instead.

      Free-function: g_free

      Parameters:
      flags - The flags to use to serialize structure
      Returns:
      a pointer to string allocated by g_malloc(). g_free() after usage.
      Since:
      1.20
    • serializeFull

      public @Nullable String serializeFull(Set<SerializeFlags> flags)
      Alias for gst_structure_serialize() but with nullable annotation because it can return null when SerializeFlags.STRICT flag is set.
      Parameters:
      flags - The flags to use to serialize structure
      Returns:
      a pointer to string allocated by g_malloc(). g_free() after usage.
      Since:
      1.24
    • serializeFull

      public @Nullable String serializeFull(SerializeFlags... flags)
      Alias for gst_structure_serialize() but with nullable annotation because it can return null when SerializeFlags.STRICT flag is set.
      Parameters:
      flags - The flags to use to serialize structure
      Returns:
      a pointer to string allocated by g_malloc(). g_free() after usage.
      Since:
      1.24
    • set

      public void set(String fieldname, Object... varargs)
      Parses the variable arguments and sets fields accordingly. Fields that weren't already part of the structure are added as needed. Variable arguments should be in the form field name, field type (as a GType), value(s). The last variable argument should be null.
      Parameters:
      fieldname - the name of the field to set
      varargs - variable arguments
    • setArray

      public void setArray(String fieldname, ValueArray array)
      This is useful in language bindings where unknown GValue types are not supported. This function will convert a array to GST_TYPE_ARRAY and set the field specified by fieldname. Be aware that this is slower then using GST_TYPE_ARRAY in a GValue directly.
      Parameters:
      fieldname - the name of a field
      array - a pointer to a GValueArray
      Since:
      1.12
    • setList

      public void setList(String fieldname, ValueArray array)
      This is useful in language bindings where unknown GValue types are not supported. This function will convert a array to GST_TYPE_LIST and set the field specified by fieldname. Be aware that this is slower then using GST_TYPE_LIST in a GValue directly.
      Parameters:
      fieldname - the name of a field
      array - a pointer to a GValueArray
      Since:
      1.12
    • setName

      public void setName(String name)
      Sets the name of the structure to the given name. The string provided is copied before being used. It must not be empty, start with a letter and can be followed by letters, numbers and any of "/-_.:".
      Parameters:
      name - the new name of the structure
    • setNameIdStr

      public void setNameIdStr(IdStr name)
      Sets the name of the structure to the given name. The string provided is copied before being used. It must not be empty, start with a letter and can be followed by letters, numbers and any of "/-_.:".
      Parameters:
      name - the new name of the structure
      Since:
      1.26
    • setNameStaticStr

      public void setNameStaticStr(String name)

      Sets the name of the structure to the given name. The string provided is copied before being used. It must not be empty, start with a letter and can be followed by letters, numbers and any of "/-_.:".

      name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.

      Parameters:
      name - the new name of the structure
      Since:
      1.26
    • setParentRefcount

      public boolean setParentRefcount(MemorySegment refcount)
      Sets the parent_refcount field of GstStructure. This field is used to determine whether a structure is mutable or not. This function should only be called by code implementing parent objects of GstStructure, as described in the MT Refcounting section of the design documents.
      Parameters:
      refcount - a pointer to the parent's refcount
      Returns:
      true if the parent refcount could be set.
    • setStaticStr

      public void setStaticStr(String fieldname, Object... varargs)

      Parses the variable arguments and sets fields accordingly. Fields that weren't already part of the structure are added as needed. Variable arguments should be in the form field name, field type (as a GType), value(s). The last variable argument should be null.

      fieldname and all other field names needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.

      Parameters:
      fieldname - the name of the field to set
      varargs - variable arguments
      Since:
      1.26
    • setValue

      public void setValue(String fieldname, Value value)
      Sets the field with the given name field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.
      Parameters:
      fieldname - the name of the field to set
      value - the new value of the field
    • setValueStaticStr

      public void setValueStaticStr(String fieldname, Value value)

      Sets the field with the given name field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.

      fieldname needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.

      Parameters:
      fieldname - the name of the field to set
      value - the new value of the field
      Since:
      1.26
    • takeValue

      public void takeValue(String fieldname, Value value)
      Sets the field with the given name field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. The function will take ownership of value.
      Parameters:
      fieldname - the name of the field to set
      value - the new value of the field
    • takeValueStaticStr

      public void takeValueStaticStr(String fieldname, Value value)

      Sets the field with the given name field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. The function will take ownership of value.

      fieldname needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.

      Parameters:
      fieldname - the name of the field to set
      value - the new value of the field
      Since:
      1.26
    • toString

      public String toString()

      Converts this Structure to a human-readable string representation.

      For debugging purposes its easier to do something like this: ```C GST_LOG ("structure is %" GST_PTR_FORMAT, structure);

      This prints the structure in human readable form.
      
      This function will lead to unexpected results when there are nested `GstCaps`
      / `GstStructure` deeper than one level, you should user
      gst_structure_serialize_full() instead for those cases.
      
      Free-function: g_free
      
      Overrides:
      toString in class Object
      Returns:
      a pointer to string allocated by g_malloc(). g_free() after usage.