mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
patch from brian cameron for iso c compliance
Original commit message from CVS: patch from brian cameron for iso c compliance
This commit is contained in:
parent
5e3f920267
commit
7c84581a90
8 changed files with 91 additions and 6 deletions
|
@ -459,7 +459,6 @@ dnl #########################
|
||||||
|
|
||||||
dnl libs/ext/Makefile
|
dnl libs/ext/Makefile
|
||||||
dnl nothing there yet !
|
dnl nothing there yet !
|
||||||
dnl testsuite/indexers/Makefile
|
|
||||||
AC_OUTPUT(
|
AC_OUTPUT(
|
||||||
Makefile
|
Makefile
|
||||||
include/Makefile
|
include/Makefile
|
||||||
|
@ -493,6 +492,7 @@ testsuite/cleanup/Makefile
|
||||||
testsuite/clock/Makefile
|
testsuite/clock/Makefile
|
||||||
testsuite/dynparams/Makefile
|
testsuite/dynparams/Makefile
|
||||||
testsuite/elements/Makefile
|
testsuite/elements/Makefile
|
||||||
|
testsuite/indexers/Makefile
|
||||||
testsuite/plugin/Makefile
|
testsuite/plugin/Makefile
|
||||||
testsuite/refcounting/Makefile
|
testsuite/refcounting/Makefile
|
||||||
testsuite/threads/Makefile
|
testsuite/threads/Makefile
|
||||||
|
|
|
@ -82,9 +82,18 @@ GstElementDetails gst_filesrc_details = {
|
||||||
#define DEFAULT_BLOCKSIZE 4*1024
|
#define DEFAULT_BLOCKSIZE 4*1024
|
||||||
#define DEFAULT_MMAPSIZE 4*1024*1024
|
#define DEFAULT_MMAPSIZE 4*1024*1024
|
||||||
|
|
||||||
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
|
||||||
|
/* #define fs_print(...) g_print(__VA_ARGS__) */
|
||||||
|
#define fs_print(...)
|
||||||
|
|
||||||
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||||
|
|
||||||
/* #define fs_print(format,args...) g_print(format, ## args) */
|
/* #define fs_print(format,args...) g_print(format, ## args) */
|
||||||
#define fs_print(format,args...)
|
#define fs_print(format,args...)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FileSrc signals and args */
|
/* FileSrc signals and args */
|
||||||
enum {
|
enum {
|
||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
|
|
|
@ -227,7 +227,7 @@ G_STMT_START { \
|
||||||
tmp = (swap)->value; \
|
tmp = (swap)->value; \
|
||||||
tmp2 = val; \
|
tmp2 = val; \
|
||||||
(swap)->value = (gpointer)*tmp2; \
|
(swap)->value = (gpointer)*tmp2; \
|
||||||
(*res) = (gpointer)*tmp2 = (gint*)tmp; \
|
(*res) = (gpointer) (*tmp2 = (gint*)tmp); \
|
||||||
g_mutex_unlock ((swap)->lock); \
|
g_mutex_unlock ((swap)->lock); \
|
||||||
} \
|
} \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
|
@ -280,6 +280,53 @@ gst_thread_new (const gchar *name)
|
||||||
|
|
||||||
/* these two macros are used for debug/info from the state_change function */
|
/* these two macros are used for debug/info from the state_change function */
|
||||||
|
|
||||||
|
/* FIXME: with some rearranging of output or otherwise we could probably
|
||||||
|
* get rid of this g_strdup_printf we're using here, so go ahead if you're
|
||||||
|
* concerned about this slowing down */
|
||||||
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
|
||||||
|
#define THR_INFO(...) \
|
||||||
|
{ \
|
||||||
|
gchar *val = g_strdup_printf(__VA_ARGS__); \
|
||||||
|
GST_INFO_ELEMENT(GST_CAT_THREAD, thread, \
|
||||||
|
"sync(" GST_DEBUG_THREAD_FORMAT "): %s", \
|
||||||
|
GST_DEBUG_THREAD_ARGS(thread->pid), val); \
|
||||||
|
g_free(val); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define THR_DEBUG(...) \
|
||||||
|
{ \
|
||||||
|
gchar *val = g_strdup_printf(__VA_ARGS__); \
|
||||||
|
GST_INFO_ELEMENT(GST_CAT_THREAD, thread, \
|
||||||
|
"sync(" GST_DEBUG_THREAD_FORMAT "): %s", \
|
||||||
|
GST_DEBUG_THREAD_ARGS(thread->pid), val); \
|
||||||
|
g_free(val); \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* these two macros are used for debug/info from the gst_thread_main_loop
|
||||||
|
* function
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define THR_INFO_MAIN(...) \
|
||||||
|
{ \
|
||||||
|
gchar *val = g_strdup_printf(__VA_ARGS__); \
|
||||||
|
GST_INFO_ELEMENT(GST_CAT_THREAD, thread, \
|
||||||
|
"sync-main(" GST_DEBUG_THREAD_FORMAT "): %s", \
|
||||||
|
GST_DEBUG_THREAD_ARGS(thread->pid), val); \
|
||||||
|
g_free(val); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define THR_DEBUG_MAIN(...) \
|
||||||
|
{ \
|
||||||
|
gchar *val = g_strdup_printf(__VA_ARGS__); \
|
||||||
|
GST_INFO_ELEMENT(GST_CAT_THREAD, thread, \
|
||||||
|
"sync-main(" GST_DEBUG_THREAD_FORMAT "): %s", \
|
||||||
|
GST_DEBUG_THREAD_ARGS(thread->pid), val); \
|
||||||
|
g_free(val); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||||
|
|
||||||
#define THR_INFO(format,args...) \
|
#define THR_INFO(format,args...) \
|
||||||
GST_INFO_ELEMENT(GST_CAT_THREAD, thread, "sync(" GST_DEBUG_THREAD_FORMAT "): " format , \
|
GST_INFO_ELEMENT(GST_CAT_THREAD, thread, "sync(" GST_DEBUG_THREAD_FORMAT "): " format , \
|
||||||
GST_DEBUG_THREAD_ARGS(thread->pid) , ## args )
|
GST_DEBUG_THREAD_ARGS(thread->pid) , ## args )
|
||||||
|
@ -300,6 +347,8 @@ gst_thread_new (const gchar *name)
|
||||||
GST_DEBUG_ELEMENT(GST_CAT_THREAD, thread, "sync-main(" GST_DEBUG_THREAD_FORMAT "): " format , \
|
GST_DEBUG_ELEMENT(GST_CAT_THREAD, thread, "sync-main(" GST_DEBUG_THREAD_FORMAT "): " format , \
|
||||||
GST_DEBUG_THREAD_ARGS(thread->ppid) , ## args )
|
GST_DEBUG_THREAD_ARGS(thread->ppid) , ## args )
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static GstElementStateReturn
|
static GstElementStateReturn
|
||||||
gst_thread_update_state (GstThread *thread)
|
gst_thread_update_state (GstThread *thread)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,8 +33,12 @@
|
||||||
#include "gstlog.h"
|
#include "gstlog.h"
|
||||||
#include "gsttrace.h"
|
#include "gsttrace.h"
|
||||||
|
|
||||||
static __inline__ void
|
static
|
||||||
read_tsc (guint64 * dst)
|
#ifdef __inline__
|
||||||
|
__inline__
|
||||||
|
#endif
|
||||||
|
void
|
||||||
|
read_tsc (gint64 * dst)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_RDTSC
|
#ifdef HAVE_RDTSC
|
||||||
guint64 tsc;
|
guint64 tsc;
|
||||||
|
@ -47,7 +51,7 @@ read_tsc (guint64 * dst)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gst_trace_read_tsc (guint64 * dst)
|
gst_trace_read_tsc (gint64 * dst)
|
||||||
{
|
{
|
||||||
read_tsc (dst);
|
read_tsc (dst);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ void gst_trace_set_default (GstTrace *trace);
|
||||||
void _gst_trace_add_entry (GstTrace *trace, guint32 seq,
|
void _gst_trace_add_entry (GstTrace *trace, guint32 seq,
|
||||||
guint32 data, gchar *msg);
|
guint32 data, gchar *msg);
|
||||||
|
|
||||||
void gst_trace_read_tsc (guint64 *dst);
|
void gst_trace_read_tsc (gint64 *dst);
|
||||||
|
|
||||||
#define TRACE_ENABLE
|
#define TRACE_ENABLE
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,18 @@
|
||||||
|
|
||||||
/* #define BS_DEBUG */
|
/* #define BS_DEBUG */
|
||||||
|
|
||||||
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
|
||||||
|
#ifdef BS_DEBUG
|
||||||
|
# define bs_print(...) GST_DEBUG (GST_CAT_BUFFER, __VA_ARGS__)
|
||||||
|
# define bs_status(bs) gst_bytestream_print_status(bs)
|
||||||
|
#else
|
||||||
|
# define bs_print(...)
|
||||||
|
# define bs_status(bs)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||||
|
|
||||||
#ifdef BS_DEBUG
|
#ifdef BS_DEBUG
|
||||||
# define bs_print(format,args...) GST_DEBUG (GST_CAT_BUFFER, format, ## args)
|
# define bs_print(format,args...) GST_DEBUG (GST_CAT_BUFFER, format, ## args)
|
||||||
# define bs_status(bs) gst_bytestream_print_status(bs)
|
# define bs_status(bs) gst_bytestream_print_status(bs)
|
||||||
|
@ -36,6 +48,8 @@
|
||||||
# define bs_status(bs)
|
# define bs_status(bs)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
guint8 *gst_bytestream_assemble (GstByteStream * bs, guint32 len);
|
guint8 *gst_bytestream_assemble (GstByteStream * bs, guint32 len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -82,9 +82,18 @@ GstElementDetails gst_filesrc_details = {
|
||||||
#define DEFAULT_BLOCKSIZE 4*1024
|
#define DEFAULT_BLOCKSIZE 4*1024
|
||||||
#define DEFAULT_MMAPSIZE 4*1024*1024
|
#define DEFAULT_MMAPSIZE 4*1024*1024
|
||||||
|
|
||||||
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
|
|
||||||
|
/* #define fs_print(...) g_print(__VA_ARGS__) */
|
||||||
|
#define fs_print(...)
|
||||||
|
|
||||||
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||||
|
|
||||||
/* #define fs_print(format,args...) g_print(format, ## args) */
|
/* #define fs_print(format,args...) g_print(format, ## args) */
|
||||||
#define fs_print(format,args...)
|
#define fs_print(format,args...)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* FileSrc signals and args */
|
/* FileSrc signals and args */
|
||||||
enum {
|
enum {
|
||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
|
|
Loading…
Reference in a new issue