[Bug 739662] gstobject: Add gst_object_has_parent()

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jan 22 16:14:42 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=739662
  GStreamer | gstreamer (core) | git master

Julien Isorce <julien.isorce> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julien.isorce at gmail.com

--- Comment #12 from Julien Isorce <julien.isorce at gmail.com> 2015-01-23 00:14:34 UTC ---
Hehe!

In the first place I think the idea was to follow the gst_object_has_ancestor.
So that would make a reasonable reason to introduce gst_object_has_parent.

Then I think gst_object_is_parent is good but maybe it needs to switch parent
and child in parameter order.

So personally I would go for bool gst_object_is_parent_of(GstObject * object,
GstObject * child) 

Also bool gst_object_is_child_of(GstObject * object, GstObject * parent)

We could also have int gst_object_depth_of_ancestor(GstObject * object,
GstObject * ancestor) which returns -1 if not an ancestor, 0 if equal, and the
depth if it is.
Same with int gst_object_depth_of_descendant(GstObject * object, GstObject *
descendant) 

:)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list