gst/gstelement.c: add documentation about a gobject quirk where the object hasn't the correct class pointer set on in...

Original commit message from CVS:
* gst/gstelement.c:
add documentation about a gobject quirk where the object hasn't the
correct class pointer set on initialization
* gst/schedulers/gstbasicscheduler.c:
(gst_basic_scheduler_src_wrapper):
make sure to not run into an infinite loop
This commit is contained in:
Benjamin Otte 2004-03-24 13:38:17 +00:00
parent 58a5ccec56
commit 0c01133df9
3 changed files with 20 additions and 3 deletions

View file

@ -1,3 +1,12 @@
2004-03-24 Benjamin Otte <otte@gnome.org>
* gst/gstelement.c:
add documentation about a gobject quirk where the object hasn't the
correct class pointer set on initialization
* gst/schedulers/gstbasicscheduler.c:
(gst_basic_scheduler_src_wrapper):
make sure to not run into an infinite loop
2004-03-22 Benjamin Otte <otte@gnome.org>
* gst/gstutils.c: (gst_util_dump_mem):

View file

@ -1398,6 +1398,9 @@ gst_element_class_set_details (GstElementClass * klass,
*
* Retrieves a list of the pad templates associated with @element_class. The
* list must not be modified by the calling code.
* <note>If you use this function in the #GInstanceInitFunc of an object class
* that has subclasses, make sure to pass the g_class parameter of the
* #GInstanceInitFunc here.</note>
*
* Returns: the #GList of padtemplates.
*/
@ -1416,6 +1419,9 @@ gst_element_class_get_pad_template_list (GstElementClass * element_class)
* @name: the name of the #GstPadTemplate to get.
*
* Retrieves a padtemplate from @element_class with the given name.
* <note>If you use this function in the #GInstanceInitFunc of an object class
* that has subclasses, make sure to pass the g_class parameter of the
* #GInstanceInitFunc here.</note>
*
* Returns: the #GstPadTemplate with the given name, or NULL if none was found.
* No unreferencing is necessary.

View file

@ -407,11 +407,13 @@ gst_basic_scheduler_src_wrapper (int argc, char **argv)
GList *pads;
GstRealPad *realpad;
GstData *data = NULL;
gboolean inf_loop;
G_GNUC_UNUSED const gchar *name = GST_ELEMENT_NAME (element);
GST_DEBUG ("entering src wrapper of element %s", name);
do {
inf_loop = TRUE;
pads = element->pads;
while (pads) {
@ -421,8 +423,8 @@ gst_basic_scheduler_src_wrapper (int argc, char **argv)
realpad = GST_REAL_PAD (pads->data);
pads = g_list_next (pads);
if (GST_RPAD_DIRECTION (realpad) == GST_PAD_SRC
&& GST_PAD_IS_USABLE (realpad)) {
if (GST_RPAD_DIRECTION (realpad) == GST_PAD_SRC) {
inf_loop = FALSE;
GST_CAT_DEBUG (debug_dataflow, "calling _getfunc for %s:%s",
GST_DEBUG_PAD_NAME (realpad));
g_return_val_if_fail (GST_RPAD_GETFUNC (realpad) != NULL, 0);
@ -434,7 +436,7 @@ gst_basic_scheduler_src_wrapper (int argc, char **argv)
}
}
}
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING (element));
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING (element) && !inf_loop);
GST_FLAG_UNSET (element, GST_ELEMENT_COTHREAD_STOPPING);