Gst.Structure¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| name | int | r | |
| type | GObject.GType | r/w | the GObject.GTypeof a structure | 
Methods¶
| class | from_string(string) | 
| class | new_empty(name) | 
| class | new_from_string(string) | 
| class | new_id_empty(quark) | 
| class | take(oldstr_ptr, newstr) | 
| can_intersect(struct2) | |
| copy() | |
| filter_and_map_in_place(func, *user_data) | |
| fixate() | |
| fixate_field(field_name) | |
| fixate_field_boolean(field_name, target) | |
| fixate_field_nearest_double(field_name, target) | |
| fixate_field_nearest_fraction(field_name, target_numerator, target_denominator) | |
| fixate_field_nearest_int(field_name, target) | |
| fixate_field_string(field_name, target) | |
| foreach(func, *user_data) | |
| free() | |
| get_array(fieldname) | |
| get_boolean(fieldname) | |
| get_clock_time(fieldname) | |
| get_date(fieldname) | |
| get_date_time(fieldname) | |
| get_double(fieldname) | |
| get_enum(fieldname, enumtype) | |
| get_field_type(fieldname) | |
| get_flagset(fieldname) | |
| get_fraction(fieldname) | |
| get_int(fieldname) | |
| get_int64(fieldname) | |
| get_list(fieldname) | |
| get_name() | |
| get_name_id() | |
| get_string(fieldname) | |
| get_uint(fieldname) | |
| get_uint64(fieldname) | |
| get_value(fieldname) | |
| has_field(fieldname) | |
| has_field_typed(fieldname, type) | |
| has_name(name) | |
| id_get_value(field) | |
| id_has_field(field) | |
| id_has_field_typed(field, type) | |
| id_set_value(field, value) | |
| id_take_value(field, value) | |
| intersect(struct2) | |
| is_equal(structure2) | |
| is_subset(superset) | |
| map_in_place(func, *user_data) | |
| n_fields() | |
| nth_field_name(index) | |
| remove_all_fields() | |
| remove_field(fieldname) | |
| set_array(fieldname, array) | |
| set_list(fieldname, array) | |
| set_name(name) | |
| set_parent_refcount(refcount) | |
| set_value(fieldname, value) | |
| take_value(fieldname, value) | |
| to_string() | 
Details¶
- 
class Gst.Structure¶
- A - Gst.Structureis a collection of key/value pairs. The keys are expressed as GQuarks and the values can be of any- GObject.GType.- In addition to the key/value pairs, a - Gst.Structurealso has a name. The name starts with a letter and can be filled by letters, numbers and any of “/-_.:”.- Gst.Structureis used by various GStreamer subsystems to store information in a flexible and extensible way. A- Gst.Structuredoes not have a refcount because it usually is part of a higher level object such as- Gst.Caps,- Gst.Message,- Gst.Event,- Gst.Query. It provides a means to enforce mutability using the refcount of the parent with the- Gst.Structure.set_parent_refcount() method.- A - Gst.Structurecan 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 - Nonehowever.- The serialization format
 - Gst.Structureserialization format serialize the- Gst.Structurename, keys/- GObject.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)valuesyntax, 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- gchararrayis the actual- GObject.GTypename 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. - 1is an- intwhile- 1.0is 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 curly brackets ({and}). For examplea-structure, array={1, 2, 3}
