From ddd00c0d2f376b882957859308fcc598967828cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 5 Apr 2017 15:46:26 +0300 Subject: [PATCH] gst: Update some more types and values of combined-flags constants --- gst/gstclock.h | 10 ++++----- gst/gstelementfactory.h | 48 ++++++++++++++++++++--------------------- gst/gstevent.h | 4 ++-- gst/gstquery.h | 4 ++-- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/gst/gstclock.h b/gst/gstclock.h index 6ec461ada1..ea9682eb62 100644 --- a/gst/gstclock.h +++ b/gst/gstclock.h @@ -84,7 +84,7 @@ typedef gpointer GstClockID; * * Constant to define an undefined clock time. */ -#define GST_CLOCK_STIME_NONE G_MININT64 +#define GST_CLOCK_STIME_NONE ((GstClockTimeDiff)G_MININT64) /** * GST_CLOCK_STIME_IS_VALID: * @time: signed clock time to validate @@ -101,25 +101,25 @@ typedef gpointer GstClockID; * * Constant that defines one GStreamer second. */ -#define GST_SECOND (G_USEC_PER_SEC * G_GINT64_CONSTANT (1000)) +#define GST_SECOND ((GstClockTime)(G_USEC_PER_SEC * G_GINT64_CONSTANT (1000))) /** * GST_MSECOND: (value 1000000) (type GstClockTime) * * Constant that defines one GStreamer millisecond. */ -#define GST_MSECOND (GST_SECOND / G_GINT64_CONSTANT (1000)) +#define GST_MSECOND ((GstClockTime)(GST_SECOND / G_GINT64_CONSTANT (1000))) /** * GST_USECOND: (value 1000) (type GstClockTime) * * Constant that defines one GStreamer microsecond. */ -#define GST_USECOND (GST_SECOND / G_GINT64_CONSTANT (1000000)) +#define GST_USECOND ((GstClockTime)(GST_SECOND / G_GINT64_CONSTANT (1000000))) /** * GST_NSECOND: (value 1) (type GstClockTime) * * Constant that defines one GStreamer nanosecond */ -#define GST_NSECOND (GST_SECOND / G_GINT64_CONSTANT (1000000000)) +#define GST_NSECOND ((GstClockTime)(GST_SECOND / G_GINT64_CONSTANT (1000000000))) /** diff --git a/gst/gstelementfactory.h b/gst/gstelementfactory.h index ca1bec0d55..5aaad32b42 100644 --- a/gst/gstelementfactory.h +++ b/gst/gstelementfactory.h @@ -107,33 +107,33 @@ gboolean gst_element_register (GstPlugin *plug typedef guint64 GstElementFactoryListType; -#define GST_ELEMENT_FACTORY_TYPE_DECODER (G_GUINT64_CONSTANT (1) << 0) -#define GST_ELEMENT_FACTORY_TYPE_ENCODER (G_GUINT64_CONSTANT (1) << 1) -#define GST_ELEMENT_FACTORY_TYPE_SINK (G_GUINT64_CONSTANT (1) << 2) -#define GST_ELEMENT_FACTORY_TYPE_SRC (G_GUINT64_CONSTANT (1) << 3) -#define GST_ELEMENT_FACTORY_TYPE_MUXER (G_GUINT64_CONSTANT (1) << 4) -#define GST_ELEMENT_FACTORY_TYPE_DEMUXER (G_GUINT64_CONSTANT (1) << 5) -#define GST_ELEMENT_FACTORY_TYPE_PARSER (G_GUINT64_CONSTANT (1) << 6) -#define GST_ELEMENT_FACTORY_TYPE_PAYLOADER (G_GUINT64_CONSTANT (1) << 7) -#define GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER (G_GUINT64_CONSTANT (1) << 8) -#define GST_ELEMENT_FACTORY_TYPE_FORMATTER (G_GUINT64_CONSTANT (1) << 9) -#define GST_ELEMENT_FACTORY_TYPE_DECRYPTOR (G_GUINT64_CONSTANT (1) << 10) -#define GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR (G_GUINT64_CONSTANT (1) << 11) +#define GST_ELEMENT_FACTORY_TYPE_DECODER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 0)) +#define GST_ELEMENT_FACTORY_TYPE_ENCODER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 1)) +#define GST_ELEMENT_FACTORY_TYPE_SINK ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 2)) +#define GST_ELEMENT_FACTORY_TYPE_SRC ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 3)) +#define GST_ELEMENT_FACTORY_TYPE_MUXER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 4)) +#define GST_ELEMENT_FACTORY_TYPE_DEMUXER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 5)) +#define GST_ELEMENT_FACTORY_TYPE_PARSER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 6)) +#define GST_ELEMENT_FACTORY_TYPE_PAYLOADER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 7)) +#define GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 8)) +#define GST_ELEMENT_FACTORY_TYPE_FORMATTER ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 9)) +#define GST_ELEMENT_FACTORY_TYPE_DECRYPTOR ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 10)) +#define GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 11)) -#define GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS (G_GUINT64_CONSTANT (1) << 48) +#define GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 48)) -#define GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO (G_GUINT64_CONSTANT (1) << 49) -#define GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO (G_GUINT64_CONSTANT (1) << 50) -#define GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE (G_GUINT64_CONSTANT (1) << 51) -#define GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE (G_GUINT64_CONSTANT (1) << 52) -#define GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA (G_GUINT64_CONSTANT (1) << 53) +#define GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 49)) +#define GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 50)) +#define GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 51)) +#define GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 52)) +#define GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA ((GstElementFactoryListType)(G_GUINT64_CONSTANT (1) << 53)) /** * GST_ELEMENT_FACTORY_TYPE_ANY: (value 562949953421311) (type GstElementFactoryListType) * * Elements of any of the defined GST_ELEMENT_FACTORY_LIST types */ -#define GST_ELEMENT_FACTORY_TYPE_ANY ((G_GUINT64_CONSTANT (1) << 49) - 1) +#define GST_ELEMENT_FACTORY_TYPE_ANY ((GstElementFactoryListType)((G_GUINT64_CONSTANT (1) << 49) - 1)) /** * GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY: (value 18446462598732840960) (type GstElementFactoryListType) @@ -144,28 +144,28 @@ typedef guint64 GstElementFactoryListType; * media types. If you wish to do this, simply don't specify any * GST_ELEMENT_FACTORY_TYPE_MEDIA flag. */ -#define GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY (~G_GUINT64_CONSTANT (0) << 48) +#define GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY ((GstElementFactoryListType)(~G_GUINT64_CONSTANT (0) << 48)) /** * GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER: (value 2814749767106562) (type GstElementFactoryListType) * * All encoders handling video or image media types */ -#define GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER (GST_ELEMENT_FACTORY_TYPE_ENCODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE) +#define GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER ((GstElementFactoryListType)(GST_ELEMENT_FACTORY_TYPE_ENCODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE)) /** * GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER: (value 1125899906842626) (type GstElementFactoryListType) * * All encoders handling audio media types */ -#define GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER (GST_ELEMENT_FACTORY_TYPE_ENCODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO) +#define GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER ((GstElementFactoryListType)(GST_ELEMENT_FACTORY_TYPE_ENCODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO)) /** * GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS: (value 3940649673949188) (type GstElementFactoryListType) * * All sinks handling audio, video or image media types */ -#define GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS (GST_ELEMENT_FACTORY_TYPE_SINK | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE) +#define GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS ((GstElementFactoryListType)(GST_ELEMENT_FACTORY_TYPE_SINK | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE)) /** * GST_ELEMENT_FACTORY_TYPE_DECODABLE: (value 353) (type GstElementFactoryListType) @@ -173,7 +173,7 @@ typedef guint64 GstElementFactoryListType; * All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders) */ #define GST_ELEMENT_FACTORY_TYPE_DECODABLE \ - (GST_ELEMENT_FACTORY_TYPE_DECODER | GST_ELEMENT_FACTORY_TYPE_DEMUXER | GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER | GST_ELEMENT_FACTORY_TYPE_PARSER | GST_ELEMENT_FACTORY_TYPE_DECRYPTOR) + ((GstElementFactoryListType)(GST_ELEMENT_FACTORY_TYPE_DECODER | GST_ELEMENT_FACTORY_TYPE_DEMUXER | GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER | GST_ELEMENT_FACTORY_TYPE_PARSER | GST_ELEMENT_FACTORY_TYPE_DECRYPTOR)) /* Element klass defines */ #define GST_ELEMENT_FACTORY_KLASS_DECODER "Decoder" diff --git a/gst/gstevent.h b/gst/gstevent.h index c6db49f1e4..d78764696a 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h @@ -50,12 +50,12 @@ typedef enum { } GstEventTypeFlags; /** - * GST_EVENT_TYPE_BOTH: + * GST_EVENT_TYPE_BOTH: (value 3) (type GstEventTypeFlags) * * The same thing as #GST_EVENT_TYPE_UPSTREAM | #GST_EVENT_TYPE_DOWNSTREAM. */ #define GST_EVENT_TYPE_BOTH \ - (GST_EVENT_TYPE_UPSTREAM | GST_EVENT_TYPE_DOWNSTREAM) + ((GstEventTypeFlags)(GST_EVENT_TYPE_UPSTREAM | GST_EVENT_TYPE_DOWNSTREAM)) #define GST_EVENT_NUM_SHIFT (8) diff --git a/gst/gstquery.h b/gst/gstquery.h index 19a5ddf989..fcc4bad5da 100644 --- a/gst/gstquery.h +++ b/gst/gstquery.h @@ -54,12 +54,12 @@ typedef enum { } GstQueryTypeFlags; /** - * GST_QUERY_TYPE_BOTH: + * GST_QUERY_TYPE_BOTH: (value 3) (type GstQueryTypeFlags) * * The same thing as #GST_QUERY_TYPE_UPSTREAM | #GST_QUERY_TYPE_DOWNSTREAM. */ #define GST_QUERY_TYPE_BOTH \ - (GST_QUERY_TYPE_UPSTREAM | GST_QUERY_TYPE_DOWNSTREAM) + ((GstQueryTypeFlags)(GST_QUERY_TYPE_UPSTREAM | GST_QUERY_TYPE_DOWNSTREAM)) #define GST_QUERY_NUM_SHIFT (8)