mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
Change GST_DEBUG_FUNCPTR() to return a pointer of the same type that it is called with. Fix lots of warnings due to ...
Original commit message from CVS: Change GST_DEBUG_FUNCPTR() to return a pointer of the same type that it is called with. Fix lots of warnings due to change.
This commit is contained in:
parent
7e88251c0f
commit
214c557a6d
5 changed files with 21 additions and 18 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue