mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
gst/gstbin.c: Some documentation updates.
Original commit message from CVS: * gst/gstbin.c: (add_to_queue), (clear_queue), (reset_outdegree), (update_outdegree), (find_element), (gst_bin_sort_iterator_next), (gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free), (gst_bin_iterate_sorted), (gst_bin_element_set_state), (gst_bin_change_state), (gst_bin_dispose): Some documentation updates. Clean up dispose handlers. * gst/gstobject.c: (gst_object_ref), (gst_object_unref): * gst/gstpad.c: (gst_pad_dispose): Clean up dispose handler. * gst/gstpipeline.c: (gst_pipeline_change_state): Removed spurious UNLOCK.
This commit is contained in:
parent
6de84a3d83
commit
cacb844d6f
5 changed files with 36 additions and 25 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2005-09-28 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstbin.c: (add_to_queue), (clear_queue), (reset_outdegree),
|
||||
(update_outdegree), (find_element), (gst_bin_sort_iterator_next),
|
||||
(gst_bin_sort_iterator_resync), (gst_bin_sort_iterator_free),
|
||||
(gst_bin_iterate_sorted), (gst_bin_element_set_state),
|
||||
(gst_bin_change_state), (gst_bin_dispose):
|
||||
Some documentation updates.
|
||||
Clean up dispose handlers.
|
||||
|
||||
* gst/gstobject.c: (gst_object_ref), (gst_object_unref):
|
||||
* gst/gstpad.c: (gst_pad_dispose):
|
||||
Clean up dispose handler.
|
||||
|
||||
* gst/gstpipeline.c: (gst_pipeline_change_state):
|
||||
Removed spurious UNLOCK.
|
||||
|
||||
2005-09-27 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* docs/gst/gstreamer-sections.txt:
|
||||
|
|
17
gst/gstbin.c
17
gst/gstbin.c
|
@ -1053,6 +1053,14 @@ done:
|
|||
/***********************************************
|
||||
* Topologically sorted iterator
|
||||
* see http://en.wikipedia.org/wiki/Topological_sorting
|
||||
*
|
||||
* For each element in the graph, an entry is kept in a HashTable
|
||||
* with its number of srcpad connections (degree).
|
||||
* We then change state of all elements without dependencies
|
||||
* (degree 0) and decrement the degree of all elements connected
|
||||
* on the sinkpads. When an element reaches degree 0, its state is
|
||||
* changed next.
|
||||
* When all elements are handled the algorithm stops.
|
||||
*/
|
||||
typedef struct _GstBinSortIterator
|
||||
{
|
||||
|
@ -1201,7 +1209,7 @@ gst_bin_sort_iterator_next (GstBinSortIterator * bit, gpointer * result)
|
|||
/* we don't fail on this one yet */
|
||||
g_warning ("loop detected in the graph !!");
|
||||
}
|
||||
/* best unhandled elements, scheduler as next element */
|
||||
/* best unhandled element, schedule as next element */
|
||||
GST_DEBUG ("queue empty, next best: %s", GST_ELEMENT_NAME (bit->best));
|
||||
gst_object_ref (bit->best);
|
||||
HASH_SET_DEGREE (bit, bit->best, -1);
|
||||
|
@ -1458,9 +1466,10 @@ gst_bin_dispose (GObject * object)
|
|||
while (bin->children) {
|
||||
gst_bin_remove (bin, GST_ELEMENT (bin->children->data));
|
||||
}
|
||||
GST_CAT_DEBUG_OBJECT (GST_CAT_REFCOUNTING, object, "dispose no children");
|
||||
g_assert (bin->children == NULL);
|
||||
g_assert (bin->numchildren == 0);
|
||||
if (G_UNLIKELY (bin->children != NULL)) {
|
||||
g_critical ("could not remove elements from bin %s",
|
||||
GST_STR_NULL (GST_OBJECT_NAME (object)));
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
|
|
@ -376,7 +376,6 @@ gst_object_ref (gpointer object)
|
|||
g_atomic_int_inc (&((GstObject *) object)->refcount);
|
||||
PATCH_REFCOUNT (object);
|
||||
#else
|
||||
/* FIXME, not MT safe because glib is not MT safe */
|
||||
g_object_ref (object);
|
||||
#endif
|
||||
|
||||
|
@ -427,7 +426,6 @@ gst_object_unref (gpointer object)
|
|||
PATCH_REFCOUNT (object);
|
||||
}
|
||||
#else
|
||||
/* FIXME, not MT safe because glib is not MT safe */
|
||||
g_object_unref (object);
|
||||
#endif
|
||||
}
|
||||
|
|
24
gst/gstpad.c
24
gst/gstpad.c
|
@ -302,30 +302,17 @@ gst_pad_dispose (GObject * object)
|
|||
{
|
||||
GstPad *pad = GST_PAD (object);
|
||||
|
||||
gst_pad_set_pad_template (pad, NULL);
|
||||
/* FIXME, we have links to many other things like caps
|
||||
* and the peer pad... */
|
||||
|
||||
/* No linked pad can ever be disposed.
|
||||
* It has to have a parent to be linked
|
||||
* and a parent would hold a reference */
|
||||
/* FIXME: what about if g_object_dispose is explicitly called on the pad? Is
|
||||
that legal? otherwise we could assert GST_OBJECT_PARENT (pad) == NULL as
|
||||
well... */
|
||||
GST_CAT_DEBUG (GST_CAT_REFCOUNTING, "dispose %s:%s",
|
||||
GST_DEBUG_PAD_NAME (pad));
|
||||
|
||||
g_assert (GST_PAD_PEER (pad) == NULL);
|
||||
/* we don't hold a ref to the peer so we can just set the
|
||||
* peer to NULL. */
|
||||
GST_PAD_PEER (pad) = NULL;
|
||||
|
||||
/* clear the caps */
|
||||
gst_caps_replace (&GST_PAD_CAPS (pad), NULL);
|
||||
|
||||
if (GST_IS_ELEMENT (GST_OBJECT_PARENT (pad))) {
|
||||
GST_CAT_DEBUG (GST_CAT_REFCOUNTING, "removing pad from element '%s'",
|
||||
GST_OBJECT_NAME (GST_OBJECT (GST_ELEMENT (GST_OBJECT_PARENT (pad)))));
|
||||
|
||||
gst_element_remove_pad (GST_ELEMENT (GST_OBJECT_PARENT (pad)), pad);
|
||||
}
|
||||
gst_pad_set_pad_template (pad, NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -3287,7 +3274,8 @@ dropping:
|
|||
* @size: The length of the buffer
|
||||
* @buffer: a pointer to hold the #GstBuffer.
|
||||
*
|
||||
* Pulls a buffer from the peer pad. @pad must be linked.
|
||||
* Pulls a buffer from the peer pad. @pad must be a linked
|
||||
* sinkpad.
|
||||
*
|
||||
* Returns: a #GstFlowReturn from the peer pad.
|
||||
*
|
||||
|
|
|
@ -327,7 +327,6 @@ gst_pipeline_change_state (GstElement * element, GstStateChange transition)
|
|||
GST_TIME_ARGS (start_time), GST_TIME_ARGS (element->base_time));
|
||||
GST_UNLOCK (element);
|
||||
} else {
|
||||
GST_UNLOCK (element);
|
||||
GST_DEBUG ("no clock, using base time of 0");
|
||||
gst_element_set_base_time (element, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue