summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-02-15 22:51:21 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2019-02-15 23:50:11 +0530
commit81fd48bcb5c4b44a9a6b0b3cd9da21d4f32e3b07 (patch)
treedb516de27e6e42de418b3705bd4852d5623a24d1
parenta4323638b312dbe09ac42ad1cbcfbfbb1fe9a6a9 (diff)
downloadgstreamer-plugins-bad-81fd48bcb5c4b44a9a6b0b3cd9da21d4f32e3b07.tar.gz
closedcaption: Use portable variadic macro syntax
args... is not understood by MSVC: error C2010: '.': unexpected in macro parameter list
-rw-r--r--ext/closedcaption/misc.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/closedcaption/misc.h b/ext/closedcaption/misc.h
index 4f62285fd..600310561 100644
--- a/ext/closedcaption/misc.h
+++ b/ext/closedcaption/misc.h
@@ -345,6 +345,7 @@ VBI_CAT_LEVEL_LOG (GstDebugLevel level,
}
#endif /* GST_DISABLE_GST_DEBUG */
+#ifdef G_HAVE_GNUC_VARARGS
#define error(hook, templ, args...) \
VBI_CAT_LEVEL_LOG (GST_LEVEL_ERROR, NULL, templ , ##args)
#define warning(hook, templ, args...) \
@@ -359,6 +360,26 @@ VBI_CAT_LEVEL_LOG (GstDebugLevel level,
VBI_CAT_LEVEL_LOG (GST_LEVEL_LOG, NULL, templ , ##args)
#define debug3(hook, templ, args...) \
VBI_CAT_LEVEL_LOG (GST_LEVEL_TRACE, NULL, templ , ##args)
+#elif defined(G_HAVE_ISO_VARARGS)
+#define error(hook, templ, ...) \
+ VBI_CAT_LEVEL_LOG (GST_LEVEL_ERROR, NULL, templ, __VA_ARGS__)
+#define warning(hook, templ, ...) \
+ VBI_CAT_LEVEL_LOG (GST_LEVEL_WARNING, NULL, templ, __VA_ARGS__)
+#define notice(hook, templ, ...) \
+ VBI_CAT_LEVEL_LOG (GST_LEVEL_INFO, NULL, templ, __VA_ARGS__)
+#define info(hook, templ, ...) \
+ VBI_CAT_LEVEL_LOG (GST_LEVEL_INFO, NULL, templ, __VA_ARGS__)
+#define debug1(hook, templ, ...) \
+ VBI_CAT_LEVEL_LOG (GST_LEVEL_DEBUG, NULL, templ, __VA_ARGS__)
+#define debug2(hook, templ, ...) \
+ VBI_CAT_LEVEL_LOG (GST_LEVEL_LOG, NULL, templ, __VA_ARGS__)
+#define debug3(hook, templ, ...) \
+ VBI_CAT_LEVEL_LOG (GST_LEVEL_TRACE, NULL, templ, __VA_ARGS__)
+#else
+/* if someone needs this, they can implement the inline functions for it */
+#error "variadic macros are required"
+#endif
+
#if 0 /* Replaced logging with GStreamer logging system */
extern _vbi_log_hook _vbi_global_log;