From 1ecabcd1c5d36c4b99e0ae225c056301df3532fd Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Sat, 3 Feb 2024 11:51:27 +0000 Subject: [PATCH] taglist: Register new tag for container specific track ID Unique identifier for the audio, video or text track this tag is associated with. The mappings for several container formats are defined in the [Sourcing In-band Media Resource Tracks from Media Containers into HTML specification](https://dev.w3.org/html5/html-sourcing-inband-tracks). Based on previous patch by Brendan Long. Fixes #45 Part-of: --- girs/Gst-1.0.gir | 8 ++++++++ subprojects/gstreamer/gst/gsttaglist.c | 4 +++- subprojects/gstreamer/gst/gsttaglist.h | 12 ++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/girs/Gst-1.0.gir b/girs/Gst-1.0.gir index 949027a276..c6a163dadb 100644 --- a/girs/Gst-1.0.gir +++ b/girs/Gst-1.0.gir @@ -43197,6 +43197,14 @@ attachment) + + Unique identifier for the audio, video or text track this tag is associated +with. The mappings for several container formats are defined in the [Sourcing +In-band Media Resource Tracks from Media Containers into HTML +specification](https://dev.w3.org/html5/html-sourcing-inband-tracks/). + + + copyright notice of the data (string) diff --git a/subprojects/gstreamer/gst/gsttaglist.c b/subprojects/gstreamer/gst/gsttaglist.c index eb3f9ce64a..222c350223 100644 --- a/subprojects/gstreamer/gst/gsttaglist.c +++ b/subprojects/gstreamer/gst/gsttaglist.c @@ -410,7 +410,9 @@ _priv_gst_tag_initialize (void) gst_tag_register_static (GST_TAG_PRIVATE_DATA, GST_TAG_FLAG_META, GST_TYPE_SAMPLE, _("private-data"), _("Private data"), gst_tag_merge_use_first); - + gst_tag_register_static (GST_TAG_CONTAINER_SPECIFIC_TRACK_ID, + GST_TAG_FLAG_META, G_TYPE_STRING, + _("container-specific-track-id"), _("Container-specific Track ID"), NULL); } /** diff --git a/subprojects/gstreamer/gst/gsttaglist.h b/subprojects/gstreamer/gst/gsttaglist.h index c15ea2d34f..1bd01de3aa 100644 --- a/subprojects/gstreamer/gst/gsttaglist.h +++ b/subprojects/gstreamer/gst/gsttaglist.h @@ -1115,6 +1115,18 @@ gboolean gst_tag_list_take (GstTagList ** old_taglist, */ #define GST_TAG_PRIVATE_DATA "private-data" +/** + * GST_TAG_CONTAINER_SPECIFIC_TRACK_ID: + * + * Unique identifier for the audio, video or text track this tag is associated + * with. The mappings for several container formats are defined in the [Sourcing + * In-band Media Resource Tracks from Media Containers into HTML + * specification](https://dev.w3.org/html5/html-sourcing-inband-tracks/). + * + * Since: 1.24 + */ +#define GST_TAG_CONTAINER_SPECIFIC_TRACK_ID "container-specific-track-id" + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTagList, gst_tag_list_unref) G_END_DECLS