mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
revert fix because GST_DEBUG_LEAVE("") doesn't work with it
Original commit message from CVS: revert fix because GST_DEBUG_LEAVE("") doesn't work with it
This commit is contained in:
parent
35387bca47
commit
7cd8540542
10 changed files with 17 additions and 277 deletions
10
gst/gst.c
10
gst/gst.c
|
@ -95,7 +95,7 @@ enum {
|
|||
/* default scheduler, 'basicomega', can be changed in
|
||||
* gstscheduler.c in function gst_scheduler_factory_class_init
|
||||
*/
|
||||
static const struct poptOption gstreamer_options[] = {
|
||||
static const struct poptOption options[] = {
|
||||
{NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, &init_popt_callback, 0, NULL, NULL},
|
||||
{"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, "Print the GStreamer version", NULL},
|
||||
{"gst-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, "Make all warnings fatal", NULL},
|
||||
|
@ -126,7 +126,7 @@ static const struct poptOption gstreamer_options[] = {
|
|||
const struct poptOption *
|
||||
gst_init_get_popt_table (void)
|
||||
{
|
||||
return gstreamer_options;
|
||||
return options;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -186,15 +186,15 @@ gst_init_with_popt_table (int *argc, char **argv[],
|
|||
gchar **temp;
|
||||
const struct poptOption *options;
|
||||
/* this is probably hacky, no? */
|
||||
struct poptOption options_with[] = {
|
||||
const struct poptOption options_with[] = {
|
||||
{NULL, NUL, POPT_ARG_INCLUDE_TABLE, poptHelpOptions, 0, "Help options:", NULL},
|
||||
{NULL, NUL, POPT_ARG_INCLUDE_TABLE, gstreamer_options, 0, "GStreamer options:", NULL},
|
||||
{NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) gst_init_get_popt_table(), 0, "GStreamer options:", NULL},
|
||||
{NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) popt_options, 0, "Application options:", NULL},
|
||||
POPT_TABLEEND
|
||||
};
|
||||
const struct poptOption options_without[] = {
|
||||
{NULL, NUL, POPT_ARG_INCLUDE_TABLE, poptHelpOptions, 0, "Help options:", NULL},
|
||||
{NULL, NUL, POPT_ARG_INCLUDE_TABLE, gstreamer_options, 0, "GStreamer options:", NULL},
|
||||
{NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) gst_init_get_popt_table(), 0, "GStreamer options:", NULL},
|
||||
POPT_TABLEEND
|
||||
};
|
||||
|
||||
|
|
|
@ -58,26 +58,6 @@ struct _GstCaps {
|
|||
|
||||
/* factory macros which make it easier for plugins to instantiate */
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
#define GST_CAPS_NEW(name, type, ...) \
|
||||
gst_caps_new ( \
|
||||
name, \
|
||||
type, \
|
||||
gst_props_new ( \
|
||||
__VA_ARGS__, \
|
||||
NULL))
|
||||
|
||||
#define GST_CAPS_FACTORY(factoryname, ...) \
|
||||
static GstCaps* \
|
||||
factoryname (void) \
|
||||
{ \
|
||||
static GstCaps *caps = NULL; \
|
||||
if (!caps) { \
|
||||
caps = gst_caps_chain (__VA_ARGS_, NULL); \
|
||||
} \
|
||||
return caps; \
|
||||
}
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
#define GST_CAPS_NEW(name, type, a...) \
|
||||
gst_caps_new ( \
|
||||
name, \
|
||||
|
@ -96,7 +76,6 @@ factoryname (void) \
|
|||
} \
|
||||
return caps; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define GST_CAPS_GET(fact) (fact)()
|
||||
|
||||
|
@ -129,13 +108,8 @@ void gst_caps_set_type_id (GstCaps *caps, guint16 type_id);
|
|||
GstCaps* gst_caps_set_props (GstCaps *caps, GstProps *props);
|
||||
GstProps* gst_caps_get_props (GstCaps *caps);
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
#define gst_caps_set(caps, ...) gst_props_set ((caps)->properties, __VA_ARGS__)
|
||||
#define gst_caps_get(caps, ...) gst_props_get ((caps)->properties, __VA_ARGS__)
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
#define gst_caps_set(caps, name, args...) gst_props_set ((caps)->properties, name, ##args)
|
||||
#define gst_caps_get(caps, name, args...) gst_props_get ((caps)->properties, name, ##args)
|
||||
#endif
|
||||
|
||||
#define gst_caps_get_int(caps,name,res) gst_props_entry_get_int(gst_props_get_entry((caps)->properties,name),res)
|
||||
#define gst_caps_get_float(caps,name,res) gst_props_entry_get_float(gst_props_get_entry((caps)->properties,name),res)
|
||||
|
|
|
@ -78,18 +78,6 @@ typedef struct
|
|||
GstEventFlag flags;
|
||||
} GstEventMask;
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
#define GST_EVENT_MASK_FUNCTION(functionname, ...) \
|
||||
static const GstEventMask* \
|
||||
functionname (GstPad *pad) \
|
||||
{ \
|
||||
static const GstEventMask masks[] = { \
|
||||
__VA_ARGS__, \
|
||||
{ 0, } \
|
||||
}; \
|
||||
return masks; \
|
||||
}
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
#define GST_EVENT_MASK_FUNCTION(functionname, a...) \
|
||||
static const GstEventMask* \
|
||||
functionname (GstPad *pad) \
|
||||
|
@ -100,7 +88,6 @@ functionname (GstPad *pad) \
|
|||
}; \
|
||||
return masks; \
|
||||
}
|
||||
#endif
|
||||
|
||||
/* seek events, extends GstEventFlag */
|
||||
typedef enum {
|
||||
|
|
|
@ -48,18 +48,6 @@ struct _GstFormatDefinition
|
|||
gchar *description;
|
||||
};
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
#define GST_FORMATS_FUNCTION(functionname, ...) \
|
||||
static const GstFormat* \
|
||||
functionname (GstPad *pad) \
|
||||
{ \
|
||||
static const GstFormat formats[] = { \
|
||||
__VA_ARGS__, \
|
||||
0 \
|
||||
}; \
|
||||
return formats; \
|
||||
}
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
#define GST_FORMATS_FUNCTION(functionname, a...) \
|
||||
static const GstFormat* \
|
||||
functionname (GstPad *pad) \
|
||||
|
@ -70,7 +58,6 @@ functionname (GstPad *pad) \
|
|||
}; \
|
||||
return formats; \
|
||||
}
|
||||
#endif
|
||||
|
||||
void _gst_format_initialize (void);
|
||||
|
||||
|
|
|
@ -81,9 +81,8 @@ static gchar *_gst_info_category_strings[] = {
|
|||
"REFCOUNTING",
|
||||
"EVENT",
|
||||
"PARAMS",
|
||||
"",
|
||||
"",
|
||||
"CALL_TRACE",
|
||||
|
||||
[30] = "CALL_TRACE",
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
153
gst/gstinfo.h
153
gst/gstinfo.h
|
@ -31,15 +31,6 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FUNC
|
||||
#define FUNCTION __func__
|
||||
#elif HAVE_PRETTY_FUNCTION
|
||||
#define FUNCTION __PRETTY_FUNCTION__
|
||||
#elif HAVE_FUNCTION
|
||||
#define FUNCTION __FUNCTION__
|
||||
#else
|
||||
#define FUNCTION ""
|
||||
#endif
|
||||
|
||||
/***** are we in the core or not? *****/
|
||||
#ifdef __GST_PRIVATE_H__
|
||||
|
@ -145,38 +136,17 @@ G_GNUC_UNUSED static gchar *_debug_string = NULL;
|
|||
|
||||
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#ifdef GST_DEBUG_ENABLED
|
||||
#define GST_DEBUG(cat, ...) G_STMT_START{ \
|
||||
if ((1<<cat) & _gst_debug_categories) \
|
||||
_gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
NULL,g_strdup_printf( __VA_ARGS__ )); \
|
||||
}G_STMT_END
|
||||
|
||||
#define GST_DEBUG_ELEMENT(cat, element, ...) G_STMT_START{ \
|
||||
if ((1<<cat) & _gst_debug_categories) \
|
||||
_gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
element,g_strdup_printf( __VA_ARGS__ )); \
|
||||
}G_STMT_END
|
||||
|
||||
#else
|
||||
#define GST_DEBUG(cat, ...)
|
||||
#define GST_DEBUG_ELEMENT(cat,element, ...)
|
||||
#endif
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#ifdef GST_DEBUG_ENABLED
|
||||
#define GST_DEBUG(cat,format,args...) G_STMT_START{ \
|
||||
if ((1<<cat) & _gst_debug_categories) \
|
||||
_gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
_gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,__PRETTY_FUNCTION__,__LINE__,_debug_string, \
|
||||
NULL,g_strdup_printf( format , ## args )); \
|
||||
}G_STMT_END
|
||||
|
||||
#define GST_DEBUG_ELEMENT(cat,element,format,args...) G_STMT_START{ \
|
||||
if ((1<<cat) & _gst_debug_categories) \
|
||||
_gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
_gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,__PRETTY_FUNCTION__,__LINE__,_debug_string, \
|
||||
element,g_strdup_printf( format , ## args )); \
|
||||
}G_STMT_END
|
||||
|
||||
|
@ -185,8 +155,6 @@ G_GNUC_UNUSED static gchar *_debug_string = NULL;
|
|||
#define GST_DEBUG_ELEMENT(cat,element,format,args...)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -196,18 +164,6 @@ G_GNUC_UNUSED static gchar *_debug_string = NULL;
|
|||
GST_OBJECT_NAME (GST_OBJECT_PARENT(pad)) : \
|
||||
"''", GST_OBJECT_NAME (pad)
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#ifdef GST_DEBUG_COLOR
|
||||
#define GST_DEBUG_ENTER(...) GST_DEBUG( 31 , "\033[00;37mentering\033[00m :" __VA_ARGS__ )
|
||||
#define GST_DEBUG_LEAVE(...) GST_DEBUG( 31 , "\033[00;37mleaving\033[00m :" , __VA_ARGS__ )
|
||||
#else
|
||||
#define GST_DEBUG_ENTER(...) GST_DEBUG( 31 , "entering :" __VA_ARGS__ )
|
||||
#define GST_DEBUG_LEAVE(...) GST_DEBUG( 31 , "leaving :" __VA_ARGS__ )
|
||||
#endif
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#ifdef GST_DEBUG_COLOR
|
||||
#define GST_DEBUG_ENTER(format, args...) GST_DEBUG( 31 , format ": \033[00;37mentering\033[00m" , ##args )
|
||||
#define GST_DEBUG_LEAVE(format, args...) GST_DEBUG( 31 , format ": \033[00;37mleaving\033[00m" , ##args )
|
||||
|
@ -216,8 +172,6 @@ G_GNUC_UNUSED static gchar *_debug_string = NULL;
|
|||
#define GST_DEBUG_LEAVE(format, args...) GST_DEBUG( 31 , format ": leaving" , ##args )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/***** Colorized debug for thread ids *****/
|
||||
#ifdef GST_DEBUG_COLOR
|
||||
|
@ -240,38 +194,6 @@ typedef void (*_debug_function_f)();
|
|||
G_GNUC_UNUSED static gchar *_debug_string_pointer = NULL;
|
||||
G_GNUC_UNUSED static GModule *_debug_self_module = NULL;
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#define _DEBUG_ENTER_BUILTIN(...) \
|
||||
static int _debug_in_wrapper = 0; \
|
||||
gchar *_debug_string = ({ \
|
||||
if (!_debug_in_wrapper) { \
|
||||
void *_return_value; \
|
||||
gchar *_debug_string; \
|
||||
_debug_function_f function; \
|
||||
void *_function_args = __builtin_apply_args(); \
|
||||
_debug_in_wrapper = 1; \
|
||||
_debug_string = g_strdup_printf(GST_DEBUG_PREFIX("")); \
|
||||
_debug_string_pointer = _debug_string; \
|
||||
fprintf(stderr,"%s: entered " FUNCTION, _debug_string); \
|
||||
fprintf(stderr, __VA_ARGS__ ); \
|
||||
fprintf(stderr,"\n"); \
|
||||
if (_debug_self_module == NULL) _debug_self_module = g_module_open(NULL,0); \
|
||||
g_module_symbol(_debug_self_module,FUNCTION,(gpointer *)&function); \
|
||||
_return_value = __builtin_apply(function,_function_args,64); \
|
||||
fprintf(stderr,"%s: left " FUNCTION, _debug_string); \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
fprintf(stderr,"\n"); \
|
||||
g_free(_debug_string); \
|
||||
__builtin_return(_return_value); \
|
||||
} else { \
|
||||
_debug_in_wrapper = 0; \
|
||||
} \
|
||||
_debug_string_pointer; \
|
||||
});
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#define _DEBUG_ENTER_BUILTIN(format,args...) \
|
||||
static int _debug_in_wrapper = 0; \
|
||||
gchar *_debug_string = ({ \
|
||||
|
@ -283,11 +205,11 @@ G_GNUC_UNUSED static GModule *_debug_self_module = NULL;
|
|||
_debug_in_wrapper = 1; \
|
||||
_debug_string = g_strdup_printf(GST_DEBUG_PREFIX("")); \
|
||||
_debug_string_pointer = _debug_string; \
|
||||
fprintf(stderr,"%s: entered " FUNCTION format "\n" , _debug_string , ## args ); \
|
||||
fprintf(stderr,"%s: entered " __PRETTY_FUNCTION__ format "\n" , _debug_string , ## args ); \
|
||||
if (_debug_self_module == NULL) _debug_self_module = g_module_open(NULL,0); \
|
||||
g_module_symbol(_debug_self_module,FUNCTION,(gpointer *)&function); \
|
||||
g_module_symbol(_debug_self_module,__FUNCTION__,(gpointer *)&function); \
|
||||
_return_value = __builtin_apply(function,_function_args,64); \
|
||||
fprintf(stderr,"%s: left " FUNCTION format "\n" , _debug_string , ## args ); \
|
||||
fprintf(stderr,"%s: left " __PRETTY_FUNCTION__ format "\n" , _debug_string , ## args ); \
|
||||
g_free(_debug_string); \
|
||||
__builtin_return(_return_value); \
|
||||
} else { \
|
||||
|
@ -296,26 +218,9 @@ G_GNUC_UNUSED static GModule *_debug_self_module = NULL;
|
|||
_debug_string_pointer; \
|
||||
});
|
||||
|
||||
#endif
|
||||
|
||||
* WARNING: there's a gcc CPP bug lurking in here. The extra space before the ##args *
|
||||
* somehow make the preprocessor leave the _debug_string. If it's removed, the *
|
||||
* _debug_string somehow gets stripped along with the ##args, and that's all she wrote. *
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#define _DEBUG_BUILTIN(...) \
|
||||
if (_debug_string != (void *)-1) { \
|
||||
if (_debug_string) { \
|
||||
fprintf(stderr, "%s: " _debug_string); \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
} else { \
|
||||
fprintf(stderr,GST_DEBUG_PREFIX(": " __VA_ARGS__)); \
|
||||
} \
|
||||
}
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#define _DEBUG_BUILTIN(format,args...) \
|
||||
if (_debug_string != (void *)-1) { \
|
||||
if (_debug_string) \
|
||||
|
@ -324,8 +229,6 @@ G_GNUC_UNUSED static GModule *_debug_self_module = NULL;
|
|||
fprintf(stderr,GST_DEBUG_PREFIX(": " format , ## args)); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
@ -356,38 +259,16 @@ extern guint32 _gst_info_categories;
|
|||
#define GST_INFO_ENABLED
|
||||
#endif
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#ifdef GST_INFO_ENABLED
|
||||
#define GST_INFO(cat,...) G_STMT_START{ \
|
||||
if ((1<<cat) & _gst_info_categories) \
|
||||
_gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
NULL,g_strdup_printf( __VA_ARGS__ )); \
|
||||
}G_STMT_END
|
||||
|
||||
#define GST_INFO_ELEMENT(cat,element,...) G_STMT_START{ \
|
||||
if ((1<<cat) & _gst_info_categories) \
|
||||
_gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
element,g_strdup_printf( __VA_ARGS__ )); \
|
||||
}G_STMT_END
|
||||
|
||||
#else
|
||||
#define GST_INFO(cat,...)
|
||||
#define GST_INFO_ELEMENT(cat,element,...)
|
||||
#endif
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#ifdef GST_INFO_ENABLED
|
||||
#define GST_INFO(cat,format,args...) G_STMT_START{ \
|
||||
if ((1<<cat) & _gst_info_categories) \
|
||||
_gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
_gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,__PRETTY_FUNCTION__,__LINE__,_debug_string, \
|
||||
NULL,g_strdup_printf( format , ## args )); \
|
||||
}G_STMT_END
|
||||
|
||||
#define GST_INFO_ELEMENT(cat,element,format,args...) G_STMT_START{ \
|
||||
if ((1<<cat) & _gst_info_categories) \
|
||||
_gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
_gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,__PRETTY_FUNCTION__,__LINE__,_debug_string, \
|
||||
element,g_strdup_printf( format , ## args )); \
|
||||
}G_STMT_END
|
||||
|
||||
|
@ -396,8 +277,6 @@ extern guint32 _gst_info_categories;
|
|||
#define GST_INFO_ELEMENT(cat,element,format,args...)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void gst_info_set_categories (guint32 categories);
|
||||
guint32 gst_info_get_categories (void);
|
||||
|
@ -426,28 +305,14 @@ void gst_default_error_handler (gchar *file,gchar *function,
|
|||
|
||||
extern GstErrorHandler _gst_error_handler;
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#define GST_ERROR(element,...) \
|
||||
_gst_error_handler(__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
element,NULL,g_strdup_printf( __VA_ARGS__ ))
|
||||
|
||||
#define GST_ERROR_OBJECT(element,object,...) \
|
||||
_gst_error_handler(__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
element,object,g_strdup_printf( __VA_ARGS__ ))
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#define GST_ERROR(element,format,args...) \
|
||||
_gst_error_handler(__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
_gst_error_handler(__FILE__,__PRETTY_FUNCTION__,__LINE__,_debug_string, \
|
||||
element,NULL,g_strdup_printf( format , ## args ))
|
||||
|
||||
#define GST_ERROR_OBJECT(element,object,format,args...) \
|
||||
_gst_error_handler(__FILE__,FUNCTION,__LINE__,_debug_string, \
|
||||
_gst_error_handler(__FILE__,__PRETTY_FUNCTION__,__LINE__,_debug_string, \
|
||||
element,object,g_strdup_printf( format , ## args ))
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
13
gst/gstlog.h
13
gst/gstlog.h
|
@ -25,18 +25,6 @@
|
|||
|
||||
extern const char *g_log_domain_gstreamer;
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
/* information messages */
|
||||
#define GST_SHOW_INFO
|
||||
#ifdef GST_SHOW_INFO
|
||||
#define gst_info(...) fprintf(stderr, __VA_ARGS__)
|
||||
#else
|
||||
#define gst_info(...)
|
||||
#endif
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
/* information messages */
|
||||
#define GST_SHOW_INFO
|
||||
#ifdef GST_SHOW_INFO
|
||||
|
@ -44,6 +32,5 @@ extern const char *g_log_domain_gstreamer;
|
|||
#else
|
||||
#define gst_info(format,args...)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __GST_LOG_H__ */
|
||||
|
|
38
gst/gstpad.h
38
gst/gstpad.h
|
@ -128,18 +128,6 @@ typedef enum {
|
|||
GST_PAD_QUERY_RATE
|
||||
} GstPadQueryType;
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
#define GST_PAD_QUERY_TYPE_FUNCTION(functionname, ...) \
|
||||
static const GstPadQueryType* \
|
||||
functionname (GstPad *pad) \
|
||||
{ \
|
||||
static const GstPadQueryType types[] = { \
|
||||
__VA_ARGS__, \
|
||||
0 \
|
||||
}; \
|
||||
return types; \
|
||||
}
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
#define GST_PAD_QUERY_TYPE_FUNCTION(functionname, a...) \
|
||||
static const GstPadQueryType* \
|
||||
functionname (GstPad *pad) \
|
||||
|
@ -150,7 +138,6 @@ functionname (GstPad *pad) \
|
|||
}; \
|
||||
return types; \
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* this defines the functions used to chain buffers
|
||||
|
@ -348,30 +335,6 @@ struct _GstPadTemplateClass {
|
|||
void (*pad_created) (GstPadTemplate *templ, GstPad *pad);
|
||||
};
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
#define GST_PAD_TEMPLATE_NEW(padname, dir, pres, ...) \
|
||||
gst_pad_template_new ( \
|
||||
padname, \
|
||||
dir, \
|
||||
pres, \
|
||||
__VA_ARGS__ , \
|
||||
NULL)
|
||||
|
||||
#define GST_PAD_TEMPLATE_FACTORY(name, padname, dir, pres, ...) \
|
||||
static GstPadTemplate* \
|
||||
name (void) \
|
||||
{ \
|
||||
static GstPadTemplate *templ = NULL; \
|
||||
if (!templ) { \
|
||||
templ = GST_PAD_TEMPLATE_NEW ( \
|
||||
padname, \
|
||||
dir, \
|
||||
pres, \
|
||||
__VA_ARGS__ ); \
|
||||
} \
|
||||
return templ; \
|
||||
}
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
/* CR1: the space after 'a' is necessary because of preprocessing in gcc */
|
||||
#define GST_PAD_TEMPLATE_NEW(padname, dir, pres, a...) \
|
||||
gst_pad_template_new ( \
|
||||
|
@ -395,7 +358,6 @@ name (void) \
|
|||
} \
|
||||
return templ; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define GST_PAD_TEMPLATE_GET(fact) (fact)()
|
||||
|
||||
|
|
|
@ -59,16 +59,7 @@ typedef enum {
|
|||
#define GST_MAKE_FOURCC(a,b,c,d) (guint32)((a)|(b)<<8|(c)<<16|(d)<<24)
|
||||
#define GST_STR_FOURCC(f) (guint32)(((f)[0])|((f)[1]<<8)|((f)[2]<<16)|((f)[3]<<24))
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#define GST_PROPS_LIST(...) GST_PROPS_LIST_TYPE,__VA_ARGS__,NULL
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#define GST_PROPS_LIST(a...) GST_PROPS_LIST_TYPE,a,NULL
|
||||
|
||||
#endif
|
||||
|
||||
#define GST_PROPS_LIST(a...) GST_PROPS_LIST_TYPE,##a,NULL
|
||||
#define GST_PROPS_GLIST(a) GST_PROPS_GLIST_TYPE,(a)
|
||||
#define GST_PROPS_INT(a) GST_PROPS_INT_TYPE,(a)
|
||||
#define GST_PROPS_INT_RANGE(a,b) GST_PROPS_INT_RANGE_TYPE,(a),(b)
|
||||
|
|
|
@ -5,24 +5,12 @@
|
|||
#include "types.h"
|
||||
#include <grammar.tab.h>
|
||||
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
|
||||
#ifdef DEBUG
|
||||
# define PRINT(...) printf(__VAR_ARGS__)
|
||||
#else
|
||||
#define PRINT(...)
|
||||
#endif
|
||||
|
||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||
|
||||
#ifdef DEBUG
|
||||
# define PRINT(a...) printf(##a)
|
||||
#else
|
||||
#define PRINT(a...)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define CHAR(x) PRINT ("char: %c\n", *yytext); return *yytext;
|
||||
|
||||
#define YY_DECL int _gst_parse_yylex (YYSTYPE *lvalp)
|
||||
|
|
Loading…
Reference in a new issue