*
* Get the value of the field with name @fieldname.
*
- * Returns: the #GValue corresponding to the field with the given name.
+ * Returns: (nullable): the #GValue corresponding to the field with the given
+ * name.
*/
const GValue *
gst_structure_get_value (const GstStructure * structure,
*
* Get the value of the field with GQuark @field.
*
- * Returns: the #GValue corresponding to the field with the given name
- * identifier.
+ * Returns: (nullable): the #GValue corresponding to the field with the given
+ * name identifier.
*/
const GValue *
gst_structure_id_get_value (const GstStructure * structure, GQuark field)
if (t) {
g_string_append (s, t);
g_free (t);
+ } else if (G_TYPE_CHECK_VALUE_TYPE (&field->value, G_TYPE_POINTER)) {
+ gpointer ptr = g_value_get_pointer (&field->value);
+
+ if (!ptr)
+ g_string_append (s, "NULL");
+ else
+ g_string_append_printf (s, "%p", ptr);
} else {
- if (!G_TYPE_CHECK_VALUE_TYPE (&field->value, G_TYPE_STRING) &&
- !(G_TYPE_CHECK_VALUE_TYPE (&field->value, G_TYPE_POINTER) &&
- g_value_get_pointer (&field->value) == NULL))
+ if (!G_TYPE_CHECK_VALUE_TYPE (&field->value, G_TYPE_STRING))
GST_WARNING ("No value transform to serialize field '%s' of type '%s'",
g_quark_to_string (field->name),
_priv_gst_value_gtype_to_abbr (type));
*
* Intersects @struct1 and @struct2 and returns the intersection.
*
- * Returns: Intersection of @struct1 and @struct2
+ * Returns: (nullable): Intersection of @struct1 and @struct2
*/
GstStructure *
gst_structure_intersect (const GstStructure * struct1,