typedef struct _GstStructure GstStructure;
typedef gboolean (*GstStructureForeachFunc) (GQuark field_id,
+ const GValue * value,
+ gpointer user_data);
+
+typedef gboolean (*GstStructureMapFunc) (GQuark field_id,
GValue * value,
gpointer user_data);
struct _GstStructure {
GType type;
+ /*< private >*/
GQuark name;
+ /* owned by parent structure, NULL if no parent */
+ GstAtomicInt *parent_refcount;
+
GArray *fields;
gpointer _gst_reserved[GST_PADDING];
const gchar * firstfield,
va_list varargs);
GstStructure * gst_structure_copy (const GstStructure *structure);
+void gst_structure_set_parent_refcount (GstStructure *structure,
+ GstAtomicInt *refcount);
void gst_structure_free (GstStructure *structure);
G_CONST_RETURN gchar * gst_structure_get_name (const GstStructure *structure);
GType gst_structure_get_field_type (const GstStructure *structure,
const gchar *fieldname);
-gboolean gst_structure_foreach (GstStructure *structure,
+gboolean gst_structure_foreach (const GstStructure *structure,
GstStructureForeachFunc func,
gpointer user_data);
+gboolean gst_structure_map_in_place (GstStructure *structure,
+ GstStructureMapFunc func,
+ gpointer user_data);
gint gst_structure_n_fields (const GstStructure *structure);
gboolean gst_structure_has_field (const GstStructure *structure,
const gchar *fieldname);
GstStructure * gst_structure_from_string (const gchar *string,
gchar **end);
+gboolean gst_caps_structure_fixate_field_nearest_int (GstStructure *structure,
+ const char *field_name,
+ int target);
+gboolean gst_caps_structure_fixate_field_nearest_double (GstStructure *structure,
+ const char *field_name,
+ double target);
+
+
G_END_DECLS
#endif