diff --git a/gst/gstinfo.h b/gst/gstinfo.h index c4080953a5..7f78dfa478 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -465,7 +465,7 @@ extern GstErrorHandler _gst_error_handler; void* _gst_debug_register_funcptr (void *ptr, gchar *ptrname); gchar* _gst_debug_nameof_funcptr (void *ptr); -#define GST_DEBUG_FUNCPTR(ptr) _gst_debug_register_funcptr((void *)(ptr), #ptr) +#define GST_DEBUG_FUNCPTR(ptr) (_gst_debug_register_funcptr((void *)(ptr), #ptr) , ptr) #define GST_DEBUG_FUNCPTR_NAME(ptr) _gst_debug_nameof_funcptr((void *)ptr) #else #define GST_DEBUG_FUNCPTR(ptr) (ptr) diff --git a/gst/schedulers/cothreads_compat.h b/gst/schedulers/cothreads_compat.h index 94f364e7e3..38d4ce75c5 100644 --- a/gst/schedulers/cothreads_compat.h +++ b/gst/schedulers/cothreads_compat.h @@ -114,11 +114,11 @@ static void do_cothread_switch(cothread *to) #define do_cothread_create(new_cothread, context, func, argc, argv) \ G_STMT_START{ \ - new_cothread = cothread_create ((func), 0, (void**) (argv), (context)); \ + new_cothread = cothread_create ((func), 0, (char**) (argv), (context)); \ }G_STMT_END #define do_cothread_setfunc(cothread, context, func, argc, argv) \ - cothread_setfunc ((cothread), (func), (argc), (void **) (argv), (context)) + cothread_setfunc ((cothread), (func), (argc), (char **) (argv), (context)) #define do_cothread_destroy(cothread) cothread_destroy(cothread) diff --git a/gst/schedulers/gstbasicscheduler.c b/gst/schedulers/gstbasicscheduler.c index 492de4d24d..241318fb44 100644 --- a/gst/schedulers/gstbasicscheduler.c +++ b/gst/schedulers/gstbasicscheduler.c @@ -124,7 +124,7 @@ static void gst_basic_scheduler_pad_link (GstScheduler *sched, GstPad *src GstPad *sinkpad); static void gst_basic_scheduler_pad_unlink (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); -static GstPad* gst_basic_scheduler_pad_select (GstScheduler *sched, GList *padlist); +static void gst_basic_scheduler_pad_select (GstScheduler *sched, GList *padlist); static GstClockReturn gst_basic_scheduler_clock_wait (GstScheduler *sched, GstElement *element, GstClockID id, GstClockTimeDiff *jitter); static GstSchedulerState @@ -265,8 +265,8 @@ GstPluginDesc plugin_desc = { plugin_init }; -static void -gst_basic_scheduler_loopfunc_wrapper (int argc, void **argv) +static int +gst_basic_scheduler_loopfunc_wrapper (int argc, char **argv) { GstElement *element = GST_ELEMENT_CAST (argv); G_GNUC_UNUSED const gchar *name = GST_ELEMENT_NAME (element); @@ -294,10 +294,12 @@ gst_basic_scheduler_loopfunc_wrapper (int argc, void **argv) GST_DEBUG_LEAVE ("(%d,'%s')", argc, name); gst_object_unref (GST_OBJECT (element)); + + return 0; } -static void -gst_basic_scheduler_chain_wrapper (int argc, void **argv) +static int +gst_basic_scheduler_chain_wrapper (int argc, char **argv) { GstElement *element = GST_ELEMENT_CAST (argv); G_GNUC_UNUSED const gchar *name = GST_ELEMENT_NAME (element); @@ -356,10 +358,12 @@ gst_basic_scheduler_chain_wrapper (int argc, void **argv) GST_DEBUG_LEAVE ("(%d,'%s')", argc, name); gst_object_unref (GST_OBJECT (element)); + + return 0; } -static void -gst_basic_scheduler_src_wrapper (int argc, void **argv) +static int +gst_basic_scheduler_src_wrapper (int argc, char **argv) { GstElement *element = GST_ELEMENT_CAST (argv); GList *pads; @@ -381,7 +385,7 @@ gst_basic_scheduler_src_wrapper (int argc, void **argv) pads = g_list_next (pads); if (GST_RPAD_DIRECTION (realpad) == GST_PAD_SRC && GST_PAD_IS_USABLE (realpad)) { GST_DEBUG (GST_CAT_DATAFLOW, "calling _getfunc for %s:%s", GST_DEBUG_PAD_NAME (realpad)); - g_return_if_fail (GST_RPAD_GETFUNC (realpad) != NULL); + g_return_val_if_fail (GST_RPAD_GETFUNC (realpad) != NULL, 0); buf = GST_RPAD_GETFUNC (realpad) (GST_PAD_CAST (realpad)); if (buf) { GST_DEBUG (GST_CAT_DATAFLOW, "calling gst_pad_push on pad %s:%s %p", @@ -401,6 +405,8 @@ gst_basic_scheduler_src_wrapper (int argc, void **argv) SCHED (element)->current = NULL; GST_DEBUG_LEAVE (""); + + return 0; } static void @@ -1296,7 +1302,7 @@ gst_basic_scheduler_pad_unlink (GstScheduler * sched, GstPad * srcpad, GstPad * #endif } -static GstPad * +static void gst_basic_scheduler_pad_select (GstScheduler * sched, GList * padlist) { GstPad *pad = NULL; @@ -1329,7 +1335,6 @@ gst_basic_scheduler_pad_select (GstScheduler * sched, GList * padlist) g_assert (pad != NULL); } - return pad; } static GstClockReturn diff --git a/gst/schedulers/gstoptimalscheduler.c b/gst/schedulers/gstoptimalscheduler.c index 0b6df2768d..1a6faa5928 100644 --- a/gst/schedulers/gstoptimalscheduler.c +++ b/gst/schedulers/gstoptimalscheduler.c @@ -224,7 +224,7 @@ static gboolean gst_opt_scheduler_interrupt (GstScheduler *sched, GstElement static void gst_opt_scheduler_error (GstScheduler *sched, GstElement *element); static void gst_opt_scheduler_pad_link (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); static void gst_opt_scheduler_pad_unlink (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); -static GstPad* gst_opt_scheduler_pad_select (GstScheduler *sched, GList *padlist); +static void gst_opt_scheduler_pad_select (GstScheduler *sched, GList *padlist); static GstClockReturn gst_opt_scheduler_clock_wait (GstScheduler *sched, GstElement *element, GstClockID id, GstClockTimeDiff *jitter); static GstSchedulerState @@ -1782,14 +1782,12 @@ gst_opt_scheduler_pad_unlink (GstScheduler *sched, GstPad *srcpad, GstPad *sinkp } } -static GstPad* +static void gst_opt_scheduler_pad_select (GstScheduler *sched, GList *padlist) { //GstOptScheduler *osched = GST_OPT_SCHEDULER_CAST (sched); g_warning ("pad select, implement me"); - - return NULL; } static GstClockReturn diff --git a/gst/schedulers/gthread-cothreads.h b/gst/schedulers/gthread-cothreads.h index efee576fa2..32b721ed63 100644 --- a/gst/schedulers/gthread-cothreads.h +++ b/gst/schedulers/gthread-cothreads.h @@ -35,7 +35,7 @@ */ /* define "cothread", "cothread_context" and "cothread_func" */ -typedef void (*cothread_func) (int, char **); +typedef int (*cothread_func) (int, char **); typedef struct _cothread cothread; typedef struct _cothread_context cothread_context;