From 36715f407cfbd23d7c4141ce6820225fba8df61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 26 Jul 2020 14:42:39 +0100 Subject: [PATCH] event, query: fix g-ir-scanner warnings gstevent.h:72: Warning: Gst: symbol='FLAG': Unknown namespace for symbol 'FLAG' gstquery.h:76: Warning: Gst: symbol='FLAG': Unknown namespace for symbol 'FLAG' Use _FLAG(xyz) instead of FLAG(xyz) to silence g-ir-scanner warnings about this internal helper define. It's also slightly more hygienic. Part-of: --- gst/gstevent.h | 66 +++++++++++++++++++++++++------------------------- gst/gstquery.h | 42 ++++++++++++++++---------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/gst/gstevent.h b/gst/gstevent.h index b6a7a3da26..6e6280a495 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h @@ -70,7 +70,7 @@ typedef enum { #define GST_EVENT_MAKE_TYPE(num,flags) \ (((num) << GST_EVENT_NUM_SHIFT) | (flags)) -#define FLAG(name) GST_EVENT_TYPE_##name +#define _FLAG(name) GST_EVENT_TYPE_##name /** * GstEventType: @@ -148,49 +148,49 @@ typedef enum { GST_EVENT_UNKNOWN = GST_EVENT_MAKE_TYPE (0, 0), /* bidirectional events */ - GST_EVENT_FLUSH_START = GST_EVENT_MAKE_TYPE (10, FLAG(BOTH)), - GST_EVENT_FLUSH_STOP = GST_EVENT_MAKE_TYPE (20, FLAG(BOTH) | FLAG(SERIALIZED)), + GST_EVENT_FLUSH_START = GST_EVENT_MAKE_TYPE (10, _FLAG(BOTH)), + GST_EVENT_FLUSH_STOP = GST_EVENT_MAKE_TYPE (20, _FLAG(BOTH) | _FLAG(SERIALIZED)), /* downstream serialized events */ - GST_EVENT_STREAM_START = GST_EVENT_MAKE_TYPE (40, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)), - GST_EVENT_CAPS = GST_EVENT_MAKE_TYPE (50, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)), - GST_EVENT_SEGMENT = GST_EVENT_MAKE_TYPE (70, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)), - GST_EVENT_STREAM_COLLECTION = GST_EVENT_MAKE_TYPE (75, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)), - GST_EVENT_TAG = GST_EVENT_MAKE_TYPE (80, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)), - GST_EVENT_BUFFERSIZE = GST_EVENT_MAKE_TYPE (90, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)), - GST_EVENT_SINK_MESSAGE = GST_EVENT_MAKE_TYPE (100, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)), - GST_EVENT_STREAM_GROUP_DONE = GST_EVENT_MAKE_TYPE (105, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)), - GST_EVENT_EOS = GST_EVENT_MAKE_TYPE (110, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY)), - GST_EVENT_TOC = GST_EVENT_MAKE_TYPE (120, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)), - GST_EVENT_PROTECTION = GST_EVENT_MAKE_TYPE (130, FLAG (DOWNSTREAM) | FLAG (SERIALIZED) | FLAG (STICKY) | FLAG (STICKY_MULTI)), + GST_EVENT_STREAM_START = GST_EVENT_MAKE_TYPE (40, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY)), + GST_EVENT_CAPS = GST_EVENT_MAKE_TYPE (50, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY)), + GST_EVENT_SEGMENT = GST_EVENT_MAKE_TYPE (70, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY)), + GST_EVENT_STREAM_COLLECTION = GST_EVENT_MAKE_TYPE (75, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY) | _FLAG(STICKY_MULTI)), + GST_EVENT_TAG = GST_EVENT_MAKE_TYPE (80, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY) | _FLAG(STICKY_MULTI)), + GST_EVENT_BUFFERSIZE = GST_EVENT_MAKE_TYPE (90, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY)), + GST_EVENT_SINK_MESSAGE = GST_EVENT_MAKE_TYPE (100, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY) | _FLAG(STICKY_MULTI)), + GST_EVENT_STREAM_GROUP_DONE = GST_EVENT_MAKE_TYPE (105, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY)), + GST_EVENT_EOS = GST_EVENT_MAKE_TYPE (110, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY)), + GST_EVENT_TOC = GST_EVENT_MAKE_TYPE (120, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY) | _FLAG(STICKY_MULTI)), + GST_EVENT_PROTECTION = GST_EVENT_MAKE_TYPE (130, _FLAG (DOWNSTREAM) | _FLAG (SERIALIZED) | _FLAG (STICKY) | _FLAG (STICKY_MULTI)), /* non-sticky downstream serialized */ - GST_EVENT_SEGMENT_DONE = GST_EVENT_MAKE_TYPE (150, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)), - GST_EVENT_GAP = GST_EVENT_MAKE_TYPE (160, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)), + GST_EVENT_SEGMENT_DONE = GST_EVENT_MAKE_TYPE (150, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED)), + GST_EVENT_GAP = GST_EVENT_MAKE_TYPE (160, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED)), /* sticky downstream non-serialized */ - GST_EVENT_INSTANT_RATE_CHANGE = GST_EVENT_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(STICKY)), + GST_EVENT_INSTANT_RATE_CHANGE = GST_EVENT_MAKE_TYPE (180, _FLAG(DOWNSTREAM) | _FLAG(STICKY)), /* upstream events */ - GST_EVENT_QOS = GST_EVENT_MAKE_TYPE (190, FLAG(UPSTREAM)), - GST_EVENT_SEEK = GST_EVENT_MAKE_TYPE (200, FLAG(UPSTREAM)), - GST_EVENT_NAVIGATION = GST_EVENT_MAKE_TYPE (210, FLAG(UPSTREAM)), - GST_EVENT_LATENCY = GST_EVENT_MAKE_TYPE (220, FLAG(UPSTREAM)), - GST_EVENT_STEP = GST_EVENT_MAKE_TYPE (230, FLAG(UPSTREAM)), - GST_EVENT_RECONFIGURE = GST_EVENT_MAKE_TYPE (240, FLAG(UPSTREAM)), - GST_EVENT_TOC_SELECT = GST_EVENT_MAKE_TYPE (250, FLAG(UPSTREAM)), - GST_EVENT_SELECT_STREAMS = GST_EVENT_MAKE_TYPE (260, FLAG(UPSTREAM)), - GST_EVENT_INSTANT_RATE_SYNC_TIME = GST_EVENT_MAKE_TYPE (261, FLAG(UPSTREAM)), + GST_EVENT_QOS = GST_EVENT_MAKE_TYPE (190, _FLAG(UPSTREAM)), + GST_EVENT_SEEK = GST_EVENT_MAKE_TYPE (200, _FLAG(UPSTREAM)), + GST_EVENT_NAVIGATION = GST_EVENT_MAKE_TYPE (210, _FLAG(UPSTREAM)), + GST_EVENT_LATENCY = GST_EVENT_MAKE_TYPE (220, _FLAG(UPSTREAM)), + GST_EVENT_STEP = GST_EVENT_MAKE_TYPE (230, _FLAG(UPSTREAM)), + GST_EVENT_RECONFIGURE = GST_EVENT_MAKE_TYPE (240, _FLAG(UPSTREAM)), + GST_EVENT_TOC_SELECT = GST_EVENT_MAKE_TYPE (250, _FLAG(UPSTREAM)), + GST_EVENT_SELECT_STREAMS = GST_EVENT_MAKE_TYPE (260, _FLAG(UPSTREAM)), + GST_EVENT_INSTANT_RATE_SYNC_TIME = GST_EVENT_MAKE_TYPE (261, _FLAG(UPSTREAM)), /* custom events start here */ - GST_EVENT_CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (270, FLAG(UPSTREAM)), - GST_EVENT_CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (280, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)), - GST_EVENT_CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (290, FLAG(DOWNSTREAM)), - GST_EVENT_CUSTOM_DOWNSTREAM_STICKY = GST_EVENT_MAKE_TYPE (300, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) | FLAG(STICKY) | FLAG(STICKY_MULTI)), - GST_EVENT_CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (310, FLAG(BOTH) | FLAG(SERIALIZED)), - GST_EVENT_CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (320, FLAG(BOTH)) + GST_EVENT_CUSTOM_UPSTREAM = GST_EVENT_MAKE_TYPE (270, _FLAG(UPSTREAM)), + GST_EVENT_CUSTOM_DOWNSTREAM = GST_EVENT_MAKE_TYPE (280, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED)), + GST_EVENT_CUSTOM_DOWNSTREAM_OOB = GST_EVENT_MAKE_TYPE (290, _FLAG(DOWNSTREAM)), + GST_EVENT_CUSTOM_DOWNSTREAM_STICKY = GST_EVENT_MAKE_TYPE (300, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED) | _FLAG(STICKY) | _FLAG(STICKY_MULTI)), + GST_EVENT_CUSTOM_BOTH = GST_EVENT_MAKE_TYPE (310, _FLAG(BOTH) | _FLAG(SERIALIZED)), + GST_EVENT_CUSTOM_BOTH_OOB = GST_EVENT_MAKE_TYPE (320, _FLAG(BOTH)) } GstEventType; -#undef FLAG +#undef _FLAG /** * GstStreamFlags: diff --git a/gst/gstquery.h b/gst/gstquery.h index 57ddc4cb22..9b7eb7f193 100644 --- a/gst/gstquery.h +++ b/gst/gstquery.h @@ -74,7 +74,7 @@ typedef enum { #define GST_QUERY_MAKE_TYPE(num,flags) \ (((num) << GST_QUERY_NUM_SHIFT) | (flags)) -#define FLAG(name) GST_QUERY_TYPE_##name +#define _FLAG(name) GST_QUERY_TYPE_##name /** @@ -107,27 +107,27 @@ typedef enum { * this enum */ typedef enum { GST_QUERY_UNKNOWN = GST_QUERY_MAKE_TYPE (0, 0), - GST_QUERY_POSITION = GST_QUERY_MAKE_TYPE (10, FLAG(BOTH)), - GST_QUERY_DURATION = GST_QUERY_MAKE_TYPE (20, FLAG(BOTH)), - GST_QUERY_LATENCY = GST_QUERY_MAKE_TYPE (30, FLAG(BOTH)), - GST_QUERY_JITTER = GST_QUERY_MAKE_TYPE (40, FLAG(BOTH)), - GST_QUERY_RATE = GST_QUERY_MAKE_TYPE (50, FLAG(BOTH)), - GST_QUERY_SEEKING = GST_QUERY_MAKE_TYPE (60, FLAG(BOTH)), - GST_QUERY_SEGMENT = GST_QUERY_MAKE_TYPE (70, FLAG(BOTH)), - GST_QUERY_CONVERT = GST_QUERY_MAKE_TYPE (80, FLAG(BOTH)), - GST_QUERY_FORMATS = GST_QUERY_MAKE_TYPE (90, FLAG(BOTH)), - GST_QUERY_BUFFERING = GST_QUERY_MAKE_TYPE (110, FLAG(BOTH)), - GST_QUERY_CUSTOM = GST_QUERY_MAKE_TYPE (120, FLAG(BOTH)), - GST_QUERY_URI = GST_QUERY_MAKE_TYPE (130, FLAG(BOTH)), - GST_QUERY_ALLOCATION = GST_QUERY_MAKE_TYPE (140, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)), - GST_QUERY_SCHEDULING = GST_QUERY_MAKE_TYPE (150, FLAG(UPSTREAM)), - GST_QUERY_ACCEPT_CAPS = GST_QUERY_MAKE_TYPE (160, FLAG(BOTH)), - GST_QUERY_CAPS = GST_QUERY_MAKE_TYPE (170, FLAG(BOTH)), - GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)), - GST_QUERY_CONTEXT = GST_QUERY_MAKE_TYPE (190, FLAG(BOTH)), - GST_QUERY_BITRATE = GST_QUERY_MAKE_TYPE (200, FLAG(DOWNSTREAM)), + GST_QUERY_POSITION = GST_QUERY_MAKE_TYPE (10, _FLAG(BOTH)), + GST_QUERY_DURATION = GST_QUERY_MAKE_TYPE (20, _FLAG(BOTH)), + GST_QUERY_LATENCY = GST_QUERY_MAKE_TYPE (30, _FLAG(BOTH)), + GST_QUERY_JITTER = GST_QUERY_MAKE_TYPE (40, _FLAG(BOTH)), + GST_QUERY_RATE = GST_QUERY_MAKE_TYPE (50, _FLAG(BOTH)), + GST_QUERY_SEEKING = GST_QUERY_MAKE_TYPE (60, _FLAG(BOTH)), + GST_QUERY_SEGMENT = GST_QUERY_MAKE_TYPE (70, _FLAG(BOTH)), + GST_QUERY_CONVERT = GST_QUERY_MAKE_TYPE (80, _FLAG(BOTH)), + GST_QUERY_FORMATS = GST_QUERY_MAKE_TYPE (90, _FLAG(BOTH)), + GST_QUERY_BUFFERING = GST_QUERY_MAKE_TYPE (110, _FLAG(BOTH)), + GST_QUERY_CUSTOM = GST_QUERY_MAKE_TYPE (120, _FLAG(BOTH)), + GST_QUERY_URI = GST_QUERY_MAKE_TYPE (130, _FLAG(BOTH)), + GST_QUERY_ALLOCATION = GST_QUERY_MAKE_TYPE (140, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED)), + GST_QUERY_SCHEDULING = GST_QUERY_MAKE_TYPE (150, _FLAG(UPSTREAM)), + GST_QUERY_ACCEPT_CAPS = GST_QUERY_MAKE_TYPE (160, _FLAG(BOTH)), + GST_QUERY_CAPS = GST_QUERY_MAKE_TYPE (170, _FLAG(BOTH)), + GST_QUERY_DRAIN = GST_QUERY_MAKE_TYPE (180, _FLAG(DOWNSTREAM) | _FLAG(SERIALIZED)), + GST_QUERY_CONTEXT = GST_QUERY_MAKE_TYPE (190, _FLAG(BOTH)), + GST_QUERY_BITRATE = GST_QUERY_MAKE_TYPE (200, _FLAG(DOWNSTREAM)), } GstQueryType; -#undef FLAG +#undef _FLAG GST_API GType _gst_query_type;