From 76f049bc49fc6fc56ca19d64749cfbe2f601c3c9 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 11 Jan 2017 17:25:08 -0300 Subject: [PATCH] gst: Fix includes so that files can be built separately It used to work but it has broke in the 1.10 cycle. --- gst/gstbuffer.h | 2 ++ gst/gstcontrolbinding.h | 4 +-- gst/gstelement.h | 36 +++++++++++++------------- gst/gstevent.h | 3 +++ gst/gstmemory.h | 1 + gst/gstmessage.h | 5 ++++ gst/gstmeta.h | 3 ++- gst/gstquery.h | 53 +++++++++++++++++++++------------------ gst/gststreamcollection.h | 4 ++- gst/gststreams.h | 7 +++--- gst/gsttracer.h | 1 + gst/gsturi.h | 8 +++--- 12 files changed, 74 insertions(+), 53 deletions(-) diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index be6fae8524..37b73a5c43 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -35,6 +35,8 @@ GST_EXPORT GType _gst_buffer_type; typedef struct _GstBuffer GstBuffer; typedef struct _GstBufferPool GstBufferPool; +#include + #define GST_TYPE_BUFFER (_gst_buffer_type) #define GST_IS_BUFFER(obj) (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_BUFFER)) #define GST_BUFFER_CAST(obj) ((GstBuffer *)(obj)) diff --git a/gst/gstcontrolbinding.h b/gst/gstcontrolbinding.h index 9a73d4132b..8d69b93843 100644 --- a/gst/gstcontrolbinding.h +++ b/gst/gstcontrolbinding.h @@ -27,8 +27,6 @@ #include -#include - G_BEGIN_DECLS #define GST_TYPE_CONTROL_BINDING \ @@ -48,6 +46,8 @@ typedef struct _GstControlBinding GstControlBinding; typedef struct _GstControlBindingClass GstControlBindingClass; typedef struct _GstControlBindingPrivate GstControlBindingPrivate; +#include + /* FIXME(2.0): remove, this is unused */ typedef void (* GstControlBindingConvert) (GstControlBinding *binding, gdouble src_value, GValue *dest_value); diff --git a/gst/gstelement.h b/gst/gstelement.h index 25038bcafe..ed9bf64521 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -24,6 +24,10 @@ #ifndef __GST_ELEMENT_H__ #define __GST_ELEMENT_H__ +#include + +G_BEGIN_DECLS + /* gstelement.h and gstelementfactory.h include eachother */ typedef struct _GstElement GstElement; typedef struct _GstElementClass GstElementClass; @@ -51,22 +55,6 @@ typedef enum { GST_STATE_PLAYING = 4 } GstState; - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -G_BEGIN_DECLS - #define GST_TYPE_ELEMENT (gst_element_get_type ()) #define GST_IS_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_ELEMENT)) #define GST_IS_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_ELEMENT)) @@ -84,7 +72,7 @@ G_BEGIN_DECLS * cannot produce data in %GST_STATE_PAUSED. * This typically happens with live sources. * - * The possible return values from a state change function such as + * The possible return values from a state change function such as * gst_element_set_state(). Only @GST_STATE_CHANGE_FAILURE is a real failure. */ typedef enum { @@ -94,6 +82,20 @@ typedef enum { GST_STATE_CHANGE_NO_PREROLL = 3 } GstStateChangeReturn; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + /* NOTE: this probably should be done with an #ifdef to decide * whether to safe-cast or to just do the non-checking cast. */ diff --git a/gst/gstevent.h b/gst/gstevent.h index 1092040177..c6db49f1e4 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h @@ -216,6 +216,9 @@ typedef enum { #include #include #include +#include +#include +#include G_BEGIN_DECLS diff --git a/gst/gstmemory.h b/gst/gstmemory.h index 9ea1fa6206..9b972f220c 100644 --- a/gst/gstmemory.h +++ b/gst/gstmemory.h @@ -27,6 +27,7 @@ #include #include +#include G_BEGIN_DECLS diff --git a/gst/gstmessage.h b/gst/gstmessage.h index 7ad471daf1..735dd8017a 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -22,6 +22,8 @@ #ifndef __GST_MESSAGE_H__ #define __GST_MESSAGE_H__ +#include + G_BEGIN_DECLS typedef struct _GstMessage GstMessage; @@ -180,6 +182,7 @@ typedef enum #include #include #include +#include #include GST_EXPORT GType _gst_message_type; @@ -337,6 +340,8 @@ struct _GstMessage GCond cond; }; +#include + GType gst_message_get_type (void); const gchar* gst_message_type_get_name (GstMessageType type); diff --git a/gst/gstmeta.h b/gst/gstmeta.h index d6aaa67e93..166599d1e4 100644 --- a/gst/gstmeta.h +++ b/gst/gstmeta.h @@ -24,7 +24,6 @@ #define __GST_META_H__ #include -#include G_BEGIN_DECLS @@ -106,6 +105,8 @@ struct _GstMeta { const GstMetaInfo *info; }; +#include + /** * GstMetaInitFunction: * @meta: a #GstMeta diff --git a/gst/gstquery.h b/gst/gstquery.h index 9f7353c6da..19a5ddf989 100644 --- a/gst/gstquery.h +++ b/gst/gstquery.h @@ -27,20 +27,15 @@ #define __GST_QUERY_H__ #include - -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include G_BEGIN_DECLS typedef struct _GstQuery GstQuery; +#include + /** * GstQueryTypeFlags: * @GST_QUERY_TYPE_UPSTREAM: Set if the query can travel upstream. @@ -193,6 +188,30 @@ struct _GstQuery GstQueryType type; }; +/** + * GstBufferingMode: + * @GST_BUFFERING_STREAM: a small amount of data is buffered + * @GST_BUFFERING_DOWNLOAD: the stream is being downloaded + * @GST_BUFFERING_TIMESHIFT: the stream is being downloaded in a ringbuffer + * @GST_BUFFERING_LIVE: the stream is a live stream + * + * The different types of buffering methods. + */ +typedef enum { + GST_BUFFERING_STREAM, + GST_BUFFERING_DOWNLOAD, + GST_BUFFERING_TIMESHIFT, + GST_BUFFERING_LIVE +} GstBufferingMode; + +#include +#include +#include +#include +#include +#include +#include + const gchar* gst_query_type_get_name (GstQueryType type); GQuark gst_query_type_to_quark (GstQueryType type); GstQueryTypeFlags @@ -338,22 +357,6 @@ void gst_query_parse_n_formats (GstQuery *query, guint *n_forma void gst_query_parse_nth_format (GstQuery *query, guint nth, GstFormat *format); /* buffering query */ -/** - * GstBufferingMode: - * @GST_BUFFERING_STREAM: a small amount of data is buffered - * @GST_BUFFERING_DOWNLOAD: the stream is being downloaded - * @GST_BUFFERING_TIMESHIFT: the stream is being downloaded in a ringbuffer - * @GST_BUFFERING_LIVE: the stream is a live stream - * - * The different types of buffering methods. - */ -typedef enum { - GST_BUFFERING_STREAM, - GST_BUFFERING_DOWNLOAD, - GST_BUFFERING_TIMESHIFT, - GST_BUFFERING_LIVE -} GstBufferingMode; - GstQuery* gst_query_new_buffering (GstFormat format) G_GNUC_MALLOC; void gst_query_set_buffering_percent (GstQuery *query, gboolean busy, gint percent); void gst_query_parse_buffering_percent (GstQuery *query, gboolean *busy, gint *percent); diff --git a/gst/gststreamcollection.h b/gst/gststreamcollection.h index c1b8caac35..1428a13916 100644 --- a/gst/gststreamcollection.h +++ b/gst/gststreamcollection.h @@ -26,7 +26,6 @@ #define __GST_STREAM_COLLECTION_H__ #include -#include G_BEGIN_DECLS @@ -42,6 +41,9 @@ typedef struct _GstStreamCollection GstStreamCollection; typedef struct _GstStreamCollectionClass GstStreamCollectionClass; typedef struct _GstStreamCollectionPrivate GstStreamCollectionPrivate; +#include +#include + /** * GstStreamCollection: * diff --git a/gst/gststreams.h b/gst/gststreams.h index 4cd185851d..dc31ad04f2 100644 --- a/gst/gststreams.h +++ b/gst/gststreams.h @@ -26,7 +26,6 @@ #define __GST_STREAMS_H__ #include -#include G_BEGIN_DECLS @@ -69,7 +68,7 @@ typedef struct _GstStreamPrivate GstStreamPrivate; /** * GstStream: * @stream_id: The Stream Identifier for this #GstStream - * + * * A high-level object representing a single stream. It might be backed, or * not, by an actual flow of data in a pipeline (#GstPad). * @@ -103,13 +102,15 @@ struct _GstStream { */ struct _GstStreamClass { GstObjectClass parent_class; - + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; GType gst_stream_get_type (void); +#include + GstStream *gst_stream_new (const gchar *stream_id, GstCaps *caps, GstStreamType type, diff --git a/gst/gsttracer.h b/gst/gsttracer.h index dd79a72305..b77af068d4 100644 --- a/gst/gsttracer.h +++ b/gst/gsttracer.h @@ -24,6 +24,7 @@ #include #include +#include #include G_BEGIN_DECLS diff --git a/gst/gsturi.h b/gst/gsturi.h index 9a78fa3be0..0ed3baa131 100644 --- a/gst/gsturi.h +++ b/gst/gsturi.h @@ -28,10 +28,6 @@ #include #include -#include -#include - -#include "gstminiobject.h" G_BEGIN_DECLS @@ -100,6 +96,10 @@ typedef enum { typedef struct _GstURIHandler GstURIHandler; typedef struct _GstURIHandlerInterface GstURIHandlerInterface; +#include +#include +#include "gstminiobject.h" + /** * GstURIHandlerInterface: * @parent: The parent interface type