#include "gstvalue.h"
#include "gstbuffer.h"
#include "gstquark.h"
+#include "gststructure.h"
#include <gobject/gvaluecollector.h>
#include <string.h>
#define GST_TAG_IS_VALID(tag) (gst_tag_get_info (tag) != NULL)
+/* FIXME 0.11: make taglists refcounted maybe? */
+/* a tag list is basically a structure, but we don't make this fact public */
+struct _GstTagList
+{
+ GstStructure structure;
+};
+
/* FIXME 0.11: use GParamSpecs or something similar for tag registrations,
* possibly even gst_tag_register(). Especially value ranges might be
* useful for some tags. */
typedef struct
{
- GstStructure *list;
+ GstTagList *list;
GstTagMergeMode mode;
}
GstTagCopyData;
static void
-gst_tag_list_add_value_internal (GstStructure * list, GstTagMergeMode mode,
+gst_tag_list_add_value_internal (GstTagList * tag_list, GstTagMergeMode mode,
const gchar * tag, const GValue * value, GstTagInfo * info)
{
+ GstStructure *list = GST_STRUCTURE (tag_list);
const GValue *value2;
GQuark tag_quark;
g_return_if_fail (GST_IS_TAG_LIST (from));
g_return_if_fail (GST_TAG_MODE_IS_VALID (mode));
- data.list = (GstStructure *) into;
+ data.list = into;
data.mode = mode;
if (mode == GST_TAG_MERGE_REPLACE_ALL) {
- gst_structure_remove_all_fields (data.list);
+ gst_structure_remove_all_fields (GST_STRUCTURE (data.list));
}
gst_structure_foreach ((GstStructure *) from, gst_tag_list_copy_foreach,
&data);
g_return_if_fail (tag != NULL);
if (mode == GST_TAG_MERGE_REPLACE_ALL) {
- gst_structure_remove_all_fields (list);
+ gst_structure_remove_all_fields (GST_STRUCTURE (list));
}
while (tag != NULL) {
g_return_if_fail (tag != NULL);
if (mode == GST_TAG_MERGE_REPLACE_ALL) {
- gst_structure_remove_all_fields (list);
+ gst_structure_remove_all_fields (GST_STRUCTURE (list));
}
while (tag != NULL) {
#include <gst/gstdatetime.h>
#include <gst/gstbuffer.h>
-#include <gst/gststructure.h>
#include <gst/glib-compat.h>
G_BEGIN_DECLS
#define GST_TAG_FLAG_IS_VALID(flag) (((flag) > GST_TAG_FLAG_UNDEFINED) && ((flag) < GST_TAG_FLAG_COUNT))
-/* FIXME 0.11: Don't typedef GstTagList to be a GstStructure, they're
- * internally the same but not from an API point of view.
- * See bug #518934.
- */
/**
* GstTagList:
*
* Opaque #GstTagList data structure.
*/
-#ifdef _FOOL_GTK_DOC_
-typedef struct _GstTagList GstTagList;
-#else
-#ifdef IN_GOBJECT_INTROSPECTION
typedef struct _GstTagList GstTagList;
-#else
-typedef GstStructure GstTagList;
-#endif
-#endif
#define GST_TAG_LIST(x) ((GstTagList *) (x))
#define GST_IS_TAG_LIST(x) ((x) != NULL && gst_is_tag_list (GST_TAG_LIST (x)))