Klasse TagList

Alle implementierten Schnittstellen:
PointerInterface

public class TagList extends Record
List of tags and values used to describe media metadata.

Strings in structures must be ASCII or UTF-8 encoded. Other encodings are
not allowed. Strings must not be empty or %NULL.

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

  • Felddetails

    • MINI_OBJECT

      public static final String MINI_OBJECT
      the parent type
      Private field: direct-type
      Siehe auch:
  • Konstruktordetails

    • TagList

      public TagList(PointerContainer pointer)
    • TagList

      public TagList()
    • TagList

      public TagList(@Nonnull Str tag, Object... _ellipsis)
      Creates a new taglist and appends the values for the given tags. It expects
      tag-value pairs like gst_tag_list_add(), and a %NULL terminator after the
      last pair. The type of the values is implicit and is documented in the API
      reference, but can also be queried at runtime with gst_tag_get_type(). It
      is an error to pass a value of a type not matching the tag type into this
      function. The tag list will make copies of any arguments passed
      (e.g. strings, buffers).

      After creation you might also want to set a #GstTagScope on the returned
      taglist to signal if the contained tags are global or stream tags. By
      default stream scope is assumes. See gst_tag_list_set_scope().

      Free-function: gst_tag_list_unref
      Parameter:
      tag - tag
      _ellipsis - %NULL-terminated list of values to set
    • TagList

      public TagList(String tag, Object... _ellipsis)
      Creates a new taglist and appends the values for the given tags. It expects
      tag-value pairs like gst_tag_list_add(), and a %NULL terminator after the
      last pair. The type of the values is implicit and is documented in the API
      reference, but can also be queried at runtime with gst_tag_get_type(). It
      is an error to pass a value of a type not matching the tag type into this
      function. The tag list will make copies of any arguments passed
      (e.g. strings, buffers).

      After creation you might also want to set a #GstTagScope on the returned
      taglist to signal if the contained tags are global or stream tags. By
      default stream scope is assumes. See gst_tag_list_set_scope().

      Free-function: gst_tag_list_unref
      Parameter:
      tag - tag
      _ellipsis - %NULL-terminated list of values to set
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newEmptyTagList

      public static TagList newEmptyTagList()
      Creates a new empty GstTagList.

      Free-function: gst_tag_list_unref
      Gibt zurück:
      An empty tag list
    • newFromStringTagList

      public static TagList newFromStringTagList(@Nonnull Str str)
      Deserializes a tag list.
      Parameter:
      str - a string created with gst_tag_list_to_string()
      Gibt zurück:
      a new #GstTagList, or %NULL in case of an error.
    • newFromStringTagList

      public static TagList newFromStringTagList(String str)
      Deserializes a tag list.
      Parameter:
      str - a string created with gst_tag_list_to_string()
      Gibt zurück:
      a new #GstTagList, or %NULL in case of an error.
    • add

      public void add(int mode, @Nonnull Str tag, Object... _ellipsis)
      Sets the values for the given tags using the specified mode.
      Parameter:
      mode - the mode to use
      tag - tag
      _ellipsis - %NULL-terminated list of values to set
    • add

      public void add(int mode, String tag, Object... _ellipsis)
      Sets the values for the given tags using the specified mode.
      Parameter:
      mode - the mode to use
      tag - tag
      _ellipsis - %NULL-terminated list of values to set
    • addValue

      public void addValue(int mode, @Nonnull Str tag, @Nonnull Value value)
      Sets the GValue for a given tag using the specified mode.
      Parameter:
      mode - the mode to use
      tag - tag
      value - GValue for this tag
    • addValue

      public void addValue(int mode, String tag, @Nonnull Value value)
      Sets the GValue for a given tag using the specified mode.
      Parameter:
      mode - the mode to use
      tag - tag
      value - GValue for this tag
    • addValues

      public void addValues(int mode, @Nonnull Str tag, Object... _ellipsis)
      Sets the GValues for the given tags using the specified mode.
      Parameter:
      mode - the mode to use
      tag - tag
      _ellipsis - GValues to set
    • addValues

      public void addValues(int mode, String tag, Object... _ellipsis)
      Sets the GValues for the given tags using the specified mode.
      Parameter:
      mode - the mode to use
      tag - tag
      _ellipsis - GValues to set
    • copy

      public TagList copy()
      Creates a new #GstTagList as a copy of the old @taglist. The new taglist
      will have a refcount of 1, owned by the caller, and will be writable as
      a result.

      Note that this function is the semantic equivalent of a gst_tag_list_ref()
      followed by a gst_tag_list_make_writable(). If you only want to hold on to a
      reference to the data, you should use gst_tag_list_ref().

      When you are finished with the taglist, call gst_tag_list_unref() on it.
      Gibt zurück:
      the new #GstTagList
    • foreach

      public void foreach(TagList.OnTagForeachFunc func, @Nullable Pointer user_data)
      Calls the given function for each tag inside the tag list. Note that if there
      is no tag, the function won't be called at all.
      Parameter:
      func - function to be called for each tag
      user_data - user specified data
    • getBoolean

      public boolean getBoolean(@Nonnull Str tag, @Nonnull Int value)
      Copies the contents for the given tag into the value, merging multiple values
      into one if multiple values are associated with the tag.
      Parameter:
      tag - tag to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getBoolean

      public boolean getBoolean(String tag, @Nonnull Int value)
      Copies the contents for the given tag into the value, merging multiple values
      into one if multiple values are associated with the tag.
      Parameter:
      tag - tag to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getBooleanIndex

      public boolean getBooleanIndex(@Nonnull Str tag, int index, @Nonnull Int value)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getBooleanIndex

      public boolean getBooleanIndex(String tag, int index, @Nonnull Int value)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getDouble

      public boolean getDouble(@Nonnull Str tag, @Nonnull Dbl value)
      Copies the contents for the given tag into the value, merging multiple values
      into one if multiple values are associated with the tag.
      Parameter:
      tag - tag to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getDouble

      public boolean getDouble(String tag, @Nonnull Dbl value)
      Copies the contents for the given tag into the value, merging multiple values
      into one if multiple values are associated with the tag.
      Parameter:
      tag - tag to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getDoubleIndex

      public boolean getDoubleIndex(@Nonnull Str tag, int index, @Nonnull Dbl value)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getDoubleIndex

      public boolean getDoubleIndex(String tag, int index, @Nonnull Dbl value)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getFloat

      public boolean getFloat(@Nonnull Str tag, @Nonnull Flt value)
      Copies the contents for the given tag into the value, merging multiple values
      into one if multiple values are associated with the tag.
      Parameter:
      tag - tag to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getFloat

      public boolean getFloat(String tag, @Nonnull Flt value)
      Copies the contents for the given tag into the value, merging multiple values
      into one if multiple values are associated with the tag.
      Parameter:
      tag - tag to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getFloatIndex

      public boolean getFloatIndex(@Nonnull Str tag, int index, @Nonnull Flt value)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getFloatIndex

      public boolean getFloatIndex(String tag, int index, @Nonnull Flt value)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getInt

      public boolean getInt(@Nonnull Str tag, @Nonnull Int value)
      Copies the contents for the given tag into the value, merging multiple values
      into one if multiple values are associated with the tag.
      Parameter:
      tag - tag to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getInt

      public boolean getInt(String tag, @Nonnull Int value)
      Copies the contents for the given tag into the value, merging multiple values
      into one if multiple values are associated with the tag.
      Parameter:
      tag - tag to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getIntIndex

      public boolean getIntIndex(@Nonnull Str tag, int index, @Nonnull Int value)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getIntIndex

      public boolean getIntIndex(String tag, int index, @Nonnull Int value)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      value - location for the result
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getScope

      public int getScope()
      Gets the scope of @list.
      Gibt zurück:
      The scope of @list
    • getTagSize

      public int getTagSize(@Nonnull Str tag)
      Checks how many value are stored in this tag list for the given tag.
      Parameter:
      tag - the tag to query
      Gibt zurück:
      The number of tags stored
    • getTagSize

      public int getTagSize(String tag)
      Checks how many value are stored in this tag list for the given tag.
      Parameter:
      tag - the tag to query
      Gibt zurück:
      The number of tags stored
    • getValueIndex

      public Value getValueIndex(@Nonnull Str tag, int index)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      Gibt zurück:
      The GValue for the specified entry or %NULL if the tag wasn't available or the tag doesn't have as many entries
    • getValueIndex

      public Value getValueIndex(String tag, int index)
      Gets the value that is at the given index for the given tag in the given
      list.
      Parameter:
      tag - tag to read out
      index - number of entry to read out
      Gibt zurück:
      The GValue for the specified entry or %NULL if the tag wasn't available or the tag doesn't have as many entries
    • insert

      public void insert(@Nonnull TagList from, int mode)
      Inserts the tags of the @from list into the first list using the given mode.
      Parameter:
      from - list to merge from
      mode - the mode to use
    • isEmpty

      public boolean isEmpty()
      Checks if the given taglist is empty.
      Gibt zurück:
      %TRUE if the taglist is empty, otherwise %FALSE.
    • isEqual

      public boolean isEqual(@Nonnull TagList list2)
      Checks if the two given taglists are equal.
      Parameter:
      list2 - a #GstTagList.
      Gibt zurück:
      %TRUE if the taglists are equal, otherwise %FALSE
    • merge

      public TagList merge(@Nullable TagList list2, int mode)
      Merges the two given lists into a new list. If one of the lists is %NULL, a
      copy of the other is returned. If both lists are %NULL, %NULL is returned.

      Free-function: gst_tag_list_unref
      Parameter:
      list2 - second list to merge
      mode - the mode to use
      Gibt zurück:
      the new list
    • nTags

      public int nTags()
      Get the number of tags in @list.
      Gibt zurück:
      The number of tags in @list.
    • nthTagName

      public Str nthTagName(int index)
      Get the name of the tag in @list at @index.
      Parameter:
      index - the index
      Gibt zurück:
      The name of the tag at @index.
    • removeTag

      public void removeTag(@Nonnull Str tag)
      Removes the given tag from the taglist.
      Parameter:
      tag - tag to remove
    • removeTag

      public void removeTag(String tag)
      Removes the given tag from the taglist.
      Parameter:
      tag - tag to remove
    • setScope

      public void setScope(int scope)
      Sets the scope of @list to @scope. By default the scope
      of a taglist is stream scope.
      Parameter:
      scope - new scope for @list
    • toStr

      public Str toStr()
      Serializes a tag list to a string.
      Gibt zurück:
      a newly-allocated string. The string must be freed with g_free() when no longer needed.
    • copyValue

      public static boolean copyValue(@Nonnull Value dest, @Nonnull TagList list, @Nonnull Str tag)
      Copies the contents for the given tag into the value,
      merging multiple values into one if multiple values are associated
      with the tag.
      You must g_value_unset() the value after use.
      Parameter:
      dest - uninitialized #GValue to copy into
      list - list to get the tag from
      tag - tag to read out
      Gibt zurück:
      %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()