- Ranges are inside brackets ([and]). For examplea-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 “less and greater than” (<and>). For example `a-structure, list=<1, 2, 3>
 - Structures are delimited either by a null character - \0or a semicolumn- ;the latter allowing to store multiple structures in the same string (see- Gst.Caps).- 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” `` - > *Note*: Be aware that the current - Gst.Caps/- Gst.Structureserialization > into string has limited support for nested- Gst.Caps/- Gst.Structurefields. > It can only support one level of nesting. Using more levels will lead to > unexpected behavior when using serialization features, such as >- Gst.Caps.to_string() or- Gst.value_serialize() and their counterparts.- 
classmethod from_string(string)[source]¶
- Parameters: - string ( - str) – a string representation of a- Gst.Structure.- Returns: - a new - Gst.Structureor- Nonewhen the string could not be parsed. Free with- Gst.Structure.free() after use.- end: - pointer to store the end of the string in. - Return type: - ( - Gst.Structureor- None, end:- str)- Creates a - Gst.Structurefrom a string representation. If end is not- None, a pointer to the place inside the given string where parsing ended will be returned.- Free-function: - Gst.Structure.free
 - 
classmethod new_empty(name)[source]¶
- Parameters: - name ( - str) – name of new structure- Returns: - a new, empty - Gst.Structure- Return type: - Gst.Structure- Creates a new, empty - Gst.Structurewith the given name.- See - Gst.Structure.set_name() for constraints on the name parameter.- Free-function: - Gst.Structure.free
 - 
classmethod new_from_string(string)[source]¶
- Parameters: - string ( - str) – a string representation of a- Gst.Structure- Returns: - a new - Gst.Structureor- Nonewhen the string could not be parsed. Free with- Gst.Structure.free() after use.- Return type: - Gst.Structureor- None- Creates a - Gst.Structurefrom a string representation. If end is not- None, 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 - Gst.Caps/- Gst.Structuredeeper than one level.- Free-function: - Gst.Structure.free- New in version 1.2. 
 - 
classmethod new_id_empty(quark)[source]¶
- Parameters: - quark ( - int) – name of new structure- Returns: - a new, empty - Gst.Structure- Return type: - Gst.Structure- Creates a new, empty - Gst.Structurewith the given name as a GQuark.- Free-function: - Gst.Structure.free
 - 
classmethod take(oldstr_ptr, newstr)[source]¶
- Parameters: - oldstr_ptr (Gst.StructureorNone) – pointer to a place of aGst.Structureto take
- newstr (Gst.StructureorNone) – a newGst.Structure
 - Returns: - Trueif newstr was different from oldstr_ptr- oldstr_ptr: - pointer to a place of a - Gst.Structureto take- Return type: - ( - bool, oldstr_ptr:- Gst.Structureor- None)- Atomically modifies a pointer to point to a new structure. The - Gst.Structureoldstr_ptr is pointing to is freed and newstr is taken ownership over.- Either newstr and the value pointed to by oldstr_ptr may be - None.- It is a programming error if both newstr and the value pointed to by oldstr_ptr refer to the same, non- - Nonestructure.- New in version 1.18. 
- oldstr_ptr (
 - 
can_intersect(struct2)[source]¶
- Parameters: - struct2 ( - Gst.Structure) – a- Gst.Structure- Returns: - Trueif intersection would not be empty- Return type: - bool- Tries intersecting self and struct2 and reports whether the result would not be empty. 
 - 
copy()[source]¶
- Returns: - a new - Gst.Structure.- Return type: - Gst.Structure- Duplicates a - Gst.Structureand all its fields and values.- Free-function: - Gst.Structure.free
 - 
filter_and_map_in_place(func, *user_data)[source]¶
- Parameters: - func (Gst.StructureFilterMapFunc) – a function to call for each field
- user_data (objectorNone) – private data
 - Calls the provided function once for each field in the - Gst.Structure. 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- Falseis returned from the function. The structure must be mutable.- New in version 1.6. 
- func (
 - 
fixate()[source]¶
- Fixate all values in self using - Gst.value_fixate(). self will be modified in-place and should be writable.
 - 
fixate_field(field_name)[source]¶
- Parameters: - field_name ( - str) – a field in self- Returns: - Trueif the structure field could be fixated- Return type: - bool- Fixates a - Gst.Structureby changing the given field with its fixated value.
 - 
fixate_field_boolean(field_name, target)[source]¶
- Parameters: - Returns: - Trueif the structure could be fixated- Return type: - Fixates a - Gst.Structureby changing the given field_name field to the given target boolean if that field is not fixed yet.
 - 
fixate_field_nearest_double(field_name, target)[source]¶
- Parameters: - Returns: - Trueif the structure could be fixated- Return type: - Fixates a - Gst.Structureby changing the given field to the nearest double to target that is a subset of the existing field.
 - 
fixate_field_nearest_fraction(field_name, target_numerator, target_denominator)[source]¶
- Parameters: - Returns: - Trueif the structure could be fixated- Return type: - Fixates a - Gst.Structureby changing the given field to the nearest fraction to target_numerator/target_denominator that is a subset of the existing field.
 - 
fixate_field_nearest_int(field_name, target)[source]¶
- Parameters: - Returns: - Trueif the structure could be fixated- Return type: - Fixates a - Gst.Structureby changing the given field to the nearest integer to target that is a subset of the existing field.
 - 
fixate_field_string(field_name, target)[source]¶
- Parameters: - Returns: - Trueif the structure could be fixated- Return type: - Fixates a - Gst.Structureby changing the given field_name field to the given target string if that field is not fixed yet.
 - 
foreach(func, *user_data)[source]¶
- Parameters: - func (Gst.StructureForeachFunc) – a function to call for each field
- user_data (objectorNone) – private data
 - Returns: - Trueif the supplied function returns- TrueFor each of the fields,- Falseotherwise.- Return type: - Calls the provided function once for each field in the - Gst.Structure. The function must not modify the fields. Also see- Gst.Structure.map_in_place() and- Gst.Structure.filter_and_map_in_place().
- func (
 - 
free()[source]¶
- Frees a - Gst.Structureand all its fields and values. The structure must not have a parent when this function is called.
 - 
get_array(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- array: - a pointer to a - GObject.ValueArray- Return type: - ( - bool, array:- GObject.ValueArray)- This is useful in language bindings where unknown - GObject.Valuetypes are not supported. This function will convert the %GST_TYPE_ARRAY into a newly allocated- GObject.ValueArrayand return it through array. Be aware that this is slower then getting the- GObject.Valuedirectly.- New in version 1.12. 
 - 
get_boolean(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to a - boolto set- Return type: - ( - bool, value:- bool)- 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. 
 - 
get_clock_time(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to a #GstClockTime to set - Return type: - ( - bool, value:- int)- 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. 
 - 
get_date(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to a - GLib.Dateto set- Return type: - ( - bool, value:- GLib.Date)- 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 - GLib.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).
 - 
get_date_time(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to a - Gst.DateTimeto set- Return type: - ( - bool, value:- Gst.DateTime)- 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.DateTime.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).
 - 
get_double(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to a - floatto set- Return type: - ( - bool, value:- float)- 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. 
 - 
get_enum(fieldname, enumtype)[source]¶
- Parameters: - fieldname (str) – the name of a field
- enumtype (GObject.GType) – the enum type of a field
 - Returns: - Trueif 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.- value: - a pointer to an int to set - Return type: - 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. 
- fieldname (
 - 
get_field_type(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of the field- Returns: - the - GObject.Valueof the field- Return type: - GObject.GType- Finds the field with the given name, and returns the type of the value it contains. If the field is not found, - GObject.TYPE_INVALIDis returned.
 - 
get_flagset(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif the values could be set correctly. If there was no field with fieldname or the existing field did not contain a- Gst.FlagSet, this function returns- False.- value_flags: - a pointer to a - intfor the flags field- value_mask: - a pointer to a - intfor the mask field- Return type: - ( - bool, value_flags:- int, value_mask:- int)- Read the - Gst.FlagSetflags and mask out of the structure into the provided pointers.- New in version 1.6. 
 - 
get_fraction(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif the values could be set correctly. If there was no field with fieldname or the existing field did not contain a- Gst.Fraction, this function returns- False.- value_numerator: - a pointer to an int to set - value_denominator: - a pointer to an int to set - Return type: - ( - bool, value_numerator:- int, value_denominator:- int)- Sets the integers pointed to by value_numerator and value_denominator corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type. 
 - 
get_int(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to an int to set - Return type: - ( - bool, value:- int)- 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. 
 - 
get_int64(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to a #gint64 to set - Return type: - ( - bool, value:- int)- 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. - New in version 1.4. 
 - 
get_list(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- array: - a pointer to a - GObject.ValueArray- Return type: - ( - bool, array:- GObject.ValueArray)- This is useful in language bindings where unknown - GObject.Valuetypes are not supported. This function will convert the %GST_TYPE_LIST into a newly allocated- GObject.ValueArrayand return it through array. Be aware that this is slower then getting the- GObject.Valuedirectly.- New in version 1.12. 
 - 
get_name()[source]¶
- Returns: - the name of the structure. - Return type: - str- Get the name of self as a string. 
 - 
get_name_id()[source]¶
- Returns: - the quark representing the name of the structure. - Return type: - int- Get the name of self as a GQuark. 
 - 
get_string(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - a pointer to the string or - Nonewhen the field did not exist or did not contain a string.- Return type: - stror- None- 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. 
 - 
get_uint(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to a uint to set - Return type: - ( - bool, value:- int)- 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. 
 - 
get_uint64(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif 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.- value: - a pointer to a #guint64 to set - Return type: - ( - bool, value:- int)- 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. - New in version 1.4. 
 - 
get_value(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of the field to get- Returns: - the - GObject.Valuecorresponding to the field with the given name.- Return type: - GObject.Valueor- None- Get the value of the field with name fieldname. 
 - 
has_field(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of a field- Returns: - Trueif the structure contains a field with the given name- Return type: - bool- Check if self contains a field named fieldname. 
 - 
has_field_typed(fieldname, type)[source]¶
- Parameters: - fieldname (str) – the name of a field
- type (GObject.GType) – the type of a value
 - Returns: - Trueif the structure contains a field with the given name and type- Return type: - Check if self contains a field named fieldname and with - GObject.GTypetype.
- fieldname (
 - 
has_name(name)[source]¶
- Parameters: - name ( - str) – structure name to check for- Returns: - Trueif name matches the name of the structure.- Return type: - bool- Checks if the structure has the given name 
 - 
id_get_value(field)[source]¶
- Parameters: - field ( - int) – the #GQuark of the field to get- Returns: - the - GObject.Valuecorresponding to the field with the given name identifier.- Return type: - GObject.Valueor- None- Get the value of the field with GQuark field. 
 - 
id_has_field(field)[source]¶
- Parameters: - field ( - int) – #GQuark of the field name- Returns: - Trueif the structure contains a field with the given name- Return type: - bool- Check if self contains a field named field. 
 - 
id_has_field_typed(field, type)[source]¶
- Parameters: - field (int) – #GQuark of the field name
- type (GObject.GType) – the type of a value
 - Returns: - Trueif the structure contains a field with the given name and type- Return type: - Check if self contains a field named field and with - GObject.GTypetype.
- field (
 - 
id_set_value(field, value)[source]¶
- Parameters: - field (int) – a #GQuark representing a field
- value (GObject.Value) – the new value of the field
 - 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. 
- field (
 - 
id_take_value(field, value)[source]¶
- Parameters: - field (int) – a #GQuark representing a field
- value (GObject.Value) – the new value of the field
 - 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. 
- field (
 - 
intersect(struct2)[source]¶
- Parameters: - struct2 ( - Gst.Structure) – a- Gst.Structure- Returns: - Intersection of self and struct2 - Return type: - Gst.Structureor- None- Intersects self and struct2 and returns the intersection. 
 - 
is_equal(structure2)[source]¶
- Parameters: - structure2 ( - Gst.Structure) – a- Gst.Structure.- Returns: - Trueif the two structures have the same name and field.- Return type: - bool- Tests if the two - Gst.Structureare equal.
 - 
is_subset(superset)[source]¶
- Parameters: - superset ( - Gst.Structure) – a potentially greater- Gst.Structure- Returns: - Trueif self is a subset of superset- Return type: - bool- Checks if self is a subset of superset, i.e. has the same structure name and for all fields that are existing in superset, self has a value that is a subset of the value in superset. 
 - 
map_in_place(func, *user_data)[source]¶
- Parameters: - func (Gst.StructureMapFunc) – a function to call for each field
- user_data (objectorNone) – private data
 - Returns: - Trueif the supplied function returns- TrueFor each of the fields,- Falseotherwise.- Return type: - Calls the provided function once for each field in the - Gst.Structure. In contrast to- Gst.Structure.foreach(), the function may modify but not delete the fields. The structure must be mutable.
- func (
 - 
n_fields()[source]¶
- Returns: - the number of fields in the structure - Return type: - int- Get the number of fields in the structure. 
 - 
nth_field_name(index)[source]¶
- Parameters: - index ( - int) – the index to get the name of- Returns: - the name of the given field number - Return type: - str- Get the name of the given field number, counting from 0 onwards. 
 - 
remove_all_fields()[source]¶
- Removes all fields in a - Gst.Structure.
 - 
remove_field(fieldname)[source]¶
- Parameters: - fieldname ( - str) – the name of the field to remove- Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged. 
 - 
set_array(fieldname, array)[source]¶
- Parameters: - fieldname (str) – the name of a field
- array (GObject.ValueArray) – a pointer to aGObject.ValueArray
 - This is useful in language bindings where unknown - GObject.Valuetypes 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- GObject.Valuedirectly.- New in version 1.12. 
- fieldname (
 - 
set_list(fieldname, array)[source]¶
- Parameters: - fieldname (str) – the name of a field
- array (GObject.ValueArray) – a pointer to aGObject.ValueArray
 - This is useful in language bindings where unknown - GObject.Valuetypes 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- GObject.Valuedirectly.- New in version 1.12. 
- fieldname (
 - 
set_name(name)[source]¶
- Parameters: - name ( - str) – the new name of the structure- 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 “/-_.:”. 
 - 
set_parent_refcount(refcount)[source]¶
- Parameters: - refcount ( - int) – a pointer to the parent’s refcount- Returns: - Trueif the parent refcount could be set.- Return type: - bool- Sets the parent_refcount field of - Gst.Structure. 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- Gst.Structure, as described in the MT Refcounting section of the design documents.
 - 
set_value(fieldname, value)[source]¶
- Parameters: - fieldname (str) – the name of the field to set
- value (GObject.Value) – the new value of the field
 - 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 (
 - 
take_value(fieldname, value)[source]¶
- Parameters: - fieldname (str) – the name of the field to set
- value (GObject.Value) – the new value of the field
 - 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 (
 - 
to_string()[source]¶
- Returns: - a pointer to string allocated by - GLib.malloc().- GLib.free() after usage.- Return type: - str- Converts self to a human-readable string representation. - For debugging purposes its easier to do something like this: - GST_LOG ("structure is %" GST_PTR_FORMAT, structure);- This prints the structure in human readable form. - The current implementation of serialization will lead to unexpected results when there are nested - Gst.Caps/- Gst.Structuredeeper than one level.- Free-function: - GLib.free