* @init_func: a #GstMetaInitFunction
* @free_func: a #GstMetaFreeFunction
* @transform_func: a #GstMetaTransformFunction
+ * @tags: a NULL terminated array of strings describing what the metadata
+ * contains info about.
*
* Register a new #GstMeta implementation.
*
const GstMetaInfo *
gst_meta_register (const gchar * api, const gchar * impl, gsize size,
GstMetaInitFunction init_func, GstMetaFreeFunction free_func,
- GstMetaTransformFunction transform_func)
+ GstMetaTransformFunction transform_func, const gchar ** tags)
{
GstMetaInfo *info;
+ guint len, i;
+ GQuark *qtags;
g_return_val_if_fail (api != NULL, NULL);
g_return_val_if_fail (impl != NULL, NULL);
g_return_val_if_fail (size != 0, NULL);
+ g_return_val_if_fail (tags != NULL, NULL);
info = g_slice_new (GstMetaInfo);
info->api = g_quark_from_string (api);
info->free_func = free_func;
info->transform_func = transform_func;
+ len = g_strv_length ((gchar **) tags);
+ qtags = g_new0 (GQuark, len);
+ for (i = 0; i < len; i++)
+ qtags[i] = g_quark_from_static_string (tags[i]);
+ info->tags = qtags;
+
GST_DEBUG ("register \"%s\" implementing \"%s\" of size %" G_GSIZE_FORMAT,
api, impl, size);
* @init_func: function for initializing the metadata
* @free_func: function for freeing the metadata
* @transform_func: function for transforming the metadata
+ * @tags: 0 terminated array of GQuarks describing what the metadata
+ * contains info about
*
* The #GstMetaInfo provides information about a specific metadata
* structure.
GstMetaFreeFunction free_func;
GstMetaTransformFunction transform_func;
+ const GQuark *tags;
+
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
gsize size,
GstMetaInitFunction init_func,
GstMetaFreeFunction free_func,
- GstMetaTransformFunction transform_func);
+ GstMetaTransformFunction transform_func,
+ const gchar **tags);
const GstMetaInfo * gst_meta_get_info (const gchar * impl);
G_END_DECLS
gst_net_address_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
+ static const gchar *tags[] = { "origin", NULL };
if (meta_info == NULL) {
meta_info = gst_meta_register ("GstNetAddressMeta", "GstNetAddressMeta",
sizeof (GstNetAddressMeta),
(GstMetaInitFunction) net_address_meta_init,
(GstMetaFreeFunction) net_address_meta_free,
- (GstMetaTransformFunction) net_address_meta_transform);
+ (GstMetaTransformFunction) net_address_meta_transform, tags);
}
return meta_info;
}