Package ch.bailu.gtk.gst
Klasse Structure
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gst.Structure
- Alle implementierten Schnittstellen:
PointerInterface
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](GST_TYPE_ARRAY) are inside "less and greater than" (`<` and
`>`). For example `a-structure, array=<1, 2, 3>
- Ranges are inside brackets (`[` and `]`). For example `a-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](GST_TYPE_LIST) are inside curly brackets (`{` and `}`).
For example `a-structure, list={1, 2, 3}`
- [GStrv](G_TYPE_STRV) are inside "less and greater than" (`<` and
`>`) and each string is double-quoted.
For example `a-structure, strv=(GStrv)<"foo", "bar">`. Since 1.26.0.
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.
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](GST_TYPE_ARRAY) are inside "less and greater than" (`<` and
`>`). For example `a-structure, array=<1, 2, 3>
- Ranges are inside brackets (`[` and `]`). For example `a-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](GST_TYPE_LIST) are inside curly brackets (`{` and `}`).
For example `a-structure, list={1, 2, 3}`
- [GStrv](G_TYPE_STRV) are inside "less and greater than" (`<` and
`>`) and each string is double-quoted.
For example `a-structure, strv=(GStrv)<"foo", "bar">`. Since 1.26.0.
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.
https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
static interface
static interface
static interface
static interface
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
canIntersect
(Structure struct2) Tries intersecting @struct1 and @struct2 and reports whether the result
would not be empty.copy()
Duplicates a #GstStructure and all its fields and values.void
filterAndMapInPlace
(Structure.OnStructureFilterMapFunc func, Pointer user_data) Veraltet.void
filterAndMapInPlaceIdStr
(Structure.OnStructureFilterMapIdStrFunc func, Pointer user_data) Calls the provided function once for each field in the #GstStructure.void
fixate()
Fixate all values in @structure using gst_value_fixate().boolean
fixateField
(Str field_name) Fixates a #GstStructure by changing the given field with its fixated value.boolean
fixateField
(String field_name) Fixates a #GstStructure by changing the given field with its fixated value.boolean
fixateFieldBoolean
(Str field_name, boolean target) Fixates a #GstStructure by changing the given @field_name field to the given
@target boolean if that field is not fixed yet.boolean
fixateFieldBoolean
(String field_name, boolean target) Fixates a #GstStructure by changing the given @field_name field to the given
@target boolean if that field is not fixed yet.boolean
fixateFieldNearestDouble
(Str 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.boolean
fixateFieldNearestDouble
(String 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.boolean
fixateFieldNearestInt
(Str 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.boolean
fixateFieldNearestInt
(String 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.boolean
fixateFieldString
(Str field_name, Str target) Fixates a #GstStructure by changing the given @field_name field to the given
@target string if that field is not fixed yet.boolean
fixateFieldString
(String field_name, String target) Fixates a #GstStructure by changing the given @field_name field to the given
@target string if that field is not fixed yet.boolean
foreach
(Structure.OnStructureForeachFunc func, Pointer user_data) Veraltet.boolean
foreachIdStr
(Structure.OnStructureForeachIdStrFunc func, Pointer user_data) Calls the provided function once for each field in the #GstStructure.void
free()
Frees a #GstStructure and all its fields and values.boolean
Parses the variable arguments and reads fields from @structure accordingly.boolean
Parses the variable arguments and reads fields from @structure accordingly.boolean
getBoolean
(Str fieldname, Int value) Sets the boolean pointed to by @value corresponding to the value of the
given field.boolean
getBoolean
(String fieldname, Int value) Sets the boolean pointed to by @value corresponding to the value of the
given field.static ClassHandler
boolean
Sets the double pointed to by @value corresponding to the value of the
given field.boolean
Sets the double pointed to by @value corresponding to the value of the
given field.boolean
Sets the int pointed to by @value corresponding to the value of the
given field.boolean
Sets the int pointed to by @value corresponding to the value of the
given field.int
long
the GType of a structurelong
getFieldType
(Str fieldname) Finds the field with the given name, and returns the type of the
value it contains.long
getFieldType
(String fieldname) Finds the field with the given name, and returns the type of the
value it contains.boolean
getFraction
(Str fieldname, Int value_numerator, Int value_denominator) Sets the integers pointed to by @value_numerator and @value_denominator
corresponding to the value of the given field.boolean
getFraction
(String fieldname, Int value_numerator, Int value_denominator) Sets the integers pointed to by @value_numerator and @value_denominator
corresponding to the value of the given field.static int
boolean
Sets the int pointed to by @value corresponding to the value of the
given field.boolean
Sets the int pointed to by @value corresponding to the value of the
given field.getName()
Get the name of @structure as a string.int
Veraltet.Get the name of @structure as a GstIdStr.static long
static TypeSystem.TypeSize
Finds the field corresponding to @fieldname, and returns the string
contained in the field's value.Finds the field corresponding to @fieldname, and returns the string
contained in the field's value.static long
static TypeSystem.TypeSize
Get the value of the field with name @fieldname.Get the value of the field with name @fieldname.boolean
Check if @structure contains a field named @fieldname.boolean
Check if @structure contains a field named @fieldname.boolean
hasFieldTyped
(Str fieldname, long type) Check if @structure contains a field named @fieldname and with GType @type.boolean
hasFieldTyped
(String fieldname, long type) Check if @structure contains a field named @fieldname and with GType @type.boolean
Checks if the structure has the given nameboolean
Checks if the structure has the given nameboolean
Veraltet.idGetValue
(int field) Get the value of the field with GQuark @field.boolean
idHasField
(int field) Veraltet.boolean
idHasFieldTyped
(int field, long type) Veraltet.void
Veraltet.void
idSetValue
(int field, Value value) Veraltet.boolean
Parses the variable arguments and reads fields from @structure accordingly.long
idStrGetFieldType
(IdStr fieldname) Finds the field with the given name, and returns the type of the
value it contains.idStrGetValue
(IdStr fieldname) Get the value of the field with name @fieldname.boolean
idStrHasField
(IdStr fieldname) Check if @structure contains a field named @fieldname.boolean
idStrHasFieldTyped
(IdStr fieldname, long type) Check if @structure contains a field named @fieldname and with GType @type.idStrNthFieldName
(int index) Get the name (as a GstIdStr) of the given field number,
counting from 0 onwards.void
idStrRemoveField
(IdStr fieldname) Removes the field with the given name.void
idStrRemoveFields
(IdStr fieldname, Object... _ellipsis) Removes the fields with the given names.void
Identical to gst_structure_set, except that field names are
passed using a GstIdStr for the field name.void
idStrSetValue
(IdStr fieldname, Value value) Sets the field with the given name @field to @value.void
idStrTakeValue
(IdStr fieldname, Value value) Sets the field with the given GstIdStr @field to @value.void
idTakeValue
(int field, Value value) Veraltet.Intersects @struct1 and @struct2 and returns the intersection.boolean
Tests if the two #GstStructure are equal.boolean
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.boolean
mapInPlace
(Structure.OnStructureMapFunc func, Pointer user_data) Veraltet.boolean
mapInPlaceIdStr
(Structure.OnStructureMapIdStrFunc func, Pointer user_data) Calls the provided function once for each field in the #GstStructure.static Structure
newEmptyStructure
(Str name) Creates a new, empty #GstStructure with the given @name.static Structure
newEmptyStructure
(String name) Creates a new, empty #GstStructure with the given @name.static Structure
newFromStringStructure
(Str string) Creates a #GstStructure from a string representation.static Structure
newFromStringStructure
(String string) Creates a #GstStructure from a string representation.static Structure
newIdEmptyStructure
(int quark) Veraltet.static Structure
newIdStrEmptyStructure
(IdStr name) Creates a new, empty #GstStructure with the given name.static Structure
newIdStrStructure
(IdStr name, IdStr fieldname, Object... _ellipsis) 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().static Structure
newIdStructure
(int name_quark, int field_quark, Object... _ellipsis) Veraltet.static Structure
Creates a new, empty #GstStructure with the given @name.static Structure
Creates a new, empty #GstStructure with the given @name.static Structure
newStaticStrStructure
(Str name, Str firstfield, Object... _ellipsis) Creates a new #GstStructure with the given name.static Structure
newStaticStrStructure
(String name, String firstfield, Object... _ellipsis) Creates a new #GstStructure with the given name.int
nFields()
Get the number of fields in the structure.nthFieldName
(int index) Get the name of the given field number, counting from 0 onwards.void
Removes all fields in a GstStructure.void
removeField
(Str fieldname) Removes the field with the given name.void
removeField
(String fieldname) Removes the field with the given name.void
removeFields
(Str fieldname, Object... _ellipsis) Removes the fields with the given names.void
removeFields
(String fieldname, Object... _ellipsis) Removes the fields with the given names.serialize
(int flags) Veraltet.serializeFull
(int flags) Alias for gst_structure_serialize() but with nullable annotation because it
can return %NULL when %GST_SERIALIZE_FLAG_STRICT flag is set.void
Parses the variable arguments and sets fields accordingly.void
Parses the variable arguments and sets fields accordingly.void
setArray
(Str fieldname, ValueArray array) This is useful in language bindings where unknown GValue types are not
supported.void
setArray
(String fieldname, ValueArray array) This is useful in language bindings where unknown GValue types are not
supported.void
setFieldType
(long type) the GType of a structurevoid
setList
(Str fieldname, ValueArray array) This is useful in language bindings where unknown GValue types are not
supported.void
setList
(String fieldname, ValueArray array) This is useful in language bindings where unknown GValue types are not
supported.void
Sets the name of the structure to the given @name.void
Sets the name of the structure to the given @name.void
setNameIdStr
(IdStr name) Sets the name of the structure to the given @name.void
setNameStaticStr
(Str name) Sets the name of the structure to the given @name.void
setNameStaticStr
(String name) Sets the name of the structure to the given @name.boolean
setParentRefcount
(Int refcount) Sets the parent_refcount field of #GstStructure.void
setStaticStr
(Str fieldname, Object... _ellipsis) Parses the variable arguments and sets fields accordingly.void
setStaticStr
(String fieldname, Object... _ellipsis) Parses the variable arguments and sets fields accordingly.void
Sets the field with the given name @field to @value.void
Sets the field with the given name @field to @value.void
setValueStaticStr
(Str fieldname, Value value) Sets the field with the given name @field to @value.void
setValueStaticStr
(String fieldname, Value value) Sets the field with the given name @field to @value.void
Sets the field with the given name @field to @value.void
Sets the field with the given name @field to @value.void
takeValueStaticStr
(Str fieldname, Value value) Sets the field with the given name @field to @value.void
takeValueStaticStr
(String fieldname, Value value) Sets the field with the given name @field to @value.toStr()
Converts @structure to a human-readable string representation.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
Konstruktordetails
-
Structure
-
Structure
public Structure() -
Structure
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- Parameter:
name
- name of new structurefirstfield
- name of first field to set_ellipsis
- additional arguments
-
Structure
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- Parameter:
name
- name of new structurefirstfield
- name of first field to set_ellipsis
- additional arguments
-
-
Methodendetails
-
getClassHandler
-
setFieldType
public void setFieldType(long type) the GType of a structure -
getFieldType
public long getFieldType()the GType of a structure -
getFieldName
public int getFieldName() -
newEmptyStructure
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- Parameter:
name
- name of new structure- Gibt zurück:
- a new, empty #GstStructure
-
newEmptyStructure
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- Parameter:
name
- name of new structure- Gibt zurück:
- a new, empty #GstStructure
-
newFromStringStructure
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- Parameter:
string
- a string representation of a #GstStructure- Gibt zurück:
- a new #GstStructure or %NULL when the string could not be parsed. Free with gst_structure_free() after use.
-
newFromStringStructure
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- Parameter:
string
- a string representation of a #GstStructure- Gibt zurück:
- a new #GstStructure or %NULL when the string could not be parsed. Free with gst_structure_free() after use.
-
newIdStructure
@Deprecated public static Structure newIdStructure(int name_quark, int field_quark, Object... _ellipsis) Veraltet.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- Parameter:
name_quark
- name of new structurefield_quark
- the GQuark for the name of the field to set_ellipsis
- variable arguments- Gibt zurück:
- a new #GstStructure
-
newIdEmptyStructure
Veraltet.Creates a new, empty #GstStructure with the given name as a GQuark.
Free-function: gst_structure_free- Parameter:
quark
- name of new structure- Gibt zurück:
- a new, empty #GstStructure
-
newIdStrStructure
public static Structure newIdStrStructure(@Nonnull IdStr name, @Nonnull IdStr fieldname, Object... _ellipsis) 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- Parameter:
name
- name of new structurefieldname
- the GstIdStr for the name of the field to set_ellipsis
- variable arguments- Gibt zurück:
- a new #GstStructure
-
newIdStrEmptyStructure
Creates a new, empty #GstStructure with the given name.
Free-function: gst_structure_free- Parameter:
name
- name of new structure- Gibt zurück:
- a new, empty #GstStructure
-
newStaticStrStructure
public static Structure newStaticStrStructure(@Nonnull Str name, @Nonnull Str firstfield, Object... _ellipsis) 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- Parameter:
name
- name of new structurefirstfield
- name of first field to set_ellipsis
- additional arguments- Gibt zurück:
- a new #GstStructure
-
newStaticStrStructure
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- Parameter:
name
- name of new structurefirstfield
- name of first field to set_ellipsis
- additional arguments- Gibt zurück:
- a new #GstStructure
-
newStaticStrEmptyStructure
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- Parameter:
name
- name of new structure- Gibt zurück:
- a new, empty #GstStructure
-
newStaticStrEmptyStructure
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- Parameter:
name
- name of new structure- Gibt zurück:
- a new, empty #GstStructure
-
canIntersect
Tries intersecting @struct1 and @struct2 and reports whether the result
would not be empty.- Parameter:
struct2
- a #GstStructure- Gibt zurück:
- %TRUE if intersection would not be empty
-
copy
Duplicates a #GstStructure and all its fields and values.
Free-function: gst_structure_free- Gibt zurück:
- a new #GstStructure.
-
filterAndMapInPlace
@Deprecated public void filterAndMapInPlace(Structure.OnStructureFilterMapFunc func, @Nullable Pointer user_data) Veraltet.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.- Parameter:
func
- a function to call for each fielduser_data
- private data
-
filterAndMapInPlaceIdStr
public void filterAndMapInPlaceIdStr(Structure.OnStructureFilterMapIdStrFunc func, @Nullable Pointer 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.- Parameter:
func
- a function to call for each fielduser_data
- private data
-
fixate
public void fixate()Fixate all values in @structure using gst_value_fixate().
@structure will be modified in-place and should be writable. -
fixateField
Fixates a #GstStructure by changing the given field with its fixated value.- Parameter:
field_name
- a field in @structure- Gibt zurück:
- %TRUE if the structure field could be fixated
-
fixateField
Fixates a #GstStructure by changing the given field with its fixated value.- Parameter:
field_name
- a field in @structure- Gibt zurück:
- %TRUE if the structure field could be fixated
-
fixateFieldBoolean
Fixates a #GstStructure by changing the given @field_name field to the given
@target boolean if that field is not fixed yet.- Parameter:
field_name
- a field in @structuretarget
- the target value of the fixation- Gibt zurück:
- %TRUE if the structure could be fixated
-
fixateFieldBoolean
Fixates a #GstStructure by changing the given @field_name field to the given
@target boolean if that field is not fixed yet.- Parameter:
field_name
- a field in @structuretarget
- the target value of the fixation- Gibt zurück:
- %TRUE if the structure could be fixated
-
fixateFieldNearestDouble
Fixates a #GstStructure by changing the given field to the nearest
double to @target that is a subset of the existing field.- Parameter:
field_name
- a field in @structuretarget
- the target value of the fixation- Gibt zurück:
- %TRUE if the structure could be fixated
-
fixateFieldNearestDouble
Fixates a #GstStructure by changing the given field to the nearest
double to @target that is a subset of the existing field.- Parameter:
field_name
- a field in @structuretarget
- the target value of the fixation- Gibt zurück:
- %TRUE if the structure could be fixated
-
fixateFieldNearestInt
Fixates a #GstStructure by changing the given field to the nearest
integer to @target that is a subset of the existing field.- Parameter:
field_name
- a field in @structuretarget
- the target value of the fixation- Gibt zurück:
- %TRUE if the structure could be fixated
-
fixateFieldNearestInt
Fixates a #GstStructure by changing the given field to the nearest
integer to @target that is a subset of the existing field.- Parameter:
field_name
- a field in @structuretarget
- the target value of the fixation- Gibt zurück:
- %TRUE if the structure could be fixated
-
fixateFieldString
Fixates a #GstStructure by changing the given @field_name field to the given
@target string if that field is not fixed yet.- Parameter:
field_name
- a field in @structuretarget
- the target value of the fixation- Gibt zurück:
- %TRUE if the structure could be fixated
-
fixateFieldString
Fixates a #GstStructure by changing the given @field_name field to the given
@target string if that field is not fixed yet.- Parameter:
field_name
- a field in @structuretarget
- the target value of the fixation- Gibt zurück:
- %TRUE if the structure could be fixated
-
foreach
@Deprecated public boolean foreach(Structure.OnStructureForeachFunc func, @Nullable Pointer user_data) Veraltet.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().- Parameter:
func
- a function to call for each fielduser_data
- private data- Gibt zurück:
- %TRUE if the supplied function returns %TRUE For each of the fields, %FALSE otherwise.
-
foreachIdStr
public boolean foreachIdStr(Structure.OnStructureForeachIdStrFunc func, @Nullable Pointer 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().- Parameter:
func
- a function to call for each fielduser_data
- private data- Gibt zurück:
- %TRUE if the supplied function returns %TRUE For each of the fields, %FALSE otherwise.
-
free
public void free()Frees a #GstStructure and all its fields and values. The structure must not
have a parent when this function is called. -
get
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.- Parameter:
first_fieldname
- the name of the first field to read_ellipsis
- variable arguments- Gibt zurück:
- %FALSE if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise %TRUE.
-
get
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.- Parameter:
first_fieldname
- the name of the first field to read_ellipsis
- variable arguments- Gibt zurück:
- %FALSE if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise %TRUE.
-
getBoolean
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.- Parameter:
fieldname
- the name of a fieldvalue
- a pointer to a #gboolean to set- Gibt zurück:
- %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a boolean, this function returns %FALSE.
-
getBoolean
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.- Parameter:
fieldname
- the name of a fieldvalue
- a pointer to a #gboolean to set- Gibt zurück:
- %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a boolean, this function returns %FALSE.
-
getDouble
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.- Parameter:
fieldname
- the name of a fieldvalue
- a pointer to a gdouble to set- Gibt zurück:
- %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a double, this function returns %FALSE.
-
getDouble
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.- Parameter:
fieldname
- the name of a fieldvalue
- a pointer to a gdouble to set- Gibt zurück:
- %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a double, this function returns %FALSE.
-
getEnum
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.- Parameter:
fieldname
- the name of a fieldenumtype
- the enum type of a fieldvalue
- a pointer to an int to set- Gibt zurück:
- %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain an enum of the given type, this function returns %FALSE.
-
getEnum
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.- Parameter:
fieldname
- the name of a fieldenumtype
- the enum type of a fieldvalue
- a pointer to an int to set- Gibt zurück:
- %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain an enum of the given type, this function returns %FALSE.
-
getFieldType
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.- Parameter:
fieldname
- the name of the field- Gibt zurück:
- the #GValue of the field
-
getFieldType
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.- Parameter:
fieldname
- the name of the field- Gibt zurück:
- the #GValue of the field
-
getFraction
public boolean getFraction(@Nonnull Str fieldname, @Nonnull Int value_numerator, @Nonnull Int 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.- Parameter:
fieldname
- the name of a fieldvalue_numerator
- a pointer to an int to setvalue_denominator
- a pointer to an int to set- Gibt zurück:
- %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.
-
getFraction
public boolean getFraction(String fieldname, @Nonnull Int value_numerator, @Nonnull Int 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.- Parameter:
fieldname
- the name of a fieldvalue_numerator
- a pointer to an int to setvalue_denominator
- a pointer to an int to set- Gibt zurück:
- %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.
-
getInt
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.- Parameter:
fieldname
- the name of a fieldvalue
- a pointer to an int to set- Gibt zurück:
- %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain an int, this function returns %FALSE.
-
getInt
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.- Parameter:
fieldname
- the name of a fieldvalue
- a pointer to an int to set- Gibt zurück:
- %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain an int, this function returns %FALSE.
-
getName
Get the name of @structure as a string.- Gibt zurück:
- the name of the structure.
-
getNameId
Veraltet.Get the name of @structure as a GQuark.- Gibt zurück:
- the quark representing the name of the structure.
-
getNameIdStr
Get the name of @structure as a GstIdStr.- Gibt zurück:
- the name of the structure.
-
getString
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.- Parameter:
fieldname
- the name of a field- Gibt zurück:
- a pointer to the string or %NULL when the field did not exist or did not contain a string.
-
getString
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.- Parameter:
fieldname
- the name of a field- Gibt zurück:
- a pointer to the string or %NULL when the field did not exist or did not contain a string.
-
getValue
Get the value of the field with name @fieldname.- Parameter:
fieldname
- the name of the field to get- Gibt zurück:
- the #GValue corresponding to the field with the given name.
-
getValue
Get the value of the field with name @fieldname.- Parameter:
fieldname
- the name of the field to get- Gibt zurück:
- the #GValue corresponding to the field with the given name.
-
hasField
Check if @structure contains a field named @fieldname.- Parameter:
fieldname
- the name of a field- Gibt zurück:
- %TRUE if the structure contains a field with the given name
-
hasField
Check if @structure contains a field named @fieldname.- Parameter:
fieldname
- the name of a field- Gibt zurück:
- %TRUE if the structure contains a field with the given name
-
hasFieldTyped
Check if @structure contains a field named @fieldname and with GType @type.- Parameter:
fieldname
- the name of a fieldtype
- the type of a value- Gibt zurück:
- %TRUE if the structure contains a field with the given name and type
-
hasFieldTyped
Check if @structure contains a field named @fieldname and with GType @type.- Parameter:
fieldname
- the name of a fieldtype
- the type of a value- Gibt zurück:
- %TRUE if the structure contains a field with the given name and type
-
hasName
Checks if the structure has the given name- Parameter:
name
- structure name to check for- Gibt zurück:
- %TRUE if @name matches the name of the structure.
-
hasName
Checks if the structure has the given name- Parameter:
name
- structure name to check for- Gibt zurück:
- %TRUE if @name matches the name of the structure.
-
idGet
Veraltet.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.- Parameter:
first_field_id
- the quark of the first field to read_ellipsis
- variable arguments- Gibt zurück:
- %FALSE if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise %TRUE.
-
idGetValue
Get the value of the field with GQuark @field.- Parameter:
field
- the #GQuark of the field to get- Gibt zurück:
- the #GValue corresponding to the field with the given name identifier.
-
idHasField
Veraltet.Check if @structure contains a field named @field.- Parameter:
field
- #GQuark of the field name- Gibt zurück:
- %TRUE if the structure contains a field with the given name
-
idHasFieldTyped
Veraltet.Check if @structure contains a field named @field and with GType @type.- Parameter:
field
- #GQuark of the field nametype
- the type of a value- Gibt zurück:
- %TRUE if the structure contains a field with the given name and type
-
idSet
Veraltet.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.- Parameter:
fieldname
- the GQuark for the name of the field to set_ellipsis
- variable arguments
-
idSetValue
Veraltet.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.- Parameter:
field
- a #GQuark representing a fieldvalue
- the new value of the field
-
idStrGet
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.- Parameter:
first_fieldname
- the name of the first field to read_ellipsis
- variable arguments- Gibt zurück:
- %FALSE if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise %TRUE.
-
idStrGetFieldType
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.- Parameter:
fieldname
- the name of the field- Gibt zurück:
- the #GValue of the field
-
idStrGetValue
Get the value of the field with name @fieldname.- Parameter:
fieldname
- the name of the field to get- Gibt zurück:
- the #GValue corresponding to the field with the given name.
-
idStrHasField
Check if @structure contains a field named @fieldname.- Parameter:
fieldname
- the name of a field- Gibt zurück:
- %TRUE if the structure contains a field with the given name
-
idStrHasFieldTyped
Check if @structure contains a field named @fieldname and with GType @type.- Parameter:
fieldname
- the name of a fieldtype
- the type of a value- Gibt zurück:
- %TRUE if the structure contains a field with the given name and type
-
idStrNthFieldName
Get the name (as a GstIdStr) of the given field number,
counting from 0 onwards.- Parameter:
index
- the index to get the name of- Gibt zurück:
- the name of the given field number
-
idStrRemoveField
Removes the field with the given name. If the field with the given
name does not exist, the structure is unchanged.- Parameter:
fieldname
- the name of the field to remove
-
idStrRemoveFields
Removes the fields with the given names. If a field does not exist, the
argument is ignored.- Parameter:
fieldname
- the name of the field to remove_ellipsis
- %NULL-terminated list of more fieldnames to remove
-
idStrSet
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.- Parameter:
fieldname
- the the name of the field to set_ellipsis
- variable arguments
-
idStrSetValue
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
idStrTakeValue
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
idTakeValue
Veraltet.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.- Parameter:
field
- a #GQuark representing a fieldvalue
- the new value of the field
-
intersect
Intersects @struct1 and @struct2 and returns the intersection.- Parameter:
struct2
- a #GstStructure- Gibt zurück:
- Intersection of @struct1 and @struct2
-
isEqual
Tests if the two #GstStructure are equal.- Parameter:
structure2
- a #GstStructure.- Gibt zurück:
- %TRUE if the two structures have the same name and field.
-
isSubset
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.- Parameter:
superset
- a potentially greater #GstStructure- Gibt zurück:
- %TRUE if @subset is a subset of @superset
-
mapInPlace
@Deprecated public boolean mapInPlace(Structure.OnStructureMapFunc func, @Nullable Pointer user_data) Veraltet.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.- Parameter:
func
- a function to call for each fielduser_data
- private data- Gibt zurück:
- %TRUE if the supplied function returns %TRUE For each of the fields, %FALSE otherwise.
-
mapInPlaceIdStr
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.- Parameter:
func
- a function to call for each fielduser_data
- private data- Gibt zurück:
- %TRUE if the supplied function returns %TRUE For each of the fields, %FALSE otherwise.
-
nFields
public int nFields()Get the number of fields in the structure.- Gibt zurück:
- the number of fields in the structure
-
nthFieldName
Get the name of the given field number, counting from 0 onwards.- Parameter:
index
- the index to get the name of- Gibt zurück:
- the name of the given field number
-
removeAllFields
public void removeAllFields()Removes all fields in a GstStructure. -
removeField
Removes the field with the given name. If the field with the given
name does not exist, the structure is unchanged.- Parameter:
fieldname
- the name of the field to remove
-
removeField
Removes the field with the given name. If the field with the given
name does not exist, the structure is unchanged.- Parameter:
fieldname
- the name of the field to remove
-
removeFields
Removes the fields with the given names. If a field does not exist, the
argument is ignored.- Parameter:
fieldname
- the name of the field to remove_ellipsis
- %NULL-terminated list of more fieldnames to remove
-
removeFields
Removes the fields with the given names. If a field does not exist, the
argument is ignored.- Parameter:
fieldname
- the name of the field to remove_ellipsis
- %NULL-terminated list of more fieldnames to remove
-
serialize
Veraltet.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- Parameter:
flags
- The flags to use to serialize structure- Gibt zurück:
- a pointer to string allocated by g_malloc(). g_free() after usage.
-
serializeFull
Alias for gst_structure_serialize() but with nullable annotation because it
can return %NULL when %GST_SERIALIZE_FLAG_STRICT flag is set.- Parameter:
flags
- The flags to use to serialize structure- Gibt zurück:
- a pointer to string allocated by g_malloc(). g_free() after usage.
-
set
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.- Parameter:
fieldname
- the name of the field to set_ellipsis
- variable arguments
-
set
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.- Parameter:
fieldname
- the name of the field to set_ellipsis
- variable arguments
-
setArray
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.- Parameter:
fieldname
- the name of a fieldarray
- a pointer to a #GValueArray
-
setArray
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.- Parameter:
fieldname
- the name of a fieldarray
- a pointer to a #GValueArray
-
setList
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.- Parameter:
fieldname
- the name of a fieldarray
- a pointer to a #GValueArray
-
setList
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.- Parameter:
fieldname
- the name of a fieldarray
- a pointer to a #GValueArray
-
setName
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 "/-_.:".- Parameter:
name
- the new name of the structure
-
setName
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 "/-_.:".- Parameter:
name
- the new name of the structure
-
setNameIdStr
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 "/-_.:".- Parameter:
name
- the new name of the structure
-
setNameStaticStr
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.- Parameter:
name
- the new name of the structure
-
setNameStaticStr
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.- Parameter:
name
- the new name of the structure
-
setParentRefcount
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.- Parameter:
refcount
- a pointer to the parent's refcount- Gibt zurück:
- %TRUE if the parent refcount could be set.
-
setStaticStr
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.- Parameter:
fieldname
- the name of the field to set_ellipsis
- variable arguments
-
setStaticStr
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.- Parameter:
fieldname
- the name of the field to set_ellipsis
- variable arguments
-
setValue
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
setValue
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
setValueStaticStr
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
setValueStaticStr
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
takeValue
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
takeValue
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
takeValueStaticStr
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
takeValueStaticStr
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.- Parameter:
fieldname
- the name of the field to setvalue
- the new value of the field
-
toStr
Converts @structure to a human-readable string representation.
For debugging purposes its easier to do something like this:<!-- language="C" --> 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- Gibt zurück:
- a pointer to string allocated by g_malloc(). g_free() after usage.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-