diff --git a/girs/Gst-1.0.gir b/girs/Gst-1.0.gir index 900c67dcb1..882c25c2ce 100644 --- a/girs/Gst-1.0.gir +++ b/girs/Gst-1.0.gir @@ -45557,6 +45557,21 @@ structure name and for all fields that are existing in @superset, </parameter> </parameters> </method> + <method name="is_writable" c:identifier="gst_structure_is_writable" version="1.28"> + <doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gststructure.c">Checks if the structure is writable. %TRUE if parent +is not set or its refcount is 1, %FALSE otherwise.</doc> + <source-position filename="../subprojects/gstreamer/gst/gststructure.h"/> + <return-value transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gststructure.c">%TRUE if the structure is writable.</doc> + <type name="gboolean" c:type="gboolean"/> + </return-value> + <parameters> + <instance-parameter name="structure" transfer-ownership="none"> + <doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gststructure.c">a #GstStructure</doc> + <type name="Structure" c:type="const GstStructure*"/> + </instance-parameter> + </parameters> + </method> <method name="map_in_place" c:identifier="gst_structure_map_in_place" deprecated="1" deprecated-version="1.26"> <doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gststructure.c">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 diff --git a/subprojects/gstreamer/gst/gststructure.c b/subprojects/gstreamer/gst/gststructure.c index c2f80b4302..bf8ef82e51 100644 --- a/subprojects/gstreamer/gst/gststructure.c +++ b/subprojects/gstreamer/gst/gststructure.c @@ -4684,3 +4684,23 @@ gst_structure_get_flags (const GstStructure * structure, return TRUE; } + + +/** + * gst_structure_is_writable: + * @structure: a #GstStructure + * + * Checks if the structure is writable. %TRUE if parent + * is not set or its refcount is 1, %FALSE otherwise. + * + * Returns: %TRUE if the structure is writable. + * + * Since: 1.28 + */ +gboolean +gst_structure_is_writable (const GstStructure * structure) +{ + g_return_val_if_fail (GST_IS_STRUCTURE (structure), FALSE); + + return IS_MUTABLE (structure); +} diff --git a/subprojects/gstreamer/gst/gststructure.h b/subprojects/gstreamer/gst/gststructure.h index dcad0eaa97..d85990f3dc 100644 --- a/subprojects/gstreamer/gst/gststructure.h +++ b/subprojects/gstreamer/gst/gststructure.h @@ -582,6 +582,9 @@ GST_API GstStructure * gst_structure_intersect (const GstStructure * struct1, const GstStructure * struct2) G_GNUC_MALLOC; +GST_API +gboolean gst_structure_is_writable (const GstStructure * structure); + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstStructure, gst_structure_free) G_END_DECLS