typedef some structs before including other files to avoid circular dependencies
in the header files.
#include <gst/gstindexfactory.h>
#include <gst/gstiterator.h>
#include <gst/gstmessage.h>
+#include <gst/gstquery.h>
#include <gst/gsttaglist.h>
G_BEGIN_DECLS
#include <gst/gstobject.h>
#include <gst/gstplugin.h>
#include <gst/gstpluginfeature.h>
+#include <gst/gstpadtemplate.h>
#include <gst/gstiterator.h>
G_BEGIN_DECLS
#ifndef __GST_EVENT_H__
#define __GST_EVENT_H__
+typedef struct _GstEvent GstEvent;
+
#include <gst/gstminiobject.h>
#include <gst/gstformat.h>
#include <gst/gstobject.h>
#include <gst/gststructure.h>
#include <gst/gsttaglist.h>
#include <gst/gstsegment.h>
+#include <gst/gstsegment.h>
+#include <gst/gstmessage.h>
G_BEGIN_DECLS
extern GType _gst_event_type;
-typedef struct _GstEvent GstEvent;
#define GST_TYPE_EVENT (_gst_event_type)
#define GST_IS_EVENT(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_EVENT))
void gst_event_parse_buffer_size (GstEvent *event, GstFormat *format, gint64 *minsize,
gint64 *maxsize, gboolean *async);
+/* sink message */
+GstEvent* gst_event_new_sink_message (GstMessage *msg);
+void gst_event_parse_sink_message (GstEvent *event, GstMessage **msg);
+
/* QOS events */
GstEvent* gst_event_new_qos (GstQOSType type, gdouble proportion,
GstClockTimeDiff diff, GstClockTime timestamp);
#include <gst/gstelement.h>
#include <gst/gsttaglist.h>
#include <gst/gststructure.h>
+#include <gst/gstquery.h>
/**
* GST_MESSAGE_TRACE_NAME:
#include <gst/gstconfig.h>
+typedef struct _GstPad GstPad;
+typedef struct _GstPadPrivate GstPadPrivate;
+typedef struct _GstPadClass GstPadClass;
+
+/**
+ * GstPadDirection:
+ * @GST_PAD_UNKNOWN: direction is unknown.
+ * @GST_PAD_SRC: the pad is a source pad.
+ * @GST_PAD_SINK: the pad is a sink pad.
+ *
+ * The direction of a pad.
+ */
+typedef enum {
+ GST_PAD_UNKNOWN,
+ GST_PAD_SRC,
+ GST_PAD_SINK
+} GstPadDirection;
+
#include <gst/gstobject.h>
#include <gst/gstbuffer.h>
#include <gst/gstbufferlist.h>
#include <gst/gstcaps.h>
+#include <gst/gstpadtemplate.h>
#include <gst/gstevent.h>
#include <gst/gstquery.h>
#include <gst/gsttask.h>
#define GST_PAD_CAST(obj) ((GstPad*)(obj))
-typedef struct _GstPad GstPad;
-typedef struct _GstPadPrivate GstPadPrivate;
-typedef struct _GstPadClass GstPadClass;
/**
* GstPadLinkReturn:
*/
typedef GstFlowReturn (*GstPadStickyEventsForeachFunction) (GstPad *pad, GstEvent *event, gpointer user_data);
-/**
- * GstPadDirection:
- * @GST_PAD_UNKNOWN: direction is unknown.
- * @GST_PAD_SRC: the pad is a source pad.
- * @GST_PAD_SINK: the pad is a sink pad.
- *
- * The direction of a pad.
- */
-typedef enum {
- GST_PAD_UNKNOWN,
- GST_PAD_SRC,
- GST_PAD_SINK
-} GstPadDirection;
-
/**
* GstPadFlags:
* @GST_PAD_BLOCKED: is dataflow on a pad blocked
GST_PAD_FLAG_LAST = (GST_OBJECT_FLAG_LAST << 16)
} GstPadFlags;
-/* FIXME: this awful circular dependency need to be resolved properly (see padtemplate.h) */
-typedef struct _GstPadTemplate GstPadTemplate;
-
/**
* GstPad:
* @element_private: private data owned by the parent element
#include <gst/gstconfig.h>
+typedef struct _GstPadTemplate GstPadTemplate;
+typedef struct _GstPadTemplateClass GstPadTemplateClass;
+typedef struct _GstStaticPadTemplate GstStaticPadTemplate;
+
#include <gst/gstobject.h>
#include <gst/gstbuffer.h>
#include <gst/gstcaps.h>
G_BEGIN_DECLS
-/* FIXME: this awful circular dependency need to be resolved properly (see pad.h) */
-/*typedef struct _GstPadTemplate GstPadTemplate; */
-typedef struct _GstPadTemplateClass GstPadTemplateClass;
-typedef struct _GstStaticPadTemplate GstStaticPadTemplate;
-
#define GST_TYPE_STATIC_PAD_TEMPLATE (gst_static_pad_template_get_type ())
#define GST_TYPE_PAD_TEMPLATE (gst_pad_template_get_type ())
* SECTION:gstutils
* @short_description: Various utility functions
*
- * When defining own plugins, use the GST_BOILERPLATE ease gobject creation.
*/
#include "gst_private.h"
gint gst_util_fraction_compare (gint a_n, gint a_d, gint b_n, gint b_d);
-/* sink message event
- *
- * FIXME: This should be in gstevent.h but can't because
- * it needs GstMessage and this would introduce circular
- * header includes. And forward declarations of typedefs
- * are unfortunately not possible. The implementation of
- * these functions is in gstevent.c.
- */
-GstEvent* gst_event_new_sink_message (GstMessage *msg);
-void gst_event_parse_sink_message (GstEvent *event, GstMessage **msg);
-
-
G_END_DECLS
#endif /* __GST_UTILS_H__ */