summaryrefslogtreecommitdiff
path: root/gst/gststructure.h
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-12-16 16:31:21 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-12-16 18:22:46 +0100
commit1f6d5d3ff5cb03527acb99b4059788f53d49567e (patch)
tree7c08df46823d84aba0a99a9a3a74f7185138c4b8 /gst/gststructure.h
parent6925fa1b7ccdeda1a54d09ab98411a582bda0ddf (diff)
structure/caps: Add gst_{structure,caps}_filter_and_map_in_place()
https://bugzilla.gnome.org/show_bug.cgi?id=739765
Diffstat (limited to 'gst/gststructure.h')
-rw-r--r--gst/gststructure.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gst/gststructure.h b/gst/gststructure.h
index 6687970d8..014ef37e5 100644
--- a/gst/gststructure.h
+++ b/gst/gststructure.h
@@ -71,6 +71,23 @@ typedef gboolean (*GstStructureMapFunc) (GQuark field_id,
gpointer user_data);
/**
+ * GstStructureFilterMapFunc:
+ * @field_id: the #GQuark of the field name
+ * @value: the #GValue of the field
+ * @user_data: 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.
+ *
+ * Returns: %TRUE if the field should be preserved, %FALSE if it
+ * should be removed.
+ */
+typedef gboolean (*GstStructureFilterMapFunc) (GQuark field_id,
+ GValue * value,
+ gpointer user_data);
+
+/**
* GstStructure:
* @type: the GType of a structure
*
@@ -198,6 +215,10 @@ gboolean gst_structure_map_in_place (GstStructure *
GstStructureMapFunc func,
gpointer user_data);
+void gst_structure_filter_and_map_in_place (GstStructure * structure,
+ GstStructureFilterMapFunc func,
+ gpointer user_data);
+
gint gst_structure_n_fields (const GstStructure * structure);
const gchar * gst_structure_nth_field_name (const GstStructure * structure,