Gst.TagList¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| mini_object | Gst.MiniObject | r/w | the parent type | 
Methods¶
| class | copy_value(list, tag) | 
| class | new_empty() | 
| class | new_from_string(str) | 
| add_value(mode, tag, value) | |
| copy() | |
| foreach(func, *user_data) | |
| get_boolean(tag) | |
| get_boolean_index(tag, index) | |
| get_date(tag) | |
| get_date_index(tag, index) | |
| get_date_time(tag) | |
| get_date_time_index(tag, index) | |
| get_double(tag) | |
| get_double_index(tag, index) | |
| get_float(tag) | |
| get_float_index(tag, index) | |
| get_int(tag) | |
| get_int64(tag) | |
| get_int64_index(tag, index) | |
| get_int_index(tag, index) | |
| get_pointer(tag) | |
| get_pointer_index(tag, index) | |
| get_sample(tag) | |
| get_sample_index(tag, index) | |
| get_scope() | |
| get_string(tag) | |
| get_string_index(tag, index) | |
| get_tag_size(tag) | |
| get_uint(tag) | |
| get_uint64(tag) | |
| get_uint64_index(tag, index) | |
| get_uint_index(tag, index) | |
| get_value_index(tag, index) | |
| insert(from_, mode) | |
| is_empty() | |
| is_equal(list2) | |
| merge(list2, mode) | |
| n_tags() | |
| nth_tag_name(index) | |
| peek_string_index(tag, index) | |
| remove_tag(tag) | |
| set_scope(scope) | |
| to_string() | 
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 from
- tag (str) – tag to read out
 - Returns: - True, if a value was copied,- Falseif the tag didn’t exist in the given list.- dest: - uninitialized - GObject.Valueto 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.
- list (
 - 
classmethod new_empty()[source]¶
- Returns: - An empty tag list - Return type: - Gst.TagList- Creates a new empty - Gst.TagList.- Free-function: gst_tag_list_unref 
 - 
classmethod new_from_string(str)[source]¶
- Parameters: - str ( - str) – a string created with- Gst.TagList.to_string()- Returns: - a new - Gst.TagList, or- Nonein case of an error.- Return type: - Gst.TagListor- None- Deserializes a tag list. 
 - 
add_value(mode, tag, value)[source]¶
- Parameters: - mode (Gst.TagMergeMode) – the mode to use
- tag (str) – tag
- value (GObject.Value) –GObject.Valuefor this tag
 - Sets the - GObject.Valuefor a given tag using the specified mode.
- mode (
 - 
copy()[source]¶
- Returns: - the new - Gst.TagList- Return type: - Gst.TagList- Creates a new - Gst.TagListas 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
- user_data (objectorNone) – user specified 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. 
- func (
 - 
get_boolean(tag)[source]¶
- Parameters: - tag ( - str) – tag to read out- Returns: - True, if a value was copied,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - 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. 
 - 
get_boolean_index(tag, index)[source]¶
- Parameters: - Returns: - True, if a value was copied,- Falseif 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,- Falseif the tag didn’t exist in the given list or if it was- None.- value: - address of a - GLib.Datepointer variable to store the result into- Return type: - ( - bool, value:- GLib.Date)- 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,- Falseif the tag didn’t exist in the given list or if it was- None.- 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,- Falseif the tag didn’t exist in the given list or if it was- None.- value: - address of a - Gst.DateTimepointer 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,- Falseif the tag didn’t exist in the given list or if it was- None.- 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,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - 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. 
 - 
get_double_index(tag, index)[source]¶
- Parameters: - Returns: - True, if a value was copied,- Falseif 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,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - 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. 
 - 
get_float_index(tag, index)[source]¶
- Parameters: - Returns: - True, if a value was copied,- Falseif 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,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - 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. 
 - 
get_int64(tag)[source]¶
- Parameters: - tag ( - str) – tag to read out- Returns: - True, if a value was copied,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - 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. 
 - 
get_int64_index(tag, index)[source]¶
- Parameters: - Returns: - True, if a value was copied,- Falseif 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,- Falseif 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,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - bool, value:- object)- 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,- Falseif 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,- Falseif the tag didn’t exist in the given list or if it was- None.- sample: - address of a - Gst.Samplepointer 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) with- Gst.Sample.get_caps().- Free-function: gst_sample_unref 
 - 
get_sample_index(tag, index)[source]¶
- Parameters: - Returns: - True, if a sample was copied,- Falseif the tag didn’t exist in the given list or if it was- None.- sample: - address of a - Gst.Samplepointer 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) with- Gst.Sample.get_caps().- Free-function: gst_sample_unref 
 - 
get_scope()[source]¶
- Returns: - The scope of self - Return type: - Gst.TagScope- Gets the scope of self. 
 - 
get_string(tag)[source]¶
- Parameters: - tag ( - str) – tag to read out- Returns: - True, if a value was copied,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - bool, value:- str)- 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.freewhen no longer needed. The returned string is also guaranteed to be non-- Noneand non-empty.- Free-function: - GLib.free
 - 
get_string_index(tag, index)[source]¶
- Parameters: - Returns: - True, if a value was copied,- Falseif 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.freewhen no longer needed. The returned string is also guaranteed to be non-- Noneand non-empty.- Free-function: - GLib.free
 - 
get_tag_size(tag)[source]¶
- Parameters: - tag ( - str) – the tag to query- Returns: - The number of tags stored - Return type: - int- Checks how many value are stored in this tag list for the given tag. 
 - 
get_uint(tag)[source]¶
- Parameters: - tag ( - str) – tag to read out- Returns: - True, if a value was copied,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - 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. 
 - 
get_uint64(tag)[source]¶
- Parameters: - tag ( - str) – tag to read out- Returns: - True, if a value was copied,- Falseif the tag didn’t exist in the given list.- value: - location for the result - Return type: - ( - 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. 
 - 
get_uint64_index(tag, index)[source]¶
- Parameters: - Returns: - True, if a value was copied,- Falseif 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,- Falseif 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.Valuefor the specified entry or- Noneif 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 from
- mode (Gst.TagMergeMode) – the mode to use
 - Inserts the tags of the from list into the first list using the given mode. 
- from (
 - 
is_empty()[source]¶
- Returns: - Trueif the taglist is empty, otherwise- False.- Return type: - bool- Checks if the given taglist is empty. 
 - 
is_equal(list2)[source]¶
- Parameters: - list2 ( - Gst.TagList) – a- Gst.TagList.- Returns: - Trueif the taglists are equal, otherwise- False- Return type: - bool- Checks if the two given taglists are equal. 
 - 
merge(list2, mode)[source]¶
- Parameters: - list2 (Gst.TagListorNone) – second list to merge
- mode (Gst.TagMergeMode) – the mode to use
 - Returns: - the new list - Return type: - Gst.TagListor- None- 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 are- None,- Noneis returned.- Free-function: gst_tag_list_unref 
- list2 (
 - Returns: - The number of tags in self. - Return type: - int- Get the number of tags in self. 
 - 
nth_tag_name(index)[source]¶
- Parameters: - index ( - int) – the index- Returns: - The name of the tag at index. - Return type: - str- Get the name of the tag in self at index. 
 - 
peek_string_index(tag, index)[source]¶
- Parameters: - Returns: - True, if a value was set,- Falseif 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- - Noneand 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. 
 
- 
classmethod