Gst.TagList¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
mini_object |
r/w |
the parent type |
Methods¶
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gst.TagList¶
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
None
.- classmethod copy_value(list, tag)[source]¶
- Parameters
list (
Gst.TagList
) – list to get the tag fromtag (
str
) – tag to read out
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- dest
uninitialized
GObject.Value
to copy into
- Return type
(
bool
, dest:GObject.Value
)
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
GObject.Value.unset
() the value after use.
- classmethod new_empty()[source]¶
- Returns
An empty tag list
- Return type
Creates a new empty
Gst.TagList
.Free-function: gst_tag_list_unref
- classmethod new_from_string(str)[source]¶
- Parameters
str (
str
) – a string created withGst.TagList.to_string
()- Returns
a new
Gst.TagList
, orNone
in case of an error.- Return type
Gst.TagList
orNone
Deserializes a tag list.
- add_value(mode, tag, value)[source]¶
- Parameters
mode (
Gst.TagMergeMode
) – the mode to usetag (
str
) – tagvalue (
GObject.Value
) –GObject.Value
for this tag
Sets the
GObject.Value
for a given tag using the specified mode.
- copy()[source]¶
- Returns
the new
Gst.TagList
- Return type
Creates a new
Gst.TagList
as a copy of the old self. 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.
- foreach(func, *user_data)[source]¶
- Parameters
func (
Gst.TagForeachFunc
) – function to be called for each tag
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.
- get_boolean(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
- get_boolean_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
- get_date(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a date was copied,False
if the tag didn’t exist in the given list or if it wasNone
.- value
address of a
GLib.Date
pointer variable to store the result into
- Return type
Copies the first date for the given tag in the taglist into the variable pointed to by value. Free the date with
GLib.Date.free
() when it is no longer needed.Free-function:
GLib.Date.free
- get_date_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list or if it wasNone
.- value
location for the result
- Return type
Gets the date that is at the given index for the given tag in the given list and copies it into the variable pointed to by value. Free the date with
GLib.Date.free
() when it is no longer needed.Free-function:
GLib.Date.free
- get_date_time(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a datetime was copied,False
if the tag didn’t exist in the given list or if it wasNone
.- value
address of a
Gst.DateTime
pointer variable to store the result into
- Return type
(
bool
, value:Gst.DateTime
)
Copies the first datetime for the given tag in the taglist into the variable pointed to by value. Unref the date with
Gst.DateTime.unref
() when it is no longer needed.Free-function:
Gst.DateTime.unref
- get_date_time_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list or if it wasNone
.- value
location for the result
- Return type
(
bool
, value:Gst.DateTime
)
Gets the datetime that is at the given index for the given tag in the given list and copies it into the variable pointed to by value. Unref the datetime with
Gst.DateTime.unref
() when it is no longer needed.Free-function:
Gst.DateTime.unref
- get_double(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
- get_double_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
- get_float(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
- get_float_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
- get_int(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
- get_int64(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
- get_int64_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
- get_int_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
- get_pointer(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
- get_pointer_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
- get_sample(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a sample was returned,False
if the tag didn’t exist in the given list or if it wasNone
.- sample
address of a
Gst.Sample
pointer variable to store the result into
- Return type
(
bool
, sample:Gst.Sample
)
Copies the first sample for the given tag in the taglist into the variable pointed to by sample. Free the sample with gst_sample_unref() when it is no longer needed. You can retrieve the buffer from the sample using
Gst.Sample.get_buffer
() and the associated caps (if any) withGst.Sample.get_caps
().Free-function: gst_sample_unref
- get_sample_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a sample was copied,False
if the tag didn’t exist in the given list or if it wasNone
.- sample
address of a
Gst.Sample
pointer variable to store the result into
- Return type
(
bool
, sample:Gst.Sample
)
Gets the sample that is at the given index for the given tag in the given list and copies it into the variable pointed to by sample. Free the sample with gst_sample_unref() when it is no longer needed. You can retrieve the buffer from the sample using
Gst.Sample.get_buffer
() and the associated caps (if any) withGst.Sample.get_caps
().Free-function: gst_sample_unref
- get_string(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
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.TagList.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 will be in UTF-8 encoding and should be freed by the caller using
GLib.free
when no longer needed. The returned string is also guaranteed to be non-None
and non-empty.Free-function:
GLib.free
- get_string_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
The resulting string in value will be in UTF-8 encoding and should be freed by the caller using
GLib.free
when no longer needed. The returned string is also guaranteed to be non-None
and non-empty.Free-function:
GLib.free
- get_uint(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
- get_uint64(tag)[source]¶
- Parameters
tag (
str
) – tag to read out- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag.
- get_uint64_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
- get_uint_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was copied,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Gets the value that is at the given index for the given tag in the given list.
- get_value_index(tag, index)[source]¶
- Parameters
- Returns
The
GObject.Value
for the specified entry orNone
if the tag wasn’t available or the tag doesn’t have as many entries- Return type
Gets the value that is at the given index for the given tag in the given list.
- insert(from_, mode)[source]¶
- Parameters
from (
Gst.TagList
) – list to merge frommode (
Gst.TagMergeMode
) – the mode to use
Inserts the tags of the from list into the first list using the given mode.
- is_equal(list2)[source]¶
- Parameters
list2 (
Gst.TagList
) – aGst.TagList
.- Returns
- Return type
Checks if the two given taglists are equal.
- merge(list2, mode)[source]¶
- Parameters
list2 (
Gst.TagList
orNone
) – second list to mergemode (
Gst.TagMergeMode
) – the mode to use
- Returns
the new list
- Return type
Gst.TagList
orNone
Merges the two given lists into a new list. If one of the lists is
None
, a copy of the other is returned. If both lists areNone
,None
is returned.Free-function: gst_tag_list_unref
- peek_string_index(tag, index)[source]¶
- Parameters
- Returns
True
, if a value was set,False
if the tag didn’t exist in the given list.- value
location for the result
- Return type
Peeks at the value that is at the given index for the given tag in the given list.
The resulting string in value will be in UTF-8 encoding and doesn’t need to be freed by the caller. The returned string is also guaranteed to be non-
None
and non-empty.
- remove_tag(tag)[source]¶
- Parameters
tag (
str
) – tag to remove
Removes the given tag from the taglist.
- set_scope(scope)[source]¶
- Parameters
scope (
Gst.TagScope
) – new scope for self
Sets the scope of self to scope. By default the scope of a taglist is stream scope.