From 4d85bfc2df5540cde188b110026b77a6f355e045 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 16 Jun 2002 17:34:14 +0000 Subject: [PATCH] Use setfunc to set the cothread function instead of _reset Original commit message from CVS: Use setfunc to set the cothread function instead of _reset --- gst/schedulers/cothreads_compat.h | 6 +++--- gst/schedulers/gstbasicscheduler.c | 5 +++-- gst/schedulers/gstfastscheduler.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gst/schedulers/cothreads_compat.h b/gst/schedulers/cothreads_compat.h index 5e1d19236f..42bef0b696 100644 --- a/gst/schedulers/cothreads_compat.h +++ b/gst/schedulers/cothreads_compat.h @@ -50,7 +50,7 @@ typedef cothread_state cothread; }\ }G_STMT_END -#define do_cothread_reset(cothread, context, func, argc, argv) \ +#define do_cothread_setfunc(cothread, context, func, argc, argv) \ cothread_setfunc ((cothread), (func), (argc), (argv)) #define do_cothread_destroy(cothread) cothread_free(cothread) @@ -110,8 +110,8 @@ typedef cothread cothread_context; new_thread = cothread_create ((func), 0, (void**) (argv), (context)); \ }G_STMT_END -#define do_cothread_reset(cothread, context, func, argc, argv) \ - cothread_reset ((cothread), (func), (argc), (void **) (argv), (context)) +#define do_cothread_setfunc(cothread, context, func, argc, argv) \ + cothread_setfunc ((cothread), (func), (argc), (void **) (argv), (context)) #define do_cothread_destroy(cothread) cothread_destroy(cothread) diff --git a/gst/schedulers/gstbasicscheduler.c b/gst/schedulers/gstbasicscheduler.c index 8385ba17d7..9d9fcfaa9f 100644 --- a/gst/schedulers/gstbasicscheduler.c +++ b/gst/schedulers/gstbasicscheduler.c @@ -637,8 +637,9 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain) GST_ELEMENT_THREADSTATE (element), GST_ELEMENT_NAME (element)); } else { - do_cothread_reset (GST_ELEMENT_THREADSTATE (element), chain->sched->context, - wrapper_function, 0, (char **) element); + /* set the cothread wrapper function */ + do_cothread_setfunc (GST_ELEMENT_THREADSTATE (element), chain->sched->context, + wrapper_function, 0, (char **) element); GST_DEBUG (GST_CAT_SCHEDULING, "set wrapper function for '%s' to &%s", GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function)); } diff --git a/gst/schedulers/gstfastscheduler.c b/gst/schedulers/gstfastscheduler.c index d9704aaa99..6bf18f3af3 100644 --- a/gst/schedulers/gstfastscheduler.c +++ b/gst/schedulers/gstfastscheduler.c @@ -308,7 +308,7 @@ gst_fast_scheduler_cothreaded_element (GstBin * bin, GstElement *element) GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function)); } } else { - do_cothread_reset (GST_ELEMENT_THREADSTATE (element), sched->context, wrapper_function, 0, (char **) element); + do_cothread_setfunc (GST_ELEMENT_THREADSTATE (element), sched->context, wrapper_function, 0, (char **) element); GST_DEBUG (GST_CAT_SCHEDULING, "set wrapper function for '%s' to &%s\n", GST_ELEMENT_NAME (element), GST_DEBUG_FUNCPTR_NAME (wrapper_function)); }