mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
Post an UMID tag with the current package's UMID
This commit is contained in:
parent
c0557df34d
commit
3e2a880c6b
3 changed files with 15 additions and 0 deletions
|
@ -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 ();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -154,4 +154,6 @@ typedef struct {
|
|||
GHashTable *other_tags;
|
||||
} MXFIndexTableSegment;
|
||||
|
||||
#define GST_TAG_MXF_UMID "mxf-umid"
|
||||
|
||||
#endif /* __MXF_TYPES_H__ */
|
||||
|
|
Loading…
Reference in a new issue