summaryrefslogtreecommitdiffstats
path: root/gst/mxf
diff options
context:
space:
mode:
Diffstat (limited to 'gst/mxf')
-rw-r--r--gst/mxf/mxf.c8
-rw-r--r--gst/mxf/mxfdemux.c5
-rw-r--r--gst/mxf/mxftypes.h2
3 files changed, 15 insertions, 0 deletions
diff --git a/gst/mxf/mxf.c b/gst/mxf/mxf.c
index 236e8358..58fa0302 100644
--- a/gst/mxf/mxf.c
+++ b/gst/mxf/mxf.c
@@ -36,9 +36,17 @@
GST_DEBUG_CATEGORY (mxf_debug);
#define GST_CAT_DEFAULT mxf_debug
+static void
+mxf_init (void)
+{
+ gst_tag_register (GST_TAG_MXF_UMID, GST_TAG_FLAG_META,
+ G_TYPE_STRING, "UMID", "Unique Material Identifier", NULL);
+}
+
static gboolean
plugin_init (GstPlugin * plugin)
{
+ mxf_init ();
mxf_metadata_init_types ();
mxf_aes_bwf_init ();
mxf_mpeg_init ();
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index dcef0e04..b6719bed 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -648,6 +648,7 @@ gst_mxf_demux_choose_package (GstMXFDemux * demux)
done:
if (memcmp (&ret->package_uid, &demux->current_package_uid, 32) != 0) {
gchar current_package_string[96];
+ GstTagList *tags = gst_tag_list_new ();
gst_mxf_demux_remove_pads (demux);
memcpy (&demux->current_package_uid, &ret->package_uid, 32);
@@ -655,6 +656,10 @@ done:
mxf_umid_to_string (&ret->package_uid, current_package_string);
demux->current_package_string = g_strdup (current_package_string);
g_object_notify (G_OBJECT (demux), "package");
+
+ gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_MXF_UMID,
+ demux->current_package_string, NULL);
+ gst_element_found_tags (GST_ELEMENT_CAST (demux), tags);
}
demux->current_package = ret;
diff --git a/gst/mxf/mxftypes.h b/gst/mxf/mxftypes.h
index 73f4a834..a59ac742 100644
--- a/gst/mxf/mxftypes.h
+++ b/gst/mxf/mxftypes.h
@@ -154,4 +154,6 @@ typedef struct {
GHashTable *other_tags;
} MXFIndexTableSegment;
+#define GST_TAG_MXF_UMID "mxf-umid"
+
#endif /* __MXF_TYPES_H__ */