gstpad: Probes that return HANDLED can reset the data info field
[platform/upstream/gstreamer.git] / gst / gstmeta.h
index 0020a09..d617ef8 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef __GST_META_H__
 #define __GST_META_H__
 
+#include <glib.h>
+
 G_BEGIN_DECLS
 
 typedef struct _GstMeta GstMeta;
@@ -103,6 +105,8 @@ struct _GstMeta {
   const GstMetaInfo *info;
 };
 
+#include <gst/gstbuffer.h>
+
 /**
  * GstMetaInitFunction:
  * @meta: a #GstMeta
@@ -127,7 +131,8 @@ typedef void (*GstMetaFreeFunction)     (GstMeta *meta, GstBuffer *buffer);
  *
  * GQuark for the "gst-copy" transform.
  */
-GST_EXPORT GQuark _gst_meta_transform_copy;
+
+GST_API GQuark _gst_meta_transform_copy;
 
 /**
  * GST_META_TRANSFORM_IS_COPY:
@@ -175,8 +180,8 @@ typedef gboolean (*GstMetaTransformFunction) (GstBuffer *transbuf,
 
 /**
  * GstMetaInfo:
- * @api: tag indentifying the metadata structure and api
- * @type: type indentifying the implementor of the api
+ * @api: tag identifying the metadata structure and api
+ * @type: type identifying the implementor of the api
  * @size: size of the metadata
  * @init_func: function for initializing the metadata
  * @free_func: function for freeing the metadata
@@ -194,24 +199,39 @@ struct _GstMetaInfo {
   GstMetaFreeFunction        free_func;
   GstMetaTransformFunction   transform_func;
 
-  /*< private >*/
-  gpointer _gst_reserved[GST_PADDING];
+  /* No padding needed, GstMetaInfo is always allocated by GStreamer and is
+   * not subclassable or stack-allocatable, so we can extend it as we please
+   * just like interfaces */
 };
 
+GST_API
 GType                gst_meta_api_type_register (const gchar *api,
                                                  const gchar **tags);
+GST_API
 gboolean             gst_meta_api_type_has_tag  (GType api, GQuark tag);
 
+GST_API
 const GstMetaInfo *  gst_meta_register          (GType api, const gchar *impl,
                                                  gsize size,
                                                  GstMetaInitFunction      init_func,
                                                  GstMetaFreeFunction      free_func,
                                                  GstMetaTransformFunction transform_func);
+GST_API
 const GstMetaInfo *  gst_meta_get_info          (const gchar * impl);
+
+GST_API
 const gchar* const*  gst_meta_api_type_get_tags (GType api);
 
+GST_API
+guint64              gst_meta_get_seqnum        (const GstMeta * meta);
+
+GST_API
+gint                 gst_meta_compare_seqnum    (const GstMeta * meta1,
+                                                 const GstMeta * meta2);
+
 /* some default tags */
-GST_EXPORT GQuark _gst_meta_tag_memory;
+
+GST_API GQuark _gst_meta_tag_memory;
 
 /**
  * GST_META_TAG_MEMORY:
@@ -222,7 +242,9 @@ GST_EXPORT GQuark _gst_meta_tag_memory;
  * Deprecated: The GQuarks are not exported by any public API, use
  *   GST_META_TAG_MEMORY_STR instead.
  */
+#ifndef GST_DISABLE_DEPRECATED
 #define GST_META_TAG_MEMORY (_gst_meta_tag_memory)
+#endif
 
 G_END_DECLS