GstStructure
A GstStructure is a collection of key/value pairs. The keys are expressed as GQuarks and the values can be of any GType.
In addition to the key/value pairs, a GstStructure also has a name. The name starts with a letter and can be filled by letters, numbers and any of "/-_.:".
GstStructure is used by various GStreamer subsystems to store information in a flexible and extensible way. A GstStructure does not have a refcount because it usually is part of a higher level object such as GstCaps, GstMessage, GstEvent, GstQuery. It provides a means to enforce mutability using the refcount of the parent with the gst_structure_set_parent_refcount method.
A GstStructure can 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 NULL however.
The serialization format
GstStructure serialization format serialize the GstStructure name,
keys/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)value
syntax, 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 gchararray
is the actual
GType name 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. 1
is an int
while 1.0
is 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 "less and greater than" (
<
and>
). For example `a-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 curly brackets (
{
and}
). For examplea-structure, list={1, 2, 3}
Structures are delimited either by a null character \0
or a semicolon ;
the latter allowing to store multiple structures in the same string (see
GstCaps).
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"
Since 1.20, nested structures and caps can be specified using brackets ([
and ]
), for example:
a-struct, nested=[nested-struct, nested=true]
*note*: gst_structure_to_string won't use that syntax for backward compatibility reason, gst_structure_serialize_full has been added for that purpose.
GstStructure
The GstStructure object. Most fields are private.
Members
type
(GType)
–
the GType of a structure
Gst.Structure
The GstStructure object. Most fields are private.
Members
type
(GObject.Type)
–
the GType of a structure
Gst.Structure
The GstStructure object. Most fields are private.
Members
type
(GObject.Type)
–
the GType of a structure
Constructors
gst_structure_from_string
GstStructure * gst_structure_from_string (const gchar * string, gchar ** end)
Creates a GstStructure from a string representation. If end is not NULL, a pointer to the place inside the given string where parsing ended will be returned.
Free-function: gst_structure_free
Parameters:
string
–
a string representation of a GstStructure.
end
(
[out][optional][transfer: none])
–
pointer to store the end of the string in.
a new GstStructure or NULL when the string could not be parsed. Free with gst_structure_free after use.
Gst.Structure.prototype.from_string
function Gst.Structure.prototype.from_string(string: String): {
// javascript wrapper for 'gst_structure_from_string'
}
Creates a Gst.Structure from a string representation. If end is not null, a pointer to the place inside the given string where parsing ended will be returned.
Free-function: gst_structure_free
Parameters:
a string representation of a Gst.Structure.
Returns a tuple made of:
a new Gst.Structure or null when the string could not be parsed. Free with Gst.Structure.prototype.free after use.
a new Gst.Structure or null when the string could not be parsed. Free with Gst.Structure.prototype.free after use.
Gst.Structure.from_string
def Gst.Structure.from_string (string):
#python wrapper for 'gst_structure_from_string'
Creates a Gst.Structure from 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
Parameters:
a string representation of a Gst.Structure.
Returns a tuple made of:
a new Gst.Structure or None when the string could not be parsed. Free with Gst.Structure.free after use.
a new Gst.Structure or None when the string could not be parsed. Free with Gst.Structure.free after use.
gst_structure_new
GstStructure * gst_structure_new (const gchar * name, const gchar * firstfield, ... ...)
Creates a new GstStructure with the given name. Parses the list of variable arguments and sets fields to the values listed. Variable arguments should be passed as field name, field type, and value. Last variable argument should be NULL.
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
firstfield
–
name of first field to set
...
–
additional arguments
a new GstStructure
gst_structure_new_empty
GstStructure * gst_structure_new_empty (const gchar * name)
Creates a new, empty GstStructure with the given name.
See gst_structure_set_name for constraints on the name parameter.
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
a new, empty GstStructure
Gst.Structure.prototype.new_empty
function Gst.Structure.prototype.new_empty(name: String): {
// javascript wrapper for 'gst_structure_new_empty'
}
Creates a new, empty Gst.Structure with the given name.
See Gst.Structure.prototype.set_name for constraints on the name parameter.
Free-function: gst_structure_free
Parameters:
name of new structure
a new, empty Gst.Structure
Gst.Structure.new_empty
def Gst.Structure.new_empty (name):
#python wrapper for 'gst_structure_new_empty'
Creates a new, empty Gst.Structure with the given name.
See Gst.Structure.set_name for constraints on the name parameter.
Free-function: gst_structure_free
Parameters:
name of new structure
a new, empty Gst.Structure
gst_structure_new_from_string
GstStructure * gst_structure_new_from_string (const gchar * string)
Creates a GstStructure from a string representation. If end is not NULL, 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 GstCaps / GstStructure deeper than one level unless the gst_structure_serialize function is used (without GST_SERIALIZE_FLAG_BACKWARD_COMPAT)
Free-function: gst_structure_free
Parameters:
string
–
a string representation of a GstStructure
a new GstStructure or NULL when the string could not be parsed. Free with gst_structure_free after use.
Since : 1.2
Gst.Structure.prototype.new_from_string
function Gst.Structure.prototype.new_from_string(string: String): {
// javascript wrapper for 'gst_structure_new_from_string'
}
Creates a Gst.Structure from a string representation. If end is not null, 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.Structure deeper than one level unless the Gst.Structure.prototype.serialize function is used (without Gst.SerializeFlags.BACKWARD_COMPAT)
Free-function: gst_structure_free
Parameters:
a string representation of a Gst.Structure
a new Gst.Structure or null when the string could not be parsed. Free with Gst.Structure.prototype.free after use.
Since : 1.2
Gst.Structure.new_from_string
def Gst.Structure.new_from_string (string):
#python wrapper for 'gst_structure_new_from_string'
Creates a Gst.Structure from 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.Structure deeper than one level unless the Gst.Structure.serialize function is used (without Gst.SerializeFlags.BACKWARD_COMPAT)
Free-function: gst_structure_free
Parameters:
a string representation of a Gst.Structure
a new Gst.Structure or None when the string could not be parsed. Free with Gst.Structure.free after use.
Since : 1.2
gst_structure_new_id
GstStructure * gst_structure_new_id (GQuark name_quark, GQuark field_quark, ... ...)
Creates a new GstStructure with the given name as a GQuark, followed by fieldname quark, GType, argument(s) "triplets" in the same format as gst_structure_id_set. Basically a convenience wrapper around gst_structure_new_id_empty and gst_structure_id_set.
The last variable argument must be NULL (or 0).
Free-function: gst_structure_free
Parameters:
name_quark
–
name of new structure
field_quark
–
the GQuark for the name of the field to set
...
–
variable arguments
a new GstStructure
deprecated : 1.26: Use gst_structure_new_id_str().
gst_structure_new_id_empty
GstStructure * gst_structure_new_id_empty (GQuark quark)
Creates a new, empty GstStructure with the given name as a GQuark.
Free-function: gst_structure_free
Parameters:
quark
–
name of new structure
a new, empty GstStructure
deprecated : 1.26: Use gst_structure_new_id_str_empty().
Gst.Structure.prototype.new_id_empty
function Gst.Structure.prototype.new_id_empty(quark: GLib.Quark): {
// javascript wrapper for 'gst_structure_new_id_empty'
}
Creates a new, empty Gst.Structure with the given name as a GQuark.
Free-function: gst_structure_free
Parameters:
name of new structure
a new, empty Gst.Structure
deprecated : 1.26: Use gst_structure_new_id_str_empty().
Gst.Structure.new_id_empty
def Gst.Structure.new_id_empty (quark):
#python wrapper for 'gst_structure_new_id_empty'
Creates a new, empty Gst.Structure with the given name as a GQuark.
Free-function: gst_structure_free
Parameters:
name of new structure
a new, empty Gst.Structure
deprecated : 1.26: Use gst_structure_new_id_str_empty().
gst_structure_new_id_str
GstStructure * gst_structure_new_id_str (const GstIdStr * name, const GstIdStr * fieldname, ... ...)
Creates a new GstStructure with the given name as a GQuark, followed by fieldname GstIdStr, GType, argument(s) "triplets" in the same format as gst_structure_id_str_set. Basically a convenience wrapper around gst_structure_new_id_str_empty and gst_structure_id_str_set.
The last variable argument must be NULL (or 0).
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
fieldname
–
the GstIdStr for the name of the field to set
...
–
variable arguments
a new GstStructure
Since : 1.26
gst_structure_new_id_str_empty
GstStructure * gst_structure_new_id_str_empty (const GstIdStr * name)
Creates a new, empty GstStructure with the given name.
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
a new, empty GstStructure
Since : 1.26
Gst.Structure.prototype.new_id_str_empty
function Gst.Structure.prototype.new_id_str_empty(name: Gst.IdStr): {
// javascript wrapper for 'gst_structure_new_id_str_empty'
}
Creates a new, empty Gst.Structure with the given name.
Free-function: gst_structure_free
Parameters:
name of new structure
a new, empty Gst.Structure
Since : 1.26
Gst.Structure.new_id_str_empty
def Gst.Structure.new_id_str_empty (name):
#python wrapper for 'gst_structure_new_id_str_empty'
Creates a new, empty Gst.Structure with the given name.
Free-function: gst_structure_free
Parameters:
name of new structure
a new, empty Gst.Structure
Since : 1.26
gst_structure_new_id_str_valist
GstStructure * gst_structure_new_id_str_valist (const GstIdStr * name, const GstIdStr * firstfield, va_list varargs)
Creates a new GstStructure with the given name. Structure fields are set according to the varargs in a manner similar to gst_structure_new_id_str.
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
firstfield
–
name of first field to set
varargs
–
variable argument list
a new GstStructure
Since : 1.26
gst_structure_new_static_str
GstStructure * gst_structure_new_static_str (const gchar * name, const gchar * firstfield, ... ...)
Creates a new GstStructure with the given name. Parses the list of variable arguments and sets fields to the values listed. Variable arguments should be passed as field name, field type, and value. Last variable argument should be NULL.
name, firstfield and all field names need to be valid for the remaining lifetime of the process, e.g. have to be a static string.
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
firstfield
–
name of first field to set
...
–
additional arguments
a new GstStructure
Since : 1.26
gst_structure_new_static_str_empty
GstStructure * gst_structure_new_static_str_empty (const gchar * name)
Creates a new, empty GstStructure with the given name.
See gst_structure_set_name for constraints on the name parameter.
name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
a new, empty GstStructure
Since : 1.26
Gst.Structure.prototype.new_static_str_empty
function Gst.Structure.prototype.new_static_str_empty(name: String): {
// javascript wrapper for 'gst_structure_new_static_str_empty'
}
Creates a new, empty Gst.Structure with the given name.
See Gst.Structure.prototype.set_name for constraints on the name parameter.
name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Free-function: gst_structure_free
Parameters:
name of new structure
a new, empty Gst.Structure
Since : 1.26
Gst.Structure.new_static_str_empty
def Gst.Structure.new_static_str_empty (name):
#python wrapper for 'gst_structure_new_static_str_empty'
Creates a new, empty Gst.Structure with the given name.
See Gst.Structure.set_name for constraints on the name parameter.
name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Free-function: gst_structure_free
Parameters:
name of new structure
a new, empty Gst.Structure
Since : 1.26
gst_structure_new_static_str_valist
GstStructure * gst_structure_new_static_str_valist (const gchar * name, const gchar * firstfield, va_list varargs)
Creates a new GstStructure with the given name. Structure fields are set according to the varargs in a manner similar to gst_structure_new.
See gst_structure_set_name for constraints on the name parameter.
name, firstfield and all field names need to be valid for the remaining lifetime of the process, e.g. have to be a static string.
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
firstfield
–
name of first field to set
varargs
–
variable argument list
a new GstStructure
Since : 1.26
gst_structure_new_valist
GstStructure * gst_structure_new_valist (const gchar * name, const gchar * firstfield, va_list varargs)
Creates a new GstStructure with the given name. Structure fields are set according to the varargs in a manner similar to gst_structure_new.
See gst_structure_set_name for constraints on the name parameter.
Free-function: gst_structure_free
Parameters:
name
–
name of new structure
firstfield
–
name of first field to set
varargs
–
variable argument list
a new GstStructure
Methods
gst_structure_can_intersect
gboolean gst_structure_can_intersect (const GstStructure * struct1, const GstStructure * struct2)
Tries intersecting struct1 and struct2 and reports whether the result would not be empty.
TRUE if intersection would not be empty
Gst.Structure.prototype.can_intersect
function Gst.Structure.prototype.can_intersect(struct2: Gst.Structure): {
// javascript wrapper for 'gst_structure_can_intersect'
}
Tries intersecting struct1 and struct2 and reports whether the result would not be empty.
Gst.Structure.can_intersect
def Gst.Structure.can_intersect (self, struct2):
#python wrapper for 'gst_structure_can_intersect'
Tries intersecting struct1 and struct2 and reports whether the result would not be empty.
gst_structure_copy
GstStructure * gst_structure_copy (const GstStructure * structure)
Duplicates a GstStructure and all its fields and values.
Free-function: gst_structure_free
Parameters:
structure
–
a GstStructure to duplicate
a new GstStructure.
Gst.Structure.prototype.copy
function Gst.Structure.prototype.copy(): {
// javascript wrapper for 'gst_structure_copy'
}
Duplicates a Gst.Structure and all its fields and values.
Free-function: gst_structure_free
Parameters:
a Gst.Structure to duplicate
a new Gst.Structure.
Gst.Structure.copy
def Gst.Structure.copy (self):
#python wrapper for 'gst_structure_copy'
Duplicates a Gst.Structure and all its fields and values.
Free-function: gst_structure_free
Parameters:
a Gst.Structure to duplicate
a new Gst.Structure.
gst_structure_filter_and_map_in_place
gst_structure_filter_and_map_in_place (GstStructure * structure, GstStructureFilterMapFunc func, gpointer user_data)
Calls the provided function once for each field in the GstStructure. 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 FALSE is returned from the function. The structure must be mutable.
Parameters:
structure
–
func
(
[scope call][closure])
–
a function to call for each field
user_data
–
private data
Since : 1.6
deprecated : 1.26: Use gst_structure_filter_and_map_in_place_id_str().
Gst.Structure.prototype.filter_and_map_in_place
function Gst.Structure.prototype.filter_and_map_in_place(func: Gst.StructureFilterMapFunc, user_data: Object): {
// javascript wrapper for 'gst_structure_filter_and_map_in_place'
}
Calls the provided function once for each field in the Gst.Structure. In contrast to Gst.Structure.prototype.foreach, the function may modify the fields. In contrast to Gst.Structure.prototype.map_in_place, the field is removed from the structure if false is returned from the function. The structure must be mutable.
Parameters:
a function to call for each field
private data
Since : 1.6
deprecated : 1.26: Use gst_structure_filter_and_map_in_place_id_str().
Gst.Structure.filter_and_map_in_place
def Gst.Structure.filter_and_map_in_place (self, func, *user_data):
#python wrapper for 'gst_structure_filter_and_map_in_place'
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 False is returned from the function. The structure must be mutable.
Parameters:
a function to call for each field
private data
Since : 1.6
deprecated : 1.26: Use gst_structure_filter_and_map_in_place_id_str().
gst_structure_filter_and_map_in_place_id_str
gst_structure_filter_and_map_in_place_id_str (GstStructure * structure, GstStructureFilterMapIdStrFunc func, gpointer user_data)
Calls the provided function once for each field in the GstStructure. In contrast to gst_structure_foreach_id_str, the function may modify the fields. In contrast to gst_structure_map_in_place_id_str, the field is removed from the structure if FALSE is returned from the function. The structure must be mutable.
Parameters:
structure
–
func
(
[scope call][closure])
–
a function to call for each field
user_data
–
private data
Since : 1.26
Gst.Structure.prototype.filter_and_map_in_place_id_str
function Gst.Structure.prototype.filter_and_map_in_place_id_str(func: Gst.StructureFilterMapIdStrFunc, user_data: Object): {
// javascript wrapper for 'gst_structure_filter_and_map_in_place_id_str'
}
Calls the provided function once for each field in the Gst.Structure. In contrast to Gst.Structure.prototype.foreach_id_str, the function may modify the fields. In contrast to Gst.Structure.prototype.map_in_place_id_str, the field is removed from the structure if false is returned from the function. The structure must be mutable.
Parameters:
a function to call for each field
private data
Since : 1.26
Gst.Structure.filter_and_map_in_place_id_str
def Gst.Structure.filter_and_map_in_place_id_str (self, func, *user_data):
#python wrapper for 'gst_structure_filter_and_map_in_place_id_str'
Calls the provided function once for each field in the Gst.Structure. In contrast to Gst.Structure.foreach_id_str, the function may modify the fields. In contrast to Gst.Structure.map_in_place_id_str, the field is removed from the structure if False is returned from the function. The structure must be mutable.
Parameters:
a function to call for each field
private data
Since : 1.26
gst_structure_fixate
gst_structure_fixate (GstStructure * structure)
Fixate all values in structure using gst_value_fixate. structure will be modified in-place and should be writable.
Parameters:
structure
–
Gst.Structure.prototype.fixate
function Gst.Structure.prototype.fixate(): {
// javascript wrapper for 'gst_structure_fixate'
}
Fixate all values in structure using Gst.prototype.value_fixate. structure will be modified in-place and should be writable.
Parameters:
Gst.Structure.fixate
def Gst.Structure.fixate (self):
#python wrapper for 'gst_structure_fixate'
Fixate all values in structure using Gst.value_fixate. structure will be modified in-place and should be writable.
Parameters:
gst_structure_fixate_field
gboolean gst_structure_fixate_field (GstStructure * structure, const char* field_name)
Fixates a GstStructure by changing the given field with its fixated value.
TRUE if the structure field could be fixated
Gst.Structure.prototype.fixate_field
function Gst.Structure.prototype.fixate_field(field_name: String): {
// javascript wrapper for 'gst_structure_fixate_field'
}
Fixates a Gst.Structure by changing the given field with its fixated value.
Gst.Structure.fixate_field
def Gst.Structure.fixate_field (self, field_name):
#python wrapper for 'gst_structure_fixate_field'
Fixates a Gst.Structure by changing the given field with its fixated value.
gst_structure_fixate_field_boolean
gboolean gst_structure_fixate_field_boolean (GstStructure * structure, const char* field_name, gboolean target)
Fixates a GstStructure by changing the given field_name field to the given target boolean if that field is not fixed yet.
Parameters:
structure
–
field_name
–
a field in structure
target
–
the target value of the fixation
TRUE if the structure could be fixated
Gst.Structure.prototype.fixate_field_boolean
function Gst.Structure.prototype.fixate_field_boolean(field_name: String, target: Number): {
// javascript wrapper for 'gst_structure_fixate_field_boolean'
}
Fixates a Gst.Structure by changing the given field_name field to the given target boolean if that field is not fixed yet.
Parameters:
a field in structure
the target value of the fixation
Gst.Structure.fixate_field_boolean
def Gst.Structure.fixate_field_boolean (self, field_name, target):
#python wrapper for 'gst_structure_fixate_field_boolean'
Fixates a Gst.Structure by changing the given field_name field to the given target boolean if that field is not fixed yet.
Parameters:
a field in structure
the target value of the fixation
gst_structure_fixate_field_nearest_double
gboolean gst_structure_fixate_field_nearest_double (GstStructure * structure, const char* field_name, double target)
Fixates a GstStructure by changing the given field to the nearest double to target that is a subset of the existing field.
Parameters:
structure
–
field_name
–
a field in structure
target
–
the target value of the fixation
TRUE if the structure could be fixated
Gst.Structure.prototype.fixate_field_nearest_double
function Gst.Structure.prototype.fixate_field_nearest_double(field_name: String, target: Number): {
// javascript wrapper for 'gst_structure_fixate_field_nearest_double'
}
Fixates a Gst.Structure by changing the given field to the nearest double to target that is a subset of the existing field.
Parameters:
a field in structure
the target value of the fixation
Gst.Structure.fixate_field_nearest_double
def Gst.Structure.fixate_field_nearest_double (self, field_name, target):
#python wrapper for 'gst_structure_fixate_field_nearest_double'
Fixates a Gst.Structure by changing the given field to the nearest double to target that is a subset of the existing field.
Parameters:
a field in structure
the target value of the fixation
gst_structure_fixate_field_nearest_fraction
gboolean gst_structure_fixate_field_nearest_fraction (GstStructure * structure, const char* field_name, const gint target_numerator, const gint target_denominator)
Fixates a GstStructure by changing the given field to the nearest fraction to target_numerator/@target_denominator that is a subset of the existing field.
Parameters:
structure
–
field_name
–
a field in structure
target_numerator
–
The numerator of the target value of the fixation
target_denominator
–
The denominator of the target value of the fixation
TRUE if the structure could be fixated
Gst.Structure.prototype.fixate_field_nearest_fraction
function Gst.Structure.prototype.fixate_field_nearest_fraction(field_name: String, target_numerator: Number, target_denominator: Number): {
// javascript wrapper for 'gst_structure_fixate_field_nearest_fraction'
}
Fixates a Gst.Structure by changing the given field to the nearest fraction to target_numerator/@target_denominator that is a subset of the existing field.
Parameters:
a field in structure
The numerator of the target value of the fixation
The denominator of the target value of the fixation
Gst.Structure.fixate_field_nearest_fraction
def Gst.Structure.fixate_field_nearest_fraction (self, field_name, target_numerator, target_denominator):
#python wrapper for 'gst_structure_fixate_field_nearest_fraction'
Fixates a Gst.Structure by changing the given field to the nearest fraction to target_numerator/@target_denominator that is a subset of the existing field.
Parameters:
a field in structure
The numerator of the target value of the fixation
The denominator of the target value of the fixation
gst_structure_fixate_field_nearest_int
gboolean gst_structure_fixate_field_nearest_int (GstStructure * structure, const char* field_name, int target)
Fixates a GstStructure by changing the given field to the nearest integer to target that is a subset of the existing field.
Parameters:
structure
–
field_name
–
a field in structure
target
–
the target value of the fixation
TRUE if the structure could be fixated
Gst.Structure.prototype.fixate_field_nearest_int
function Gst.Structure.prototype.fixate_field_nearest_int(field_name: String, target: Number): {
// javascript wrapper for 'gst_structure_fixate_field_nearest_int'
}
Fixates a Gst.Structure by changing the given field to the nearest integer to target that is a subset of the existing field.
Parameters:
a field in structure
the target value of the fixation
Gst.Structure.fixate_field_nearest_int
def Gst.Structure.fixate_field_nearest_int (self, field_name, target):
#python wrapper for 'gst_structure_fixate_field_nearest_int'
Fixates a Gst.Structure by changing the given field to the nearest integer to target that is a subset of the existing field.
Parameters:
a field in structure
the target value of the fixation
gst_structure_fixate_field_string
gboolean gst_structure_fixate_field_string (GstStructure * structure, const char* field_name, const gchar * target)
Fixates a GstStructure by changing the given field_name field to the given target string if that field is not fixed yet.
Parameters:
structure
–
field_name
–
a field in structure
target
–
the target value of the fixation
TRUE if the structure could be fixated
Gst.Structure.prototype.fixate_field_string
function Gst.Structure.prototype.fixate_field_string(field_name: String, target: String): {
// javascript wrapper for 'gst_structure_fixate_field_string'
}
Fixates a Gst.Structure by changing the given field_name field to the given target string if that field is not fixed yet.
Parameters:
a field in structure
the target value of the fixation
Gst.Structure.fixate_field_string
def Gst.Structure.fixate_field_string (self, field_name, target):
#python wrapper for 'gst_structure_fixate_field_string'
Fixates a Gst.Structure by changing the given field_name field to the given target string if that field is not fixed yet.
Parameters:
a field in structure
the target value of the fixation
gst_structure_foreach
gboolean gst_structure_foreach (const GstStructure * structure, GstStructureForeachFunc func, gpointer user_data)
Calls the provided function once for each field in the GstStructure. The function must not modify the fields. Also see gst_structure_map_in_place and gst_structure_filter_and_map_in_place.
Parameters:
structure
–
func
(
[scope call][closure])
–
a function to call for each field
user_data
–
private data
deprecated : 1.26: Use gst_structure_foreach_id_str().
Gst.Structure.prototype.foreach
function Gst.Structure.prototype.foreach(func: Gst.StructureForeachFunc, user_data: Object): {
// javascript wrapper for 'gst_structure_foreach'
}
Calls the provided function once for each field in the Gst.Structure. The function must not modify the fields. Also see Gst.Structure.prototype.map_in_place and Gst.Structure.prototype.filter_and_map_in_place.
Parameters:
a function to call for each field
private data
deprecated : 1.26: Use gst_structure_foreach_id_str().
Gst.Structure.foreach
def Gst.Structure.foreach (self, func, *user_data):
#python wrapper for 'gst_structure_foreach'
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.
Parameters:
a function to call for each field
private data
deprecated : 1.26: Use gst_structure_foreach_id_str().
gst_structure_foreach_id_str
gboolean gst_structure_foreach_id_str (const GstStructure * structure, GstStructureForeachIdStrFunc func, gpointer user_data)
Calls the provided function once for each field in the GstStructure. The function must not modify the fields. Also see gst_structure_map_in_place_id_str and gst_structure_filter_and_map_in_place_id_str.
Parameters:
structure
–
func
(
[scope call][closure])
–
a function to call for each field
user_data
–
private data
Since : 1.26
Gst.Structure.prototype.foreach_id_str
function Gst.Structure.prototype.foreach_id_str(func: Gst.StructureForeachIdStrFunc, user_data: Object): {
// javascript wrapper for 'gst_structure_foreach_id_str'
}
Calls the provided function once for each field in the Gst.Structure. The function must not modify the fields. Also see Gst.Structure.prototype.map_in_place_id_str and Gst.Structure.prototype.filter_and_map_in_place_id_str.
Parameters:
a function to call for each field
private data
Since : 1.26
Gst.Structure.foreach_id_str
def Gst.Structure.foreach_id_str (self, func, *user_data):
#python wrapper for 'gst_structure_foreach_id_str'
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_id_str and Gst.Structure.filter_and_map_in_place_id_str.
Parameters:
a function to call for each field
private data
Since : 1.26
gst_structure_free
gst_structure_free (GstStructure * structure)
Frees a GstStructure and all its fields and values. The structure must not have a parent when this function is called.
Parameters:
structure
(
[in][transfer: full])
–
the GstStructure to free
Gst.Structure.prototype.free
function Gst.Structure.prototype.free(): {
// javascript wrapper for 'gst_structure_free'
}
Frees a Gst.Structure and all its fields and values. The structure must not have a parent when this function is called.
Parameters:
the Gst.Structure to free
Gst.Structure.free
def Gst.Structure.free (self):
#python wrapper for 'gst_structure_free'
Frees a Gst.Structure and all its fields and values. The structure must not have a parent when this function is called.
Parameters:
the Gst.Structure to free
gst_structure_get
gboolean gst_structure_get (const GstStructure * structure, const char* first_fieldname, ... ...)
Parses the variable arguments and reads fields from structure accordingly. Variable arguments should be in the form field name, field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be NULL.
For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free or the suitable function for the boxed type.
Parameters:
structure
–
first_fieldname
–
the name of the first field to read
...
–
variable arguments
gst_structure_get_array
gboolean gst_structure_get_array (GstStructure * structure, const gchar * fieldname, GValueArray ** array)
This is useful in language bindings where unknown GValue types are not supported. This function will convert the GST_TYPE_ARRAY into a newly allocated GValueArray and return it through array. Be aware that this is slower then getting the GValue directly.
TRUE if 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.
Since : 1.12
Gst.Structure.prototype.get_array
function Gst.Structure.prototype.get_array(fieldname: String): {
// javascript wrapper for 'gst_structure_get_array'
}
This is useful in language bindings where unknown GObject.Value types are not supported. This function will convert the GST_TYPE_ARRAY (not introspectable) into a newly allocated GObject.ValueArray and return it through array. Be aware that this is slower then getting the GObject.Value directly.
Returns a tuple made of:
true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_ARRAY (not introspectable), this function returns false.
true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_ARRAY (not introspectable), this function returns false.
Since : 1.12
Gst.Structure.get_array
def Gst.Structure.get_array (self, fieldname):
#python wrapper for 'gst_structure_get_array'
This is useful in language bindings where unknown GObject.Value types are not supported. This function will convert the GST_TYPE_ARRAY (not introspectable) into a newly allocated GObject.ValueArray and return it through array. Be aware that this is slower then getting the GObject.Value directly.
Returns a tuple made of:
True if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_ARRAY (not introspectable), this function returns False.
True if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_ARRAY (not introspectable), this function returns False.
Since : 1.12
gst_structure_get_boolean
gboolean gst_structure_get_boolean (const GstStructure * structure, const gchar * fieldname, gboolean * value)
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.
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to a gboolean to set
Gst.Structure.prototype.get_boolean
function Gst.Structure.prototype.get_boolean(fieldname: String): {
// javascript wrapper for 'gst_structure_get_boolean'
}
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.
Returns a tuple made of:
Gst.Structure.get_boolean
def Gst.Structure.get_boolean (self, fieldname):
#python wrapper for 'gst_structure_get_boolean'
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.
Returns a tuple made of:
gst_structure_get_clock_time
gboolean gst_structure_get_clock_time (const GstStructure * structure, const gchar * fieldname, GstClockTime * value)
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.
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to a GstClockTime to set
TRUE if 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.
Gst.Structure.prototype.get_clock_time
function Gst.Structure.prototype.get_clock_time(fieldname: String): {
// javascript wrapper for 'gst_structure_get_clock_time'
}
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.
Returns a tuple made of:
Gst.Structure.get_clock_time
def Gst.Structure.get_clock_time (self, fieldname):
#python wrapper for 'gst_structure_get_clock_time'
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.
Returns a tuple made of:
gst_structure_get_date
gboolean gst_structure_get_date (const GstStructure * structure, const gchar * fieldname, GDate ** value)
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 g_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).
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to a GDate to set
Gst.Structure.prototype.get_date
function Gst.Structure.prototype.get_date(fieldname: String): {
// javascript wrapper for 'gst_structure_get_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.prototype.free when no longer needed (note: this is inconsistent with e.g. Gst.Structure.prototype.get_string which doesn't return a copy of the string).
Returns a tuple made of:
true if 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.
Gst.Structure.get_date
def Gst.Structure.get_date (self, fieldname):
#python wrapper for 'gst_structure_get_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).
Returns a tuple made of:
True if 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.
gst_structure_get_date_time
gboolean gst_structure_get_date_time (const GstStructure * structure, const gchar * fieldname, GstDateTime ** value)
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_date_time_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).
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to a GstDateTime to set
Gst.Structure.prototype.get_date_time
function Gst.Structure.prototype.get_date_time(fieldname: String): {
// javascript wrapper for 'gst_structure_get_date_time'
}
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.prototype.unref when no longer needed (note: this is inconsistent with e.g. Gst.Structure.prototype.get_string which doesn't return a copy of the string).
Returns a tuple made of:
true if 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.
Gst.Structure.get_date_time
def Gst.Structure.get_date_time (self, fieldname):
#python wrapper for 'gst_structure_get_date_time'
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).
Returns a tuple made of:
True if 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.
gst_structure_get_double
gboolean gst_structure_get_double (const GstStructure * structure, const gchar * fieldname, gdouble * value)
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.
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to a gdouble to set
Gst.Structure.prototype.get_double
function Gst.Structure.prototype.get_double(fieldname: String): {
// javascript wrapper for 'gst_structure_get_double'
}
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.
Returns a tuple made of:
Gst.Structure.get_double
def Gst.Structure.get_double (self, fieldname):
#python wrapper for 'gst_structure_get_double'
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.
Returns a tuple made of:
gst_structure_get_enum
gboolean gst_structure_get_enum (const GstStructure * structure, const gchar * fieldname, GType enumtype, gint * value)
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.
Parameters:
structure
–
fieldname
–
the name of a field
enumtype
–
the enum type of a field
value
(
[out])
–
a pointer to an int to set
Gst.Structure.prototype.get_enum
function Gst.Structure.prototype.get_enum(fieldname: String, enumtype: GObject.Type): {
// javascript wrapper for 'gst_structure_get_enum'
}
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.
Parameters:
the name of a field
the enum type of a field
Returns a tuple made of:
Gst.Structure.get_enum
def Gst.Structure.get_enum (self, fieldname, enumtype):
#python wrapper for 'gst_structure_get_enum'
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.
Parameters:
the name of a field
the enum type of a field
Returns a tuple made of:
gst_structure_get_field_type
GType gst_structure_get_field_type (const GstStructure * structure, const gchar * fieldname)
Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned.
the GValue of the field
Gst.Structure.prototype.get_field_type
function Gst.Structure.prototype.get_field_type(fieldname: String): {
// javascript wrapper for 'gst_structure_get_field_type'
}
Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned.
the GObject.Value of the field
Gst.Structure.get_field_type
def Gst.Structure.get_field_type (self, fieldname):
#python wrapper for 'gst_structure_get_field_type'
Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned.
the GObject.Value of the field
gst_structure_get_flags
gboolean gst_structure_get_flags (const GstStructure * structure, const gchar * fieldname, GType flags_type, guint * value)
Sets the unsigned 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 flagstype is correct.
Parameters:
structure
–
fieldname
–
the name of a field
flags_type
–
the flags type of a field
value
(
[out])
–
a pointer to an unsigned int to set
Since : 1.22
Gst.Structure.prototype.get_flags
function Gst.Structure.prototype.get_flags(fieldname: String, flags_type: GObject.Type): {
// javascript wrapper for 'gst_structure_get_flags'
}
Sets the unsigned 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 flagstype is correct.
Parameters:
the name of a field
the flags type of a field
Returns a tuple made of:
Since : 1.22
Gst.Structure.get_flags
def Gst.Structure.get_flags (self, fieldname, flags_type):
#python wrapper for 'gst_structure_get_flags'
Sets the unsigned 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 flagstype is correct.
Parameters:
the name of a field
the flags type of a field
Returns a tuple made of:
Since : 1.22
gst_structure_get_flagset
gboolean gst_structure_get_flagset (const GstStructure * structure, const gchar * fieldname, guint * value_flags, guint * value_mask)
Read the GstFlagSet flags and mask out of the structure into the provided pointers.
Parameters:
structure
–
fieldname
–
the name of a field
value_flags
(
[out][optional])
–
a pointer to a guint for the flags field
value_mask
(
[out][optional])
–
a pointer to a guint for the mask field
Since : 1.6
Gst.Structure.prototype.get_flagset
function Gst.Structure.prototype.get_flagset(fieldname: String): {
// javascript wrapper for 'gst_structure_get_flagset'
}
Read the GstFlagSet flags and mask out of the structure into the provided pointers.
Returns a tuple made of:
true if the values could be set correctly. If there was no field with fieldname or the existing field did not contain a GstFlagSet, this function returns false.
Since : 1.6
Gst.Structure.get_flagset
def Gst.Structure.get_flagset (self, fieldname):
#python wrapper for 'gst_structure_get_flagset'
Read the GstFlagSet flags and mask out of the structure into the provided pointers.
Returns a tuple made of:
True if the values could be set correctly. If there was no field with fieldname or the existing field did not contain a GstFlagSet, this function returns False.
Since : 1.6
gst_structure_get_fraction
gboolean gst_structure_get_fraction (const GstStructure * structure, const gchar * fieldname, gint * value_numerator, gint * value_denominator)
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.
Parameters:
structure
–
fieldname
–
the name of a field
value_numerator
(
[out])
–
a pointer to an int to set
value_denominator
(
[out])
–
a pointer to an int to set
Gst.Structure.prototype.get_fraction
function Gst.Structure.prototype.get_fraction(fieldname: String): {
// javascript wrapper for 'gst_structure_get_fraction'
}
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.
Returns a tuple made of:
true if the values could be set correctly. If there was no field with fieldname or the existing field did not contain a GstFraction, this function returns false.
Gst.Structure.get_fraction
def Gst.Structure.get_fraction (self, fieldname):
#python wrapper for 'gst_structure_get_fraction'
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.
Returns a tuple made of:
True if the values could be set correctly. If there was no field with fieldname or the existing field did not contain a GstFraction, this function returns False.
gst_structure_get_int
gboolean gst_structure_get_int (const GstStructure * structure, const gchar * fieldname, gint * value)
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.
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to an int to set
Gst.Structure.prototype.get_int
function Gst.Structure.prototype.get_int(fieldname: String): {
// javascript wrapper for 'gst_structure_get_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.
Returns a tuple made of:
Gst.Structure.get_int
def Gst.Structure.get_int (self, fieldname):
#python wrapper for 'gst_structure_get_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.
Returns a tuple made of:
gst_structure_get_int64
gboolean gst_structure_get_int64 (const GstStructure * structure, const gchar * fieldname, gint64 * value)
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.
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to a gint64 to set
Since : 1.4
Gst.Structure.prototype.get_int64
function Gst.Structure.prototype.get_int64(fieldname: String): {
// javascript wrapper for 'gst_structure_get_int64'
}
Sets the Number 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.
Returns a tuple made of:
Since : 1.4
Gst.Structure.get_int64
def Gst.Structure.get_int64 (self, fieldname):
#python wrapper for 'gst_structure_get_int64'
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.
Returns a tuple made of:
Since : 1.4
gst_structure_get_list
gboolean gst_structure_get_list (GstStructure * structure, const gchar * fieldname, GValueArray ** array)
This is useful in language bindings where unknown GValue types are not supported. This function will convert the GST_TYPE_LIST into a newly allocated GValueArray and return it through array. Be aware that this is slower then getting the GValue directly.
TRUE if 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.
Since : 1.12
Gst.Structure.prototype.get_list
function Gst.Structure.prototype.get_list(fieldname: String): {
// javascript wrapper for 'gst_structure_get_list'
}
This is useful in language bindings where unknown GObject.Value types are not supported. This function will convert the GST_TYPE_LIST (not introspectable) into a newly allocated GValueArray and return it through array. Be aware that this is slower then getting the GObject.Value directly.
Returns a tuple made of:
true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_LIST (not introspectable), this function returns false.
true if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_LIST (not introspectable), this function returns false.
Since : 1.12
Gst.Structure.get_list
def Gst.Structure.get_list (self, fieldname):
#python wrapper for 'gst_structure_get_list'
This is useful in language bindings where unknown GObject.Value types are not supported. This function will convert the GST_TYPE_LIST (not introspectable) into a newly allocated GValueArray and return it through array. Be aware that this is slower then getting the GObject.Value directly.
Returns a tuple made of:
True if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_LIST (not introspectable), this function returns False.
True if the value could be set correctly. If there was no field with fieldname or the existing field did not contain a GST_TYPE_LIST (not introspectable), this function returns False.
Since : 1.12
gst_structure_get_name
const gchar * gst_structure_get_name (const GstStructure * structure)
Get the name of structure as a string.
Parameters:
structure
–
the name of the structure.
Gst.Structure.prototype.get_name
function Gst.Structure.prototype.get_name(): {
// javascript wrapper for 'gst_structure_get_name'
}
Get the name of structure as a string.
Parameters:
the name of the structure.
Gst.Structure.get_name
def Gst.Structure.get_name (self):
#python wrapper for 'gst_structure_get_name'
Get the name of structure as a string.
Parameters:
the name of the structure.
gst_structure_get_name_id
GQuark gst_structure_get_name_id (const GstStructure * structure)
Get the name of structure as a GQuark.
Parameters:
structure
–
the quark representing the name of the structure.
deprecated : 1.26: Use gst_structure_get_name_id_str().
Gst.Structure.prototype.get_name_id
function Gst.Structure.prototype.get_name_id(): {
// javascript wrapper for 'gst_structure_get_name_id'
}
Get the name of structure as a GQuark.
Parameters:
the quark representing the name of the structure.
deprecated : 1.26: Use gst_structure_get_name_id_str().
Gst.Structure.get_name_id
def Gst.Structure.get_name_id (self):
#python wrapper for 'gst_structure_get_name_id'
Get the name of structure as a GQuark.
Parameters:
the quark representing the name of the structure.
deprecated : 1.26: Use gst_structure_get_name_id_str().
gst_structure_get_name_id_str
const GstIdStr * gst_structure_get_name_id_str (const GstStructure * structure)
Get the name of structure as a GstIdStr.
Parameters:
structure
–
the name of the structure.
Since : 1.26
Gst.Structure.prototype.get_name_id_str
function Gst.Structure.prototype.get_name_id_str(): {
// javascript wrapper for 'gst_structure_get_name_id_str'
}
Get the name of structure as a GstIdStr.
Parameters:
the name of the structure.
Since : 1.26
Gst.Structure.get_name_id_str
def Gst.Structure.get_name_id_str (self):
#python wrapper for 'gst_structure_get_name_id_str'
Get the name of structure as a GstIdStr.
Parameters:
the name of the structure.
Since : 1.26
gst_structure_get_string
const gchar * gst_structure_get_string (const GstStructure * structure, const gchar * fieldname)
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.
a pointer to the string or NULL when the field did not exist or did not contain a string.
Gst.Structure.prototype.get_string
function Gst.Structure.prototype.get_string(fieldname: String): {
// javascript wrapper for 'gst_structure_get_string'
}
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.
Gst.Structure.get_string
def Gst.Structure.get_string (self, fieldname):
#python wrapper for 'gst_structure_get_string'
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.
gst_structure_get_uint
gboolean gst_structure_get_uint (const GstStructure * structure, const gchar * fieldname, guint * value)
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.
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to a uint to set
Gst.Structure.prototype.get_uint
function Gst.Structure.prototype.get_uint(fieldname: String): {
// javascript wrapper for 'gst_structure_get_uint'
}
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.
Returns a tuple made of:
Gst.Structure.get_uint
def Gst.Structure.get_uint (self, fieldname):
#python wrapper for 'gst_structure_get_uint'
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.
Returns a tuple made of:
gst_structure_get_uint64
gboolean gst_structure_get_uint64 (const GstStructure * structure, const gchar * fieldname, guint64 * value)
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.
Parameters:
structure
–
fieldname
–
the name of a field
value
(
[out])
–
a pointer to a guint64 to set
Since : 1.4
Gst.Structure.prototype.get_uint64
function Gst.Structure.prototype.get_uint64(fieldname: String): {
// javascript wrapper for 'gst_structure_get_uint64'
}
Sets the Number 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.
Returns a tuple made of:
Since : 1.4
Gst.Structure.get_uint64
def Gst.Structure.get_uint64 (self, fieldname):
#python wrapper for 'gst_structure_get_uint64'
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.
Returns a tuple made of:
Since : 1.4
gst_structure_get_valist
gboolean gst_structure_get_valist (const GstStructure * structure, const char* first_fieldname, va_list args)
Parses the variable arguments and reads fields from structure accordingly. valist-variant of gst_structure_get. Look at the documentation of gst_structure_get for more details.
Parameters:
structure
–
first_fieldname
–
the name of the first field to read
args
–
variable arguments
gst_structure_get_value
const GValue * gst_structure_get_value (const GstStructure * structure, const gchar * fieldname)
Get the value of the field with name fieldname.
the GValue corresponding to the field with the given name.
Gst.Structure.prototype.get_value
function Gst.Structure.prototype.get_value(fieldname: String): {
// javascript wrapper for 'gst_structure_get_value'
}
Get the value of the field with name fieldname.
Parameters:
the name of the field to get
the GObject.Value corresponding to the field with the given name.
Gst.Structure.get_value
def Gst.Structure.get_value (self, fieldname):
#python wrapper for 'gst_structure_get_value'
Get the value of the field with name fieldname.
Parameters:
the name of the field to get
the GObject.Value corresponding to the field with the given name.
gst_structure_has_field
gboolean gst_structure_has_field (const GstStructure * structure, const gchar * fieldname)
Check if structure contains a field named fieldname.
TRUE if the structure contains a field with the given name
Gst.Structure.prototype.has_field
function Gst.Structure.prototype.has_field(fieldname: String): {
// javascript wrapper for 'gst_structure_has_field'
}
Check if structure contains a field named fieldname.
Gst.Structure.has_field
def Gst.Structure.has_field (self, fieldname):
#python wrapper for 'gst_structure_has_field'
Check if structure contains a field named fieldname.
gst_structure_has_field_typed
gboolean gst_structure_has_field_typed (const GstStructure * structure, const gchar * fieldname, GType type)
Check if structure contains a field named fieldname and with GType type.
TRUE if the structure contains a field with the given name and type
Gst.Structure.prototype.has_field_typed
function Gst.Structure.prototype.has_field_typed(fieldname: String, type: GObject.Type): {
// javascript wrapper for 'gst_structure_has_field_typed'
}
Check if structure contains a field named fieldname and with GType type.
Parameters:
the name of a field
the type of a value
Gst.Structure.has_field_typed
def Gst.Structure.has_field_typed (self, fieldname, type):
#python wrapper for 'gst_structure_has_field_typed'
Check if structure contains a field named fieldname and with GType type.
Parameters:
the name of a field
the type of a value
gst_structure_has_name
gboolean gst_structure_has_name (const GstStructure * structure, const gchar * name)
Checks if the structure has the given name
TRUE if name matches the name of the structure.
Gst.Structure.prototype.has_name
function Gst.Structure.prototype.has_name(name: String): {
// javascript wrapper for 'gst_structure_has_name'
}
Checks if the structure has the given name
Gst.Structure.has_name
def Gst.Structure.has_name (self, name):
#python wrapper for 'gst_structure_has_name'
Checks if the structure has the given name
gst_structure_id_get
gboolean gst_structure_id_get (const GstStructure * structure, GQuark first_field_id, ... ...)
Parses the variable arguments and reads fields from structure accordingly. Variable arguments should be in the form field id quark, field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be NULL (technically it should be a 0 quark, but we require NULL so compilers that support it can check for the NULL terminator and warn if it's not there).
This function is just like gst_structure_get only that it is slightly more efficient since it saves the string-to-quark lookup in the global quark hashtable.
For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free or the suitable function for the boxed type.
Parameters:
structure
–
first_field_id
–
the quark of the first field to read
...
–
variable arguments
deprecated : 1.26: Use gst_structure_id_str_get().
gst_structure_id_get_valist
gboolean gst_structure_id_get_valist (const GstStructure * structure, GQuark first_field_id, va_list args)
Parses the variable arguments and reads fields from structure accordingly. valist-variant of gst_structure_id_get. Look at the documentation of gst_structure_id_get for more details.
Parameters:
structure
–
first_field_id
–
the quark of the first field to read
args
–
variable arguments
deprecated : 1.26: Use gst_structure_id_str_get_valist().
gst_structure_id_get_value
const GValue * gst_structure_id_get_value (const GstStructure * structure, GQuark field)
Get the value of the field with GQuark field.
the GValue corresponding to the field with the given name identifier.
Gst.Structure.prototype.id_get_value
function Gst.Structure.prototype.id_get_value(field: GLib.Quark): {
// javascript wrapper for 'gst_structure_id_get_value'
}
Get the value of the field with GQuark field.
the GObject.Value corresponding to the field with the given name identifier.
Gst.Structure.id_get_value
def Gst.Structure.id_get_value (self, field):
#python wrapper for 'gst_structure_id_get_value'
Get the value of the field with GQuark field.
the GObject.Value corresponding to the field with the given name identifier.
gst_structure_id_has_field
gboolean gst_structure_id_has_field (const GstStructure * structure, GQuark field)
Check if structure contains a field named field.
TRUE if the structure contains a field with the given name
deprecated : 1.26: Use gst_structure_id_str_has_field().
Gst.Structure.prototype.id_has_field
function Gst.Structure.prototype.id_has_field(field: GLib.Quark): {
// javascript wrapper for 'gst_structure_id_has_field'
}
Check if structure contains a field named field.
deprecated : 1.26: Use gst_structure_id_str_has_field().
Gst.Structure.id_has_field
def Gst.Structure.id_has_field (self, field):
#python wrapper for 'gst_structure_id_has_field'
Check if structure contains a field named field.
deprecated : 1.26: Use gst_structure_id_str_has_field().
gst_structure_id_has_field_typed
gboolean gst_structure_id_has_field_typed (const GstStructure * structure, GQuark field, GType type)
Check if structure contains a field named field and with GType type.
TRUE if the structure contains a field with the given name and type
deprecated : 1.26: Use gst_structure_id_str_has_field_typed().
Gst.Structure.prototype.id_has_field_typed
function Gst.Structure.prototype.id_has_field_typed(field: GLib.Quark, type: GObject.Type): {
// javascript wrapper for 'gst_structure_id_has_field_typed'
}
Check if structure contains a field named field and with GType type.
deprecated : 1.26: Use gst_structure_id_str_has_field_typed().
Gst.Structure.id_has_field_typed
def Gst.Structure.id_has_field_typed (self, field, type):
#python wrapper for 'gst_structure_id_has_field_typed'
Check if structure contains a field named field and with GType type.
deprecated : 1.26: Use gst_structure_id_str_has_field_typed().
gst_structure_id_set
gst_structure_id_set (GstStructure * structure, GQuark fieldname, ... ...)
Identical to gst_structure_set, except that field names are passed using the GQuark for the field name. This allows more efficient setting of the structure if the caller already knows the associated quark values. The last variable argument must be NULL.
Parameters:
structure
–
fieldname
–
the GQuark for the name of the field to set
...
–
variable arguments
deprecated : 1.26: Use gst_structure_id_str_set().
gst_structure_id_set_valist
gst_structure_id_set_valist (GstStructure * structure, GQuark fieldname, va_list varargs)
va_list form of gst_structure_id_set.
Parameters:
structure
–
fieldname
–
the name of the field to set
varargs
–
variable arguments
deprecated : 1.26: Use gst_structure_id_str_set_valist().
gst_structure_id_set_value
gst_structure_id_set_value (GstStructure * structure, GQuark field, const GValue * value)
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.
deprecated : 1.26: Use gst_structure_id_str_set_value().
Gst.Structure.prototype.id_set_value
function Gst.Structure.prototype.id_set_value(field: GLib.Quark, value: GObject.Value): {
// javascript wrapper for 'gst_structure_id_set_value'
}
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.
deprecated : 1.26: Use gst_structure_id_str_set_value().
Gst.Structure.id_set_value
def Gst.Structure.id_set_value (self, field, value):
#python wrapper for 'gst_structure_id_set_value'
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.
deprecated : 1.26: Use gst_structure_id_str_set_value().
gst_structure_id_str_get
gboolean gst_structure_id_str_get (const GstStructure * structure, const GstIdStr * first_fieldname, ... ...)
Parses the variable arguments and reads fields from structure accordingly. Variable arguments should be in the form field name (as GstIdStr), field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be NULL.
For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free or the suitable function for the boxed type.
Parameters:
structure
–
first_fieldname
–
the name of the first field to read
...
–
variable arguments
Since : 1.26
gst_structure_id_str_get_field_type
GType gst_structure_id_str_get_field_type (const GstStructure * structure, const GstIdStr * fieldname)
Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned.
the GValue of the field
Since : 1.26
Gst.Structure.prototype.id_str_get_field_type
function Gst.Structure.prototype.id_str_get_field_type(fieldname: Gst.IdStr): {
// javascript wrapper for 'gst_structure_id_str_get_field_type'
}
Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned.
Parameters:
the name of the field
the GObject.Value of the field
Since : 1.26
Gst.Structure.id_str_get_field_type
def Gst.Structure.id_str_get_field_type (self, fieldname):
#python wrapper for 'gst_structure_id_str_get_field_type'
Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned.
Parameters:
the name of the field
the GObject.Value of the field
Since : 1.26
gst_structure_id_str_get_valist
gboolean gst_structure_id_str_get_valist (const GstStructure * structure, const GstIdStr * first_fieldname, va_list args)
Parses the variable arguments and reads fields from structure accordingly. valist-variant of gst_structure_id_str_get. Look at the documentation of gst_structure_id_str_get for more details.
Parameters:
structure
–
first_fieldname
–
the name of the first field to read
args
–
variable arguments
Since : 1.26
gst_structure_id_str_get_value
const GValue * gst_structure_id_str_get_value (const GstStructure * structure, const GstIdStr * fieldname)
Get the value of the field with name fieldname.
the GValue corresponding to the field with the given name.
Since : 1.26
Gst.Structure.prototype.id_str_get_value
function Gst.Structure.prototype.id_str_get_value(fieldname: Gst.IdStr): {
// javascript wrapper for 'gst_structure_id_str_get_value'
}
Get the value of the field with name fieldname.
Parameters:
the name of the field to get
the GObject.Value corresponding to the field with the given name.
Since : 1.26
Gst.Structure.id_str_get_value
def Gst.Structure.id_str_get_value (self, fieldname):
#python wrapper for 'gst_structure_id_str_get_value'
Get the value of the field with name fieldname.
Parameters:
the name of the field to get
the GObject.Value corresponding to the field with the given name.
Since : 1.26
gst_structure_id_str_has_field
gboolean gst_structure_id_str_has_field (const GstStructure * structure, const GstIdStr * fieldname)
Check if structure contains a field named fieldname.
TRUE if the structure contains a field with the given name
Since : 1.26
Gst.Structure.prototype.id_str_has_field
function Gst.Structure.prototype.id_str_has_field(fieldname: Gst.IdStr): {
// javascript wrapper for 'gst_structure_id_str_has_field'
}
Check if structure contains a field named fieldname.
Since : 1.26
Gst.Structure.id_str_has_field
def Gst.Structure.id_str_has_field (self, fieldname):
#python wrapper for 'gst_structure_id_str_has_field'
Check if structure contains a field named fieldname.
Since : 1.26
gst_structure_id_str_has_field_typed
gboolean gst_structure_id_str_has_field_typed (const GstStructure * structure, const GstIdStr * fieldname, GType type)
Check if structure contains a field named fieldname and with GType type.
TRUE if the structure contains a field with the given name and type
Since : 1.26
Gst.Structure.prototype.id_str_has_field_typed
function Gst.Structure.prototype.id_str_has_field_typed(fieldname: Gst.IdStr, type: GObject.Type): {
// javascript wrapper for 'gst_structure_id_str_has_field_typed'
}
Check if structure contains a field named fieldname and with GType type.
Parameters:
the name of a field
the type of a value
Since : 1.26
Gst.Structure.id_str_has_field_typed
def Gst.Structure.id_str_has_field_typed (self, fieldname, type):
#python wrapper for 'gst_structure_id_str_has_field_typed'
Check if structure contains a field named fieldname and with GType type.
Parameters:
the name of a field
the type of a value
Since : 1.26
gst_structure_id_str_nth_field_name
const GstIdStr * gst_structure_id_str_nth_field_name (const GstStructure * structure, guint index)
Get the name (as a GstIdStr) of the given field number, counting from 0 onwards.
the name of the given field number
Since : 1.26
Gst.Structure.prototype.id_str_nth_field_name
function Gst.Structure.prototype.id_str_nth_field_name(index: Number): {
// javascript wrapper for 'gst_structure_id_str_nth_field_name'
}
Get the name (as a GstIdStr) of the given field number, counting from 0 onwards.
Parameters:
the index to get the name of
the name of the given field number
Since : 1.26
Gst.Structure.id_str_nth_field_name
def Gst.Structure.id_str_nth_field_name (self, index):
#python wrapper for 'gst_structure_id_str_nth_field_name'
Get the name (as a GstIdStr) of the given field number, counting from 0 onwards.
the name of the given field number
Since : 1.26
gst_structure_id_str_remove_field
gst_structure_id_str_remove_field (GstStructure * structure, const GstIdStr * fieldname)
Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged.
Since : 1.26
Gst.Structure.prototype.id_str_remove_field
function Gst.Structure.prototype.id_str_remove_field(fieldname: Gst.IdStr): {
// javascript wrapper for 'gst_structure_id_str_remove_field'
}
Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged.
Parameters:
the name of the field to remove
Since : 1.26
Gst.Structure.id_str_remove_field
def Gst.Structure.id_str_remove_field (self, fieldname):
#python wrapper for 'gst_structure_id_str_remove_field'
Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged.
Parameters:
the name of the field to remove
Since : 1.26
gst_structure_id_str_remove_fields
gst_structure_id_str_remove_fields (GstStructure * structure, const GstIdStr * fieldname, ... ...)
Removes the fields with the given names. If a field does not exist, the argument is ignored.
Parameters:
structure
–
fieldname
–
the name of the field to remove
...
–
NULL-terminated list of more fieldnames to remove
Since : 1.26
gst_structure_id_str_remove_fields_valist
gst_structure_id_str_remove_fields_valist (GstStructure * structure, const GstIdStr * fieldname, va_list varargs)
va_list form of gst_structure_id_str_remove_fields.
Parameters:
structure
–
fieldname
–
the name of the field to remove
varargs
–
NULL-terminated list of more fieldnames to remove
Since : 1.26
gst_structure_id_str_set
gst_structure_id_str_set (GstStructure * structure, const GstIdStr * fieldname, ... ...)
Identical to gst_structure_set, except that field names are passed using a GstIdStr for the field name. This allows more efficient setting of the structure if the caller already owns the associated GstIdStr values or if they can be built from static literals. The last variable argument must be NULL.
Parameters:
structure
–
fieldname
–
the the name of the field to set
...
–
variable arguments
Since : 1.26
gst_structure_id_str_set_valist
gst_structure_id_str_set_valist (GstStructure * structure, const GstIdStr * fieldname, va_list varargs)
va_list form of gst_structure_id_str_set.
Parameters:
structure
–
fieldname
–
the name of the field to set
varargs
–
variable arguments
Since : 1.26
gst_structure_id_str_set_value
gst_structure_id_str_set_value (GstStructure * structure, const GstIdStr * fieldname, const GValue * value)
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.
Parameters:
structure
–
fieldname
–
the name of the field to set
value
–
the new value of the field
Since : 1.26
Gst.Structure.prototype.id_str_set_value
function Gst.Structure.prototype.id_str_set_value(fieldname: Gst.IdStr, value: GObject.Value): {
// javascript wrapper for 'gst_structure_id_str_set_value'
}
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.
Parameters:
the name of the field to set
the new value of the field
Since : 1.26
Gst.Structure.id_str_set_value
def Gst.Structure.id_str_set_value (self, fieldname, value):
#python wrapper for 'gst_structure_id_str_set_value'
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.
Parameters:
the name of the field to set
the new value of the field
Since : 1.26
gst_structure_id_str_take_value
gst_structure_id_str_take_value (GstStructure * structure, const GstIdStr * fieldname, GValue * value)
Sets the field with the given GstIdStr field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.
Parameters:
structure
–
fieldname
–
the name of the field to set
value
(
[transfer: full])
–
the new value of the field
Since : 1.26
Gst.Structure.prototype.id_str_take_value
function Gst.Structure.prototype.id_str_take_value(fieldname: Gst.IdStr, value: GObject.Value): {
// javascript wrapper for 'gst_structure_id_str_take_value'
}
Sets the field with the given GstIdStr field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.
Parameters:
the name of the field to set
the new value of the field
Since : 1.26
Gst.Structure.id_str_take_value
def Gst.Structure.id_str_take_value (self, fieldname, value):
#python wrapper for 'gst_structure_id_str_take_value'
Sets the field with the given GstIdStr field to value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed.
Parameters:
the name of the field to set
the new value of the field
Since : 1.26
gst_structure_id_take_value
gst_structure_id_take_value (GstStructure * structure, GQuark field, GValue * value)
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.
Parameters:
structure
–
field
–
a GQuark representing a field
value
(
[transfer: full])
–
the new value of the field
deprecated : 1.26: Use gst_structure_id_str_take_value().
Gst.Structure.prototype.id_take_value
function Gst.Structure.prototype.id_take_value(field: GLib.Quark, value: GObject.Value): {
// javascript wrapper for 'gst_structure_id_take_value'
}
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.
deprecated : 1.26: Use gst_structure_id_str_take_value().
Gst.Structure.id_take_value
def Gst.Structure.id_take_value (self, field, value):
#python wrapper for 'gst_structure_id_take_value'
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.
deprecated : 1.26: Use gst_structure_id_str_take_value().
gst_structure_intersect
GstStructure * gst_structure_intersect (const GstStructure * struct1, const GstStructure * struct2)
Intersects struct1 and struct2 and returns the intersection.
Intersection of struct1 and struct2
Gst.Structure.prototype.intersect
function Gst.Structure.prototype.intersect(struct2: Gst.Structure): {
// javascript wrapper for 'gst_structure_intersect'
}
Intersects struct1 and struct2 and returns the intersection.
Intersection of struct1 and struct2
Gst.Structure.intersect
def Gst.Structure.intersect (self, struct2):
#python wrapper for 'gst_structure_intersect'
Intersects struct1 and struct2 and returns the intersection.
Intersection of struct1 and struct2
gst_structure_is_equal
gboolean gst_structure_is_equal (const GstStructure * structure1, const GstStructure * structure2)
Tests if the two GstStructure are equal.
TRUE if the two structures have the same name and field.
Gst.Structure.prototype.is_equal
function Gst.Structure.prototype.is_equal(structure2: Gst.Structure): {
// javascript wrapper for 'gst_structure_is_equal'
}
Tests if the two Gst.Structure are equal.
Parameters:
Gst.Structure.is_equal
def Gst.Structure.is_equal (self, structure2):
#python wrapper for 'gst_structure_is_equal'
Tests if the two Gst.Structure are equal.
Parameters:
gst_structure_is_subset
gboolean gst_structure_is_subset (const GstStructure * subset, const GstStructure * superset)
Checks if subset is a subset of superset, i.e. has the same structure name and for all fields that are existing in superset, subset has a value that is a subset of the value in superset.
TRUE if subset is a subset of superset
Gst.Structure.prototype.is_subset
function Gst.Structure.prototype.is_subset(superset: Gst.Structure): {
// javascript wrapper for 'gst_structure_is_subset'
}
Checks if subset is a subset of superset, i.e. has the same structure name and for all fields that are existing in superset, subset has a value that is a subset of the value in superset.
Gst.Structure.is_subset
def Gst.Structure.is_subset (self, superset):
#python wrapper for 'gst_structure_is_subset'
Checks if subset is a subset of superset, i.e. has the same structure name and for all fields that are existing in superset, subset has a value that is a subset of the value in superset.
gst_structure_map_in_place
gboolean gst_structure_map_in_place (GstStructure * structure, GstStructureMapFunc func, gpointer user_data)
Calls the provided function once for each field in the GstStructure. In contrast to gst_structure_foreach, the function may modify but not delete the fields. The structure must be mutable.
Parameters:
structure
–
func
(
[scope call][closure])
–
a function to call for each field
user_data
–
private data
deprecated : 1.26: Use gst_structure_map_in_place_id_str().
Gst.Structure.prototype.map_in_place
function Gst.Structure.prototype.map_in_place(func: Gst.StructureMapFunc, user_data: Object): {
// javascript wrapper for 'gst_structure_map_in_place'
}
Calls the provided function once for each field in the Gst.Structure. In contrast to Gst.Structure.prototype.foreach, the function may modify but not delete the fields. The structure must be mutable.
Parameters:
a function to call for each field
private data
deprecated : 1.26: Use gst_structure_map_in_place_id_str().
Gst.Structure.map_in_place
def Gst.Structure.map_in_place (self, func, *user_data):
#python wrapper for 'gst_structure_map_in_place'
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.
Parameters:
a function to call for each field
private data
deprecated : 1.26: Use gst_structure_map_in_place_id_str().
gst_structure_map_in_place_id_str
gboolean gst_structure_map_in_place_id_str (GstStructure * structure, GstStructureMapIdStrFunc func, gpointer user_data)
Calls the provided function once for each field in the GstStructure. In contrast to gst_structure_foreach_id_str, the function may modify but not delete the fields. The structure must be mutable.
Parameters:
structure
–
func
(
[scope call][closure])
–
a function to call for each field
user_data
–
private data
Since : 1.26
Gst.Structure.prototype.map_in_place_id_str
function Gst.Structure.prototype.map_in_place_id_str(func: Gst.StructureMapIdStrFunc, user_data: Object): {
// javascript wrapper for 'gst_structure_map_in_place_id_str'
}
Calls the provided function once for each field in the Gst.Structure. In contrast to Gst.Structure.prototype.foreach_id_str, the function may modify but not delete the fields. The structure must be mutable.
Parameters:
a function to call for each field
private data
Since : 1.26
Gst.Structure.map_in_place_id_str
def Gst.Structure.map_in_place_id_str (self, func, *user_data):
#python wrapper for 'gst_structure_map_in_place_id_str'
Calls the provided function once for each field in the Gst.Structure. In contrast to Gst.Structure.foreach_id_str, the function may modify but not delete the fields. The structure must be mutable.
Parameters:
a function to call for each field
private data
Since : 1.26
gst_structure_n_fields
gint gst_structure_n_fields (const GstStructure * structure)
Get the number of fields in the structure.
Parameters:
structure
–
the number of fields in the structure
Gst.Structure.prototype.n_fields
function Gst.Structure.prototype.n_fields(): {
// javascript wrapper for 'gst_structure_n_fields'
}
Get the number of fields in the structure.
Parameters:
the number of fields in the structure
Gst.Structure.n_fields
def Gst.Structure.n_fields (self):
#python wrapper for 'gst_structure_n_fields'
Get the number of fields in the structure.
Parameters:
the number of fields in the structure
gst_structure_nth_field_name
const gchar * gst_structure_nth_field_name (const GstStructure * structure, guint index)
Get the name of the given field number, counting from 0 onwards.
the name of the given field number
Gst.Structure.prototype.nth_field_name
function Gst.Structure.prototype.nth_field_name(index: Number): {
// javascript wrapper for 'gst_structure_nth_field_name'
}
Get the name of the given field number, counting from 0 onwards.
Parameters:
the index to get the name of
the name of the given field number
Gst.Structure.nth_field_name
def Gst.Structure.nth_field_name (self, index):
#python wrapper for 'gst_structure_nth_field_name'
Get the name of the given field number, counting from 0 onwards.
the name of the given field number
gst_structure_remove_all_fields
gst_structure_remove_all_fields (GstStructure * structure)
Removes all fields in a GstStructure.
Parameters:
structure
–
Gst.Structure.prototype.remove_all_fields
function Gst.Structure.prototype.remove_all_fields(): {
// javascript wrapper for 'gst_structure_remove_all_fields'
}
Removes all fields in a GstStructure.
Parameters:
Gst.Structure.remove_all_fields
def Gst.Structure.remove_all_fields (self):
#python wrapper for 'gst_structure_remove_all_fields'
Removes all fields in a GstStructure.
Parameters:
gst_structure_remove_field
gst_structure_remove_field (GstStructure * structure, const gchar * fieldname)
Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged.
Gst.Structure.prototype.remove_field
function Gst.Structure.prototype.remove_field(fieldname: String): {
// javascript wrapper for 'gst_structure_remove_field'
}
Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged.
Parameters:
the name of the field to remove
Gst.Structure.remove_field
def Gst.Structure.remove_field (self, fieldname):
#python wrapper for 'gst_structure_remove_field'
Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged.
Parameters:
the name of the field to remove
gst_structure_remove_fields
gst_structure_remove_fields (GstStructure * structure, const gchar * fieldname, ... ...)
Removes the fields with the given names. If a field does not exist, the argument is ignored.
Parameters:
structure
–
fieldname
–
the name of the field to remove
...
–
NULL-terminated list of more fieldnames to remove
gst_structure_remove_fields_valist
gst_structure_remove_fields_valist (GstStructure * structure, const gchar * fieldname, va_list varargs)
va_list form of gst_structure_remove_fields.
Parameters:
structure
–
fieldname
–
the name of the field to remove
varargs
–
NULL-terminated list of more fieldnames to remove
gst_structure_serialize
gchar * gst_structure_serialize (const GstStructure * structure, GstSerializeFlags flags)
Converts structure to a human-readable string representation.
This version of the caps serialization function introduces support for nested structures and caps but the resulting strings won't be parsable with GStreamer prior to 1.20 unless GST_SERIALIZE_FLAG_BACKWARD_COMPAT is passed as flag.
GST_SERIALIZE_FLAG_STRICT flags is not allowed because it would make this function nullable which is an API break for bindings. Use gst_structure_serialize_full instead.
Free-function: g_free
Since : 1.20
deprecated : Use gst_structure_serialize_full() instead.
Gst.Structure.prototype.serialize
function Gst.Structure.prototype.serialize(flags: Gst.SerializeFlags): {
// javascript wrapper for 'gst_structure_serialize'
}
Converts structure to a human-readable string representation.
This version of the caps serialization function introduces support for nested structures and caps but the resulting strings won't be parsable with GStreamer prior to 1.20 unless Gst.SerializeFlags.BACKWARD_COMPAT is passed as flag.
Gst.SerializeFlags.STRICT flags is not allowed because it would make this function nullable which is an API break for bindings. Use Gst.Structure.prototype.serialize_full instead.
Free-function: g_free
Parameters:
The flags to use to serialize structure
a pointer to string allocated by GLib.prototype.malloc. GLib.prototype.free after usage.
Since : 1.20
deprecated : Use gst_structure_serialize_full() instead.
Gst.Structure.serialize
def Gst.Structure.serialize (self, flags):
#python wrapper for 'gst_structure_serialize'
Converts structure to a human-readable string representation.
This version of the caps serialization function introduces support for nested structures and caps but the resulting strings won't be parsable with GStreamer prior to 1.20 unless Gst.SerializeFlags.BACKWARD_COMPAT is passed as flag.
Gst.SerializeFlags.STRICT flags is not allowed because it would make this function nullable which is an API break for bindings. Use Gst.Structure.serialize_full instead.
Free-function: g_free
Parameters:
The flags to use to serialize structure
a pointer to string allocated by GLib.malloc. GLib.free after usage.
Since : 1.20
deprecated : Use gst_structure_serialize_full() instead.
gst_structure_serialize_full
gchar * gst_structure_serialize_full (const GstStructure * structure, GstSerializeFlags flags)
Alias for gst_structure_serialize but with nullable annotation because it can return NULL when GST_SERIALIZE_FLAG_STRICT flag is set.
Since : 1.24
Gst.Structure.prototype.serialize_full
function Gst.Structure.prototype.serialize_full(flags: Gst.SerializeFlags): {
// javascript wrapper for 'gst_structure_serialize_full'
}
Alias for Gst.Structure.prototype.serialize but with nullable annotation because it can return null when Gst.SerializeFlags.STRICT flag is set.
Parameters:
The flags to use to serialize structure
a pointer to string allocated by GLib.prototype.malloc. GLib.prototype.free after usage.
Since : 1.24
Gst.Structure.serialize_full
def Gst.Structure.serialize_full (self, flags):
#python wrapper for 'gst_structure_serialize_full'
Alias for Gst.Structure.serialize but with nullable annotation because it can return None when Gst.SerializeFlags.STRICT flag is set.
Parameters:
The flags to use to serialize structure
a pointer to string allocated by GLib.malloc. GLib.free after usage.
Since : 1.24
gst_structure_set
gst_structure_set (GstStructure * structure, const gchar * fieldname, ... ...)
Parses the variable arguments and sets fields accordingly. Fields that weren't already part of the structure are added as needed. Variable arguments should be in the form field name, field type (as a GType), value(s). The last variable argument should be NULL.
Parameters:
structure
–
fieldname
–
the name of the field to set
...
–
variable arguments
gst_structure_set_array
gst_structure_set_array (GstStructure * structure, const gchar * fieldname, const GValueArray * array)
This is useful in language bindings where unknown GValue types 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 GValue directly.
Since : 1.12
Gst.Structure.prototype.set_array
function Gst.Structure.prototype.set_array(fieldname: String, array: GObject.ValueArray): {
// javascript wrapper for 'gst_structure_set_array'
}
This is useful in language bindings where unknown GValue types are not supported. This function will convert a array to GST_TYPE_ARRAY (not introspectable) and set the field specified by fieldname. Be aware that this is slower then using GST_TYPE_ARRAY (not introspectable) in a GObject.Value directly.
Since : 1.12
Gst.Structure.set_array
def Gst.Structure.set_array (self, fieldname, array):
#python wrapper for 'gst_structure_set_array'
This is useful in language bindings where unknown GValue types are not supported. This function will convert a array to GST_TYPE_ARRAY (not introspectable) and set the field specified by fieldname. Be aware that this is slower then using GST_TYPE_ARRAY (not introspectable) in a GObject.Value directly.
Since : 1.12
gst_structure_set_list
gst_structure_set_list (GstStructure * structure, const gchar * fieldname, const GValueArray * array)
This is useful in language bindings where unknown GValue types 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 GValue directly.
Since : 1.12
Gst.Structure.prototype.set_list
function Gst.Structure.prototype.set_list(fieldname: String, array: GObject.ValueArray): {
// javascript wrapper for 'gst_structure_set_list'
}
This is useful in language bindings where unknown GValue types are not supported. This function will convert a array to GST_TYPE_LIST (not introspectable) and set the field specified by fieldname. Be aware that this is slower then using GST_TYPE_LIST (not introspectable) in a GObject.Value directly.
Since : 1.12
Gst.Structure.set_list
def Gst.Structure.set_list (self, fieldname, array):
#python wrapper for 'gst_structure_set_list'
This is useful in language bindings where unknown GValue types are not supported. This function will convert a array to GST_TYPE_LIST (not introspectable) and set the field specified by fieldname. Be aware that this is slower then using GST_TYPE_LIST (not introspectable) in a GObject.Value directly.
Since : 1.12
gst_structure_set_name
gst_structure_set_name (GstStructure * structure, const gchar * name)
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 "/-_.:".
Gst.Structure.prototype.set_name
function Gst.Structure.prototype.set_name(name: String): {
// javascript wrapper for 'gst_structure_set_name'
}
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 "/-_.:".
Parameters:
the new name of the structure
Gst.Structure.set_name
def Gst.Structure.set_name (self, name):
#python wrapper for 'gst_structure_set_name'
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 "/-_.:".
gst_structure_set_name_id_str
gst_structure_set_name_id_str (GstStructure * structure, const GstIdStr * name)
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 "/-_.:".
Since : 1.26
Gst.Structure.prototype.set_name_id_str
function Gst.Structure.prototype.set_name_id_str(name: Gst.IdStr): {
// javascript wrapper for 'gst_structure_set_name_id_str'
}
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 "/-_.:".
Parameters:
the new name of the structure
Since : 1.26
Gst.Structure.set_name_id_str
def Gst.Structure.set_name_id_str (self, name):
#python wrapper for 'gst_structure_set_name_id_str'
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 "/-_.:".
Parameters:
the new name of the structure
Since : 1.26
gst_structure_set_name_static_str
gst_structure_set_name_static_str (GstStructure * structure, const gchar * name)
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 "/-_.:".
name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Since : 1.26
Gst.Structure.prototype.set_name_static_str
function Gst.Structure.prototype.set_name_static_str(name: String): {
// javascript wrapper for 'gst_structure_set_name_static_str'
}
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 "/-_.:".
name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
the new name of the structure
Since : 1.26
Gst.Structure.set_name_static_str
def Gst.Structure.set_name_static_str (self, name):
#python wrapper for 'gst_structure_set_name_static_str'
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 "/-_.:".
name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Since : 1.26
gst_structure_set_parent_refcount
gboolean gst_structure_set_parent_refcount (GstStructure * structure, gint * refcount)
Sets the parent_refcount field of GstStructure. 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 GstStructure, as described in the MT Refcounting section of the design documents.
TRUE if the parent refcount could be set.
Gst.Structure.prototype.set_parent_refcount
function Gst.Structure.prototype.set_parent_refcount(refcount: Number): {
// javascript wrapper for 'gst_structure_set_parent_refcount'
}
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.
Parameters:
a pointer to the parent's refcount
Gst.Structure.set_parent_refcount
def Gst.Structure.set_parent_refcount (self, refcount):
#python wrapper for 'gst_structure_set_parent_refcount'
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.
Parameters:
a pointer to the parent's refcount
gst_structure_set_static_str
gst_structure_set_static_str (GstStructure * structure, const gchar * fieldname, ... ...)
Parses the variable arguments and sets fields accordingly. Fields that weren't already part of the structure are added as needed. Variable arguments should be in the form field name, field type (as a GType), value(s). The last variable argument should be NULL.
fieldname and all other field names needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
structure
–
fieldname
–
the name of the field to set
...
–
variable arguments
Since : 1.26
gst_structure_set_static_str_valist
gst_structure_set_static_str_valist (GstStructure * structure, const gchar * fieldname, va_list varargs)
va_list form of gst_structure_set_static_str.
fieldname and all other field names needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
structure
–
fieldname
–
the name of the field to set
varargs
–
variable arguments
Since : 1.26
gst_structure_set_valist
gst_structure_set_valist (GstStructure * structure, const gchar * fieldname, va_list varargs)
va_list form of gst_structure_set.
Parameters:
structure
–
fieldname
–
the name of the field to set
varargs
–
variable arguments
gst_structure_set_value
gst_structure_set_value (GstStructure * structure, const gchar * fieldname, const GValue * value)
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.
Parameters:
structure
–
fieldname
–
the name of the field to set
value
–
the new value of the field
Gst.Structure.prototype.set_value
function Gst.Structure.prototype.set_value(fieldname: String, value: GObject.Value): {
// javascript wrapper for 'gst_structure_set_value'
}
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.
Parameters:
the name of the field to set
the new value of the field
Gst.Structure.set_value
def Gst.Structure.set_value (self, fieldname, value):
#python wrapper for 'gst_structure_set_value'
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.
Parameters:
the name of the field to set
the new value of the field
gst_structure_set_value_static_str
gst_structure_set_value_static_str (GstStructure * structure, const gchar * fieldname, const GValue * value)
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 needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
structure
–
fieldname
–
the name of the field to set
value
–
the new value of the field
Since : 1.26
Gst.Structure.prototype.set_value_static_str
function Gst.Structure.prototype.set_value_static_str(fieldname: String, value: GObject.Value): {
// javascript wrapper for 'gst_structure_set_value_static_str'
}
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 needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
the name of the field to set
the new value of the field
Since : 1.26
Gst.Structure.set_value_static_str
def Gst.Structure.set_value_static_str (self, fieldname, value):
#python wrapper for 'gst_structure_set_value_static_str'
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 needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
the name of the field to set
the new value of the field
Since : 1.26
gst_structure_take_value
gst_structure_take_value (GstStructure * structure, const gchar * fieldname, GValue * value)
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.
Parameters:
structure
–
fieldname
–
the name of the field to set
value
(
[transfer: full])
–
the new value of the field
Gst.Structure.prototype.take_value
function Gst.Structure.prototype.take_value(fieldname: String, value: GObject.Value): {
// javascript wrapper for 'gst_structure_take_value'
}
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.
Parameters:
the name of the field to set
the new value of the field
Gst.Structure.take_value
def Gst.Structure.take_value (self, fieldname, value):
#python wrapper for 'gst_structure_take_value'
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.
Parameters:
the name of the field to set
the new value of the field
gst_structure_take_value_static_str
gst_structure_take_value_static_str (GstStructure * structure, const gchar * fieldname, GValue * value)
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 needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
structure
–
fieldname
–
the name of the field to set
value
(
[transfer: full])
–
the new value of the field
Since : 1.26
Gst.Structure.prototype.take_value_static_str
function Gst.Structure.prototype.take_value_static_str(fieldname: String, value: GObject.Value): {
// javascript wrapper for 'gst_structure_take_value_static_str'
}
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 needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
the name of the field to set
the new value of the field
Since : 1.26
Gst.Structure.take_value_static_str
def Gst.Structure.take_value_static_str (self, fieldname, value):
#python wrapper for 'gst_structure_take_value_static_str'
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 needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
Parameters:
the name of the field to set
the new value of the field
Since : 1.26
gst_structure_to_string
gchar * gst_structure_to_string (const GstStructure * structure)
Converts structure 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.
This function will lead to unexpected results when there are nested GstCaps / GstStructure deeper than one level, you should user gst_structure_serialize_full instead for those cases.
Free-function: g_free
Parameters:
structure
–
Gst.Structure.prototype.to_string
function Gst.Structure.prototype.to_string(): {
// javascript wrapper for 'gst_structure_to_string'
}
Converts structure 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.
This function will lead to unexpected results when there are nested Gst.Caps / Gst.Structure deeper than one level, you should user Gst.Structure.prototype.serialize_full instead for those cases.
Free-function: g_free
Parameters:
a pointer to string allocated by GLib.prototype.malloc. GLib.prototype.free after usage.
Gst.Structure.to_string
def Gst.Structure.to_string (self):
#python wrapper for 'gst_structure_to_string'
Converts structure 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.
This function will lead to unexpected results when there are nested Gst.Caps / Gst.Structure deeper than one level, you should user Gst.Structure.serialize_full instead for those cases.
Free-function: g_free
Parameters:
a pointer to string allocated by GLib.malloc. GLib.free after usage.
Functions
gst_structure_take
gboolean gst_structure_take (GstStructure ** oldstr_ptr, GstStructure * newstr)
Atomically modifies a pointer to point to a new structure. The GstStructure oldstr_ptr is pointing to is freed and newstr is taken ownership over.
Either newstr and the value pointed to by oldstr_ptr may be NULL.
It is a programming error if both newstr and the value pointed to by oldstr_ptr refer to the same, non-%NULL structure.
Parameters:
oldstr_ptr
(
[inout][transfer: full][nullable])
–
pointer to a place of a GstStructure to take
newstr
(
[transfer: full][nullable])
–
a new GstStructure
TRUE if newstr was different from oldstr_ptr
Since : 1.18
Gst.prototype.structure_take
function Gst.prototype.structure_take(oldstr_ptr: Gst.Structure, newstr: Gst.Structure): {
// javascript wrapper for 'gst_structure_take'
}
Atomically modifies a pointer to point to a new structure. The Gst.Structure oldstr_ptr is pointing to is freed and newstr is taken ownership over.
Either newstr and the value pointed to by oldstr_ptr may be null.
It is a programming error if both newstr and the value pointed to by oldstr_ptr refer to the same, non-%NULL structure.
Returns a tuple made of:
true if newstr was different from oldstr_ptr
Since : 1.18
Gst.structure_take
def Gst.structure_take (oldstr_ptr, newstr):
#python wrapper for 'gst_structure_take'
Atomically modifies a pointer to point to a new structure. The Gst.Structure oldstr_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-%NULL structure.
Returns a tuple made of:
True if newstr was different from oldstr_ptr
Since : 1.18
Functions
gst_clear_structure
gst_clear_structure (GstStructure ** structure_ptr)
Clears a reference to a GstStructure.
structure_ptr must not be NULL.
If the reference is NULL then this function does nothing. Otherwise, the structure is free'd using gst_structure_free and the pointer is set to NULL.
A macro is also included that allows this function to be used without pointer casts.
Parameters:
structure_ptr
–
a pointer to a GstStructure reference
Since : 1.16
Function Macros
GST_STRUCTURE_CAST
#define GST_STRUCTURE_CAST(object) ((GstStructure *)(object))
Enumerations
GstSerializeFlags
Members
GST_SERIALIZE_FLAG_NONE
(0)
–
No special flags specified.
GST_SERIALIZE_FLAG_BACKWARD_COMPAT
(1)
–
Serialize using the old format for nested structures.
GST_SERIALIZE_FLAG_STRICT
(2)
–
Serialization fails if a value cannot be serialized instead of using placeholder "NULL" value (e.g. pointers, objects).
(Since: 1.24)Since : 1.20
Gst.SerializeFlags
Members
Gst.SerializeFlags.NONE
(0)
–
No special flags specified.
Gst.SerializeFlags.BACKWARD_COMPAT
(1)
–
Serialize using the old format for nested structures.
Gst.SerializeFlags.STRICT
(2)
–
Serialization fails if a value cannot be serialized instead of using placeholder "NULL" value (e.g. pointers, objects).
(Since: 1.24)Since : 1.20
Gst.SerializeFlags
Members
Gst.SerializeFlags.NONE
(0)
–
No special flags specified.
Gst.SerializeFlags.BACKWARD_COMPAT
(1)
–
Serialize using the old format for nested structures.
Gst.SerializeFlags.STRICT
(2)
–
Serialization fails if a value cannot be serialized instead of using placeholder "NULL" value (e.g. pointers, objects).
(Since: 1.24)Since : 1.20
Callbacks
GstStructureFilterMapFunc
gboolean (*GstStructureFilterMapFunc) (GQuark field_id, GValue * value, gpointer user_data)
A function that will be called in gst_structure_filter_and_map_in_place. The function may modify value, and the value will be removed from the structure if FALSE is returned.
Parameters:
field_id
–
the GQuark of the field name
value
–
the GValue of the field
user_data
–
user data
Gst.StructureFilterMapFunc
function Gst.StructureFilterMapFunc(field_id: GLib.Quark, value: GObject.Value, user_data: Object): {
// javascript wrapper for 'GstStructureFilterMapFunc'
}
A function that will be called in Gst.Structure.prototype.filter_and_map_in_place. The function may modify value, and the value will be removed from the structure if false is returned.
Gst.StructureFilterMapFunc
def Gst.StructureFilterMapFunc (field_id, value, *user_data):
#python wrapper for 'GstStructureFilterMapFunc'
A function that will be called in Gst.Structure.filter_and_map_in_place. The function may modify value, and the value will be removed from the structure if False is returned.
GstStructureFilterMapIdStrFunc
gboolean (*GstStructureFilterMapIdStrFunc) (const GstIdStr * fieldname, GValue * value, gpointer user_data)
A function that will be called in gst_structure_filter_and_map_in_place_id_str. The function may modify value, and the value will be removed from the structure if FALSE is returned.
Parameters:
fieldname
–
the GstIdStr field name
value
–
the GValue of the field
user_data
–
user data
Since : 1.26
Gst.StructureFilterMapIdStrFunc
function Gst.StructureFilterMapIdStrFunc(fieldname: Gst.IdStr, value: GObject.Value, user_data: Object): {
// javascript wrapper for 'GstStructureFilterMapIdStrFunc'
}
A function that will be called in Gst.Structure.prototype.filter_and_map_in_place_id_str. The function may modify value, and the value will be removed from the structure if false is returned.
Since : 1.26
Gst.StructureFilterMapIdStrFunc
def Gst.StructureFilterMapIdStrFunc (fieldname, value, *user_data):
#python wrapper for 'GstStructureFilterMapIdStrFunc'
A function that will be called in Gst.Structure.filter_and_map_in_place_id_str. The function may modify value, and the value will be removed from the structure if False is returned.
Since : 1.26
GstStructureForeachFunc
gboolean (*GstStructureForeachFunc) (GQuark field_id, const GValue * value, gpointer user_data)
A function that will be called in gst_structure_foreach. The function may not modify value.
Parameters:
field_id
–
the GQuark of the field name
value
–
the GValue of the field
user_data
–
user data
Gst.StructureForeachFunc
function Gst.StructureForeachFunc(field_id: GLib.Quark, value: GObject.Value, user_data: Object): {
// javascript wrapper for 'GstStructureForeachFunc'
}
A function that will be called in Gst.Structure.prototype.foreach. The function may not modify value.
Gst.StructureForeachFunc
def Gst.StructureForeachFunc (field_id, value, *user_data):
#python wrapper for 'GstStructureForeachFunc'
A function that will be called in Gst.Structure.foreach. The function may not modify value.
GstStructureForeachIdStrFunc
gboolean (*GstStructureForeachIdStrFunc) (const GstIdStr * fieldname, const GValue * value, gpointer user_data)
A function that will be called in gst_structure_foreach_id_str. The function may not modify value.
Parameters:
fieldname
–
the GstIdStr field name
value
–
the GValue of the field
user_data
–
user data
Since : 1.26
Gst.StructureForeachIdStrFunc
function Gst.StructureForeachIdStrFunc(fieldname: Gst.IdStr, value: GObject.Value, user_data: Object): {
// javascript wrapper for 'GstStructureForeachIdStrFunc'
}
A function that will be called in Gst.Structure.prototype.foreach_id_str. The function may not modify value.
Since : 1.26
Gst.StructureForeachIdStrFunc
def Gst.StructureForeachIdStrFunc (fieldname, value, *user_data):
#python wrapper for 'GstStructureForeachIdStrFunc'
A function that will be called in Gst.Structure.foreach_id_str. The function may not modify value.
Since : 1.26
GstStructureMapFunc
gboolean (*GstStructureMapFunc) (GQuark field_id, GValue * value, gpointer user_data)
A function that will be called in gst_structure_map_in_place. The function may modify value.
Parameters:
field_id
–
the GQuark of the field name
value
–
the GValue of the field
user_data
–
user data
Gst.StructureMapFunc
function Gst.StructureMapFunc(field_id: GLib.Quark, value: GObject.Value, user_data: Object): {
// javascript wrapper for 'GstStructureMapFunc'
}
A function that will be called in Gst.Structure.prototype.map_in_place. The function may modify value.
Gst.StructureMapFunc
def Gst.StructureMapFunc (field_id, value, *user_data):
#python wrapper for 'GstStructureMapFunc'
A function that will be called in Gst.Structure.map_in_place. The function may modify value.
GstStructureMapIdStrFunc
gboolean (*GstStructureMapIdStrFunc) (const GstIdStr * fieldname, GValue * value, gpointer user_data)
A function that will be called in gst_structure_map_in_place_id_str. The function may modify value.
Parameters:
fieldname
–
the GstIdStr field name
value
–
the GValue of the field
user_data
–
user data
Since : 1.26
Gst.StructureMapIdStrFunc
function Gst.StructureMapIdStrFunc(fieldname: Gst.IdStr, value: GObject.Value, user_data: Object): {
// javascript wrapper for 'GstStructureMapIdStrFunc'
}
A function that will be called in Gst.Structure.prototype.map_in_place_id_str. The function may modify value.
Since : 1.26
Gst.StructureMapIdStrFunc
def Gst.StructureMapIdStrFunc (fieldname, value, *user_data):
#python wrapper for 'GstStructureMapIdStrFunc'
A function that will be called in Gst.Structure.map_in_place_id_str. The function may modify value.
Since : 1.26
The results of the search are