Next: , Previous: GstSystemClock, Up: Top


35 GstTagList

List of tags and values used to describe media metadata

35.1 Overview

List of tags and values used to describe media metadata.

Last reviewed on 2005-11-23 (0.9.5)

35.2 Usage

— Function: gst-tag-register (name mchars) (flag <gst-tag-flag>) (type <gtype>) (nick mchars) (blurb mchars) (func <gst-tag-merge-func>)

Registers a new tag type for the use with GStreamer's type system. If a type with that name is already registered, that one is used. The old registration may have used a different type however. So don't rely on your supplied values.

Important: if you do not supply a merge function the implication will be that there can only be one single value for this tag in a tag list and any additional values will silenty be discarded when being added (unless <gst-tag-merge-replace>, <gst-tag-merge-replace-all>, or <gst-tag-merge-prepend> is used as merge mode, in which case the new value will replace the old one in the list).

The merge function will be called from gst-tag-list-copy-value when it is required that one or more values for a tag be condensed into one single value. This may happen from gst-tag-list-get-string, gst-tag-list-get-int, gst-tag-list-get-double etc. What will happen exactly in that case depends on how the tag was registered and if a merge function was supplied and if so which one.

Two default merge functions are provided: gst-tag-merge-use-first and gst-tag-merge-strings-with-commas.

name
the name or identifier string
flag
a flag describing the type of tag info
type
the type this data is in
nick
human-readable name
blurb
a human-readable description about this tag
func
function for merging multiple values of this tag, or NULL
— Function: gst-tag-merge-use-first (dest <gvalue>) (src <gvalue>)

This is a convenience function for the func argument of gst-tag-register. It creates a copy of the first value from the list.

dest
uninitialized GValue to store result in
src
GValue to copy from
— Function: gst-tag-merge-strings-with-comma (dest <gvalue>) (src <gvalue>)

This is a convenience function for the func argument of gst-tag-register. It concatenates all given strings using a comma. The tag must be registered as a G_TYPE_STRING or this function will fail.

dest
uninitialized GValue to store result in
src
GValue to copy from
— Function: gst-tag-exists (tag mchars)   (ret bool)

Checks if the given type is already registered.

tag
name of the tag
ret
TRUE if the type is already registered
— Function: gst-tag-get-nick (tag mchars)   (ret mchars)

Returns the human-readable name of this tag, You must not change or free this string.

tag
the tag
ret
the human-readable name of this tag
— Function: gst-tag-get-description (tag mchars)   (ret mchars)

Returns the human-readable description of this tag, You must not change or free this string.

tag
the tag
ret
the human-readable description of this tag
— Function: gst-tag-get-flag (tag mchars)   (ret <gst-tag-flag>)

Gets the flag of tag.

tag
the tag
ret
the flag of this tag.
— Function: gst-tag-is-fixed (tag mchars)   (ret bool)

Checks if the given tag is fixed. A fixed tag can only contain one value. Unfixed tags can contain lists of values.

tag
tag to check
ret
TRUE, if the given tag is fixed.
— Function: gst-tag-list-new   (ret <gst-tag-list*>)

Creates a new empty GstTagList.

ret
An empty tag list
— Function: gst-is-tag-list (<gconstpointer>)   (ret bool)

Checks if the given pointer is a taglist.

p
Object that might be a taglist
ret
TRUE, if the given pointer is a taglist
— Function: gst-tag-list-insert (self <gst-tag-list*>) (from <gst-tag-list*>) (mode <gst-tag-merge-mode>)

Inserts the tags of the second list into the first list using the given mode.

into
list to merge into
from
list to merge from
mode
the mode to use
— Function: gst-tag-list-merge (self <gst-tag-list*>) (list2 <gst-tag-list*>) (mode <gst-tag-merge-mode>)   (ret <gst-tag-list*>)

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.

list1
first list to merge
list2
second list to merge
mode
the mode to use
ret
the new list
— Function: gst-tag-list-get-tag-size (self <gst-tag-list*>) (tag mchars)   (ret unsigned-int)

Checks how many value are stored in this tag list for the given tag.

list
a taglist
tag
the tag to query
ret
The number of tags stored
— Function: gst-tag-list-remove-tag (self <gst-tag-list*>) (tag mchars)

Removes the given tag from the taglist.

list
list to remove tag from
tag
tag to remove
— Function: gst-tag-list-foreach (self <gst-tag-list*>) (func <gst-tag-foreach-func>) (user_data <gpointer>)

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.

list
list to iterate over
func
function to be called for each tag
user-data
user specified data
— Function: gst-tag-list-get-value-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret <gvalue>)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list>
tag
tag to read out
index
number of entry to read out
ret
The GValue for the specified entry or NULL if the tag wasn't available or the tag doesn't have as many entries
— Function: gst-tag-list-copy-value (dest <gvalue>) (list <gst-tag-list*>) (tag mchars)   (ret bool)

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.

dest
uninitialized <gvalue> to copy into
list
list to get the tag from
tag
tag to read out
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-char (self <gst-tag-list*>) (tag mchars) (value mchars)   (ret bool)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-char-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int) (value mchars)   (ret bool)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-uchar (self <gst-tag-list*>) (tag mchars) (value <guchar*>)   (ret bool)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-uchar-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int) (value <guchar*>)   (ret bool)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-boolean (self <gst-tag-list*>) (tag mchars)   (ret bool) (value bool)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-boolean-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value bool)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-int (self <gst-tag-list*>) (tag mchars)   (ret bool) (value int)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-int-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value int)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-uint (self <gst-tag-list*>) (tag mchars)   (ret bool) (value unsigned-int)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-uint-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value unsigned-int)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-long (self <gst-tag-list*>) (tag mchars)   (ret bool) (value long)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-long-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value long)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-ulong (self <gst-tag-list*>) (tag mchars)   (ret bool) (value unsigned-long)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-ulong-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value unsigned-long)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-int64 (self <gst-tag-list*>) (tag mchars)   (ret bool) (value int64)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-int64-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value int64)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-uint64 (self <gst-tag-list*>) (tag mchars)   (ret bool) (value unsigned-int64)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-uint64-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value unsigned-int64)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-float (self <gst-tag-list*>) (tag mchars)   (ret bool) (value float)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-float-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value float)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-double (self <gst-tag-list*>) (tag mchars)   (ret bool) (value double)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-double-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value double)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-string (self <gst-tag-list*>) (tag mchars)   (ret bool) (value mchars)

Copies the contents for the given tag into the value, possibly merging multiple values into one if multiple values are associated with the tag.

Use gst_tag_list_get_string_index (list, tag, 0, value) if you want to retrieve the first string associated with this tag unmodified.

The resulting string in value should be freed by the caller using g_free when no longer needed

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-string-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int)   (ret bool) (value mchars)

Gets the value that is at the given index for the given tag in the given list.

The resulting string in value should be freed by the caller using g_free when no longer needed

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-pointer (self <gst-tag-list*>) (tag mchars) (value <gpointer*>)   (ret bool)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-pointer-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int) (value <gpointer*>)   (ret bool)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list.
— Function: gst-tag-list-get-date (self <gst-tag-list*>) (tag mchars) (value <g-date**>)   (ret bool)

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list or if it was #f.
— Function: gst-tag-list-get-date-index (self <gst-tag-list*>) (tag mchars) (index unsigned-int) (value <g-date**>)   (ret bool)

Gets the value that is at the given index for the given tag in the given list.

list
a <gst-tag-list> to get the tag from
tag
tag to read out
index
number of entry to read out
value
location for the result
ret
TRUE, if a value was copied, FALSE if the tag didn't exist in the given list or if it was #f.