diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-04 11:09:26 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-02-04 11:12:14 +0100 |
commit | 3e2a880c6b9a23591501b9da594afa9284658bbd (patch) | |
tree | d232e0b31512eec5a9ebe1852c39db5b3401aae9 /gst | |
parent | c0557df34d85b9886913ee470b8c97355ced074c (diff) | |
download | gst-plugins-bad-3e2a880c6b9a23591501b9da594afa9284658bbd.tar.gz gst-plugins-bad-3e2a880c6b9a23591501b9da594afa9284658bbd.tar.bz2 gst-plugins-bad-3e2a880c6b9a23591501b9da594afa9284658bbd.zip |
Post an UMID tag with the current package's UMID
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mxf/mxf.c | 8 | ||||
-rw-r--r-- | gst/mxf/mxfdemux.c | 5 | ||||
-rw-r--r-- | gst/mxf/mxftypes.h | 2 |
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__ */ |