fix for #147819 (Add some checks in the opt scheduler)

Original commit message from CVS:
fix for #147819 (Add some checks in the opt scheduler)
This commit is contained in:
Thomas Vander Stichele 2004-07-20 10:40:09 +00:00
parent f8e7ca6ea9
commit add97dd1ce
4 changed files with 25 additions and 9 deletions

View file

@ -1,3 +1,14 @@
2004-07-20 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Wim Taymans
* gst/schedulers/gstoptimalscheduler.c: (group_has_element),
(gst_opt_scheduler_schedule_run_queue),
(gst_opt_scheduler_get_wrapper), (get_group),
(group_migrate_connected):
* testsuite/schedulers/Makefile.am:
fix for #147819 (Add some checks in the opt scheduler)
2004-07-20 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Benjamin Otte

View file

@ -234,6 +234,7 @@ static void group_error_handler (GstOptSchedulerGroup * group);
static void group_element_set_enabled (GstOptSchedulerGroup * group,
GstElement * element, gboolean enabled);
static gboolean schedule_group (GstOptSchedulerGroup * group);
static void get_group (GstElement * element, GstOptSchedulerGroup ** group);
/*
@ -1203,7 +1204,13 @@ gst_opt_scheduler_schedule_run_queue (GstOptScheduler * osched)
GST_LOG_OBJECT (osched, "scheduling group %p", group);
res = schedule_group (group);
if (GST_OPT_SCHEDULER_GROUP_IS_ENABLED (group)) {
res = schedule_group (group);
} else {
GST_INFO_OBJECT (osched,
"group was disabled while it was on the queue, not scheduling");
res = TRUE;
}
if (!res) {
g_warning ("error scheduling group %p", group);
group_error_handler (group);
@ -1419,10 +1426,10 @@ gst_opt_scheduler_get_wrapper (GstPad * srcpad)
GST_LOG ("need to schedule the peer element");
/* else we need to schedule the peer element */
group = GST_ELEMENT_SCHED_GROUP (GST_PAD_PARENT (srcpad));
get_group (GST_PAD_PARENT (srcpad), &group);
if (group == NULL) {
/* wow, peer has no group */
g_warning ("peer without group detected");
GST_LOG ("peer without group detected");
//group_error_handler (group);
return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
}
@ -1610,8 +1617,6 @@ get_group (GstElement * element, GstOptSchedulerGroup ** group)
{
GstOptSchedulerCtx *ctx;
/*GList *pads; */
ctx = GST_ELEMENT_SCHED_CONTEXT (element);
if (ctx)
*group = ctx->group;

View file

@ -4,12 +4,12 @@ tests_pass = \
unlink_src unlink_sink \
relink_src relink_sink \
unref_src unref_sink \
143777 143777-2 147713 147894
143777 143777-2 147713 147819 147894
# don't enable this one unless it actually works.
# useless_iteration
tests_fail = 142183 142183-2 147819
tests_fail = 142183 142183-2
tests_ignore =
unlink_src_SOURCES = unlink.c

View file

@ -4,12 +4,12 @@ tests_pass = \
unlink_src unlink_sink \
relink_src relink_sink \
unref_src unref_sink \
143777 143777-2 147713 147894
143777 143777-2 147713 147819 147894
# don't enable this one unless it actually works.
# useless_iteration
tests_fail = 142183 142183-2 147819
tests_fail = 142183 142183-2
tests_ignore =
unlink_src_SOURCES = unlink.c