From 541c061ee81c07b1f36869e897cb2cbe4b34effc Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Thu, 15 Aug 2013 11:03:47 +0100 Subject: [PATCH] tag: add musical-key tag https://bugzilla.gnome.org/show_bug.cgi?id=705999 --- gst-libs/gst/tag/tag.h | 15 +++++++++++++++ gst-libs/gst/tag/tags.c | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/gst-libs/gst/tag/tag.h b/gst-libs/gst/tag/tag.h index 896bc1cdb2..48631d3559 100644 --- a/gst-libs/gst/tag/tag.h +++ b/gst-libs/gst/tag/tag.h @@ -81,6 +81,21 @@ G_BEGIN_DECLS * Annodex CMML clip element tag */ #define GST_TAG_CMML_CLIP "cmml-clip" +/** + * GST_TAG_MUSICAL_KEY: + * + * Musical key in which the sound starts. It is represented as a string + * with a maximum length of three characters. The ground keys are + * represented with "A","B","C","D","E", "F" and "G" and halfkeys + * represented with "b" and "#". Minor is represented as "m" (e.g. "Dbm"). + * Off key is represented with an "o" only. + * This notation might be extended in the future to support non-minor/major + * keys. + * + * Since: 1.2 + */ +#define GST_TAG_MUSICAL_KEY "musical-key" + /* CDDA tags */ diff --git a/gst-libs/gst/tag/tags.c b/gst-libs/gst/tag/tags.c index 7845d4bd0d..b4952f6921 100644 --- a/gst-libs/gst/tag/tags.c +++ b/gst-libs/gst/tag/tags.c @@ -194,6 +194,10 @@ gst_tag_register_tags_internal (gpointer unused) GST_TYPE_BUFFER, _("ID3v2 frame"), _("unparsed id3v2 tag frame"), gst_tag_merge_use_first); + gst_tag_register_static (GST_TAG_MUSICAL_KEY, GST_TAG_FLAG_META, + G_TYPE_STRING, _("musical-key"), _("Initial key in which the " + "sound starts"), gst_tag_merge_use_first); + return NULL; }