diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index be4f43773c..403c72f887 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -1707,7 +1707,7 @@ gst_object_set_name gst_object_get_name gst_object_set_parent gst_object_get_parent -gst_object_has_parent +gst_object_has_as_parent gst_object_unparent gst_object_default_deep_notify gst_object_default_error diff --git a/gst/gstobject.c b/gst/gstobject.c index 198a7dbd3f..c24e435924 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -779,7 +779,7 @@ gst_object_unparent (GstObject * object) } /** - * gst_object_has_parent: + * gst_object_has_as_parent: * @object: a #GstObject to check * @parent: a #GstObject to check as parent * @@ -793,7 +793,7 @@ gst_object_unparent (GstObject * object) * Since: 1.6 */ gboolean -gst_object_has_parent (GstObject * object, GstObject * parent) +gst_object_has_as_parent (GstObject * object, GstObject * parent) { gboolean result = FALSE; diff --git a/gst/gstobject.h b/gst/gstobject.h index b9e6661ecc..6c41a69296 100644 --- a/gst/gstobject.h +++ b/gst/gstobject.h @@ -212,7 +212,7 @@ gchar* gst_object_get_name (GstObject *object); gboolean gst_object_set_parent (GstObject *object, GstObject *parent); GstObject* gst_object_get_parent (GstObject *object); void gst_object_unparent (GstObject *object); -gboolean gst_object_has_parent (GstObject *object, GstObject *parent); +gboolean gst_object_has_as_parent (GstObject *object, GstObject *parent); gboolean gst_object_has_ancestor (GstObject *object, GstObject *ancestor); void gst_object_default_deep_notify (GObject *object, GstObject *orig, diff --git a/tests/check/gst/gstobject.c b/tests/check/gst/gstobject.c index d02e357424..e405566422 100644 --- a/tests/check/gst/gstobject.c +++ b/tests/check/gst/gstobject.c @@ -361,9 +361,9 @@ GST_START_TEST (test_fake_object_parentage) fail_if (result, "GstFakeObject accepted itself as parent"); /* _has_parent always returns FALSE if there is no parent */ - fail_if (gst_object_has_parent (object1, NULL)); - fail_if (gst_object_has_parent (NULL, object1)); - fail_if (gst_object_has_parent (object1, object1)); + fail_if (gst_object_has_as_parent (object1, NULL)); + fail_if (gst_object_has_as_parent (NULL, object1)); + fail_if (gst_object_has_as_parent (object1, object1)); /* should still be floating */ fail_unless (g_object_is_floating (object1), @@ -378,7 +378,7 @@ GST_START_TEST (test_fake_object_parentage) fail_unless (g_object_is_floating (object1), "GstFakeObject instance is not floating"); - result = gst_object_has_parent (object1, object2); + result = gst_object_has_as_parent (object1, object2); fail_if (result, "GstFakeObject has a parent"); /* try to set other object as parent */ @@ -393,16 +393,16 @@ GST_START_TEST (test_fake_object_parentage) "GstFakeObject instance is not floating"); /* check the parent */ - fail_unless (gst_object_has_parent (object1, object2)); + fail_unless (gst_object_has_as_parent (object1, object2)); /* any other combination is invalid */ - fail_if (gst_object_has_parent (object2, object1)); - fail_if (gst_object_has_parent (object1, NULL)); - fail_if (gst_object_has_parent (object2, NULL)); - fail_if (gst_object_has_parent (NULL, object1)); - fail_if (gst_object_has_parent (NULL, object2)); - fail_if (gst_object_has_parent (object1, object1)); - fail_if (gst_object_has_parent (object2, object2)); + fail_if (gst_object_has_as_parent (object2, object1)); + fail_if (gst_object_has_as_parent (object1, NULL)); + fail_if (gst_object_has_as_parent (object2, NULL)); + fail_if (gst_object_has_as_parent (NULL, object1)); + fail_if (gst_object_has_as_parent (NULL, object2)); + fail_if (gst_object_has_as_parent (object1, object1)); + fail_if (gst_object_has_as_parent (object2, object2)); /* try to set other object as parent again */ result = gst_object_set_parent (object1, object2); @@ -489,40 +489,40 @@ GST_START_TEST (test_fake_object_has_ancestor) */ /* An object isn't its own parent, but it is its own ancestor */ - fail_if (gst_object_has_parent (object1, object1)); + fail_if (gst_object_has_as_parent (object1, object1)); fail_unless (gst_object_has_ancestor (object1, object1)); - fail_if (gst_object_has_parent (object4, object4)); + fail_if (gst_object_has_as_parent (object4, object4)); fail_unless (gst_object_has_ancestor (object4, object4)); /* direct parents */ - fail_unless (gst_object_has_parent (object1, object3)); + fail_unless (gst_object_has_as_parent (object1, object3)); fail_unless (gst_object_has_ancestor (object1, object3)); - fail_unless (gst_object_has_parent (object2, object3)); + fail_unless (gst_object_has_as_parent (object2, object3)); fail_unless (gst_object_has_ancestor (object2, object3)); - fail_unless (gst_object_has_parent (object3, object4)); + fail_unless (gst_object_has_as_parent (object3, object4)); fail_unless (gst_object_has_ancestor (object3, object4)); /* grandparents */ - fail_if (gst_object_has_parent (object1, object4)); + fail_if (gst_object_has_as_parent (object1, object4)); fail_unless (gst_object_has_ancestor (object1, object4)); - fail_if (gst_object_has_parent (object2, object4)); + fail_if (gst_object_has_as_parent (object2, object4)); fail_unless (gst_object_has_ancestor (object2, object4)); /* not ancestors */ - fail_if (gst_object_has_parent (object1, object2)); + fail_if (gst_object_has_as_parent (object1, object2)); fail_if (gst_object_has_ancestor (object1, object2)); - fail_if (gst_object_has_parent (object3, object1)); + fail_if (gst_object_has_as_parent (object3, object1)); fail_if (gst_object_has_ancestor (object3, object1)); - fail_if (gst_object_has_parent (object4, object1)); + fail_if (gst_object_has_as_parent (object4, object1)); fail_if (gst_object_has_ancestor (object4, object1)); - fail_if (gst_object_has_parent (object4, object3)); + fail_if (gst_object_has_as_parent (object4, object3)); fail_if (gst_object_has_ancestor (object4, object3)); /* unparent everything */ diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def index 63486b6813..fbccec0ad9 100644 --- a/win32/common/libgstreamer.def +++ b/win32/common/libgstreamer.def @@ -781,7 +781,7 @@ EXPORTS gst_object_get_value_array gst_object_has_active_control_bindings gst_object_has_ancestor - gst_object_has_parent + gst_object_has_as_parent gst_object_ref gst_object_ref_sink gst_object_remove_control_binding