gst: Fix includes so that files can be built separately

It used to work but it has broke in the 1.10 cycle.
This commit is contained in:
Thibault Saunier 2017-01-11 17:25:08 -03:00
parent 6c9a092def
commit 76f049bc49
12 changed files with 74 additions and 53 deletions

View file

@ -35,6 +35,8 @@ GST_EXPORT GType _gst_buffer_type;
typedef struct _GstBuffer GstBuffer;
typedef struct _GstBufferPool GstBufferPool;
#include <gst/gstmeta.h>
#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))

View file

@ -27,8 +27,6 @@
#include <glib-object.h>
#include <gst/gstcontrolsource.h>
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 <gst/gstcontrolsource.h>
/* FIXME(2.0): remove, this is unused */
typedef void (* GstControlBindingConvert) (GstControlBinding *binding, gdouble src_value, GValue *dest_value);

View file

@ -24,6 +24,10 @@
#ifndef __GST_ELEMENT_H__
#define __GST_ELEMENT_H__
#include <glib.h>
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 <gst/gstconfig.h>
#include <gst/gstobject.h>
#include <gst/gstpad.h>
#include <gst/gstbus.h>
#include <gst/gstclock.h>
#include <gst/gstelementfactory.h>
#include <gst/gstplugin.h>
#include <gst/gstpluginfeature.h>
#include <gst/gstiterator.h>
#include <gst/gstmessage.h>
#include <gst/gstquery.h>
#include <gst/gsttaglist.h>
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 <gst/gstconfig.h>
#include <gst/gstobject.h>
#include <gst/gstpad.h>
#include <gst/gstbus.h>
#include <gst/gstclock.h>
#include <gst/gstelementfactory.h>
#include <gst/gstplugin.h>
#include <gst/gstpluginfeature.h>
#include <gst/gstiterator.h>
#include <gst/gstmessage.h>
#include <gst/gstquery.h>
#include <gst/gsttaglist.h>
#include <gst/gstcontext.h>
/* NOTE: this probably should be done with an #ifdef to decide
* whether to safe-cast or to just do the non-checking cast.
*/

View file

@ -216,6 +216,9 @@ typedef enum {
#include <gst/gstsegment.h>
#include <gst/gstmessage.h>
#include <gst/gstcontext.h>
#include <gst/gststreams.h>
#include <gst/gsttoc.h>
#include <gst/gststreamcollection.h>
G_BEGIN_DECLS

View file

@ -27,6 +27,7 @@
#include <glib-object.h>
#include <gst/gstminiobject.h>
#include <gst/gstobject.h>
G_BEGIN_DECLS

View file

@ -22,6 +22,8 @@
#ifndef __GST_MESSAGE_H__
#define __GST_MESSAGE_H__
#include <glib.h>
G_BEGIN_DECLS
typedef struct _GstMessage GstMessage;
@ -180,6 +182,7 @@ typedef enum
#include <gst/gstquery.h>
#include <gst/gsttoc.h>
#include <gst/gstdevice.h>
#include <gst/gststreams.h>
#include <gst/gststreamcollection.h>
GST_EXPORT GType _gst_message_type;
@ -337,6 +340,8 @@ struct _GstMessage
GCond cond;
};
#include <gst/gstquery.h>
GType gst_message_get_type (void);
const gchar* gst_message_type_get_name (GstMessageType type);

View file

@ -24,7 +24,6 @@
#define __GST_META_H__
#include <glib.h>
#include <gst/gstbuffer.h>
G_BEGIN_DECLS
@ -106,6 +105,8 @@ struct _GstMeta {
const GstMetaInfo *info;
};
#include <gst/gstbuffer.h>
/**
* GstMetaInitFunction:
* @meta: a #GstMeta

View file

@ -27,20 +27,15 @@
#define __GST_QUERY_H__
#include <glib.h>
#include <gst/gstiterator.h>
#include <gst/gstminiobject.h>
#include <gst/gststructure.h>
#include <gst/gstformat.h>
#include <gst/gstpad.h>
#include <gst/gstallocator.h>
#include <gst/gsttoc.h>
#include <gst/gstcontext.h>
#include <glib-object.h>
#include <gst/gstconfig.h>
G_BEGIN_DECLS
typedef struct _GstQuery GstQuery;
#include <gst/gstminiobject.h>
/**
* 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 <gst/gstiterator.h>
#include <gst/gststructure.h>
#include <gst/gstformat.h>
#include <gst/gstpad.h>
#include <gst/gstallocator.h>
#include <gst/gsttoc.h>
#include <gst/gstcontext.h>
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);

View file

@ -26,7 +26,6 @@
#define __GST_STREAM_COLLECTION_H__
#include <gst/gstobject.h>
#include <gst/gststreams.h>
G_BEGIN_DECLS
@ -42,6 +41,9 @@ typedef struct _GstStreamCollection GstStreamCollection;
typedef struct _GstStreamCollectionClass GstStreamCollectionClass;
typedef struct _GstStreamCollectionPrivate GstStreamCollectionPrivate;
#include <gst/gststreamcollection.h>
#include <gst/gststreams.h>
/**
* GstStreamCollection:
*

View file

@ -26,7 +26,6 @@
#define __GST_STREAMS_H__
#include <gst/gstobject.h>
#include <gst/gstevent.h>
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 <gst/gstevent.h>
GstStream *gst_stream_new (const gchar *stream_id,
GstCaps *caps,
GstStreamType type,

View file

@ -24,6 +24,7 @@
#include <glib.h>
#include <glib-object.h>
#include <gst/gstobject.h>
#include <gst/gstconfig.h>
G_BEGIN_DECLS

View file

@ -28,10 +28,6 @@
#include <glib.h>
#include <glib-object.h>
#include <gst/gstelement.h>
#include <gst/gstconfig.h>
#include "gstminiobject.h"
G_BEGIN_DECLS
@ -100,6 +96,10 @@ typedef enum {
typedef struct _GstURIHandler GstURIHandler;
typedef struct _GstURIHandlerInterface GstURIHandlerInterface;
#include <gst/gstelement.h>
#include <gst/gstconfig.h>
#include "gstminiobject.h"
/**
* GstURIHandlerInterface:
* @parent: The parent interface type