[0.11] gstreamer: tags: add GST_TAG_LANGUAGE_NAME

Tim Müller tpm at kemper.freedesktop.org
Sun Jan 1 18:35:19 PST 2012


Module: gstreamer
Branch: 0.11
Commit: cb23beda4fb9df87eba1f28ef0cd483287e38b66
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=cb23beda4fb9df87eba1f28ef0cd483287e38b66

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Mon Jan  2 00:17:17 2012 +0000

tags: add GST_TAG_LANGUAGE_NAME

API: GST_TAG_LANGUAGE_NAME

---

 docs/gst/gstreamer-sections.txt |    1 +
 gst/gsttaglist.c                |    6 +++++-
 gst/gsttaglist.h                |   17 ++++++++++++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt
index 5fc6ec6..58be88d 100644
--- a/docs/gst/gstreamer-sections.txt
+++ b/docs/gst/gstreamer-sections.txt
@@ -2329,6 +2329,7 @@ GST_TAG_ALBUM_GAIN
 GST_TAG_ALBUM_PEAK
 GST_TAG_REFERENCE_LEVEL
 GST_TAG_LANGUAGE_CODE
+GST_TAG_LANGUAGE_NAME
 GST_TAG_IMAGE
 GST_TAG_PREVIEW_IMAGE
 GST_TAG_ATTACHMENT
diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c
index 282c920..ac88c79 100644
--- a/gst/gsttaglist.c
+++ b/gst/gsttaglist.c
@@ -274,7 +274,11 @@ _gst_tag_initialize (void)
       _("reference level of track and album gain values"), NULL);
   gst_tag_register (GST_TAG_LANGUAGE_CODE, GST_TAG_FLAG_META, G_TYPE_STRING,
       _("language code"),
-      _("language code for this stream, conforming to ISO-639-1"), NULL);
+      _("language code for this stream, conforming to ISO-639-1 or ISO-639-2"),
+      NULL);
+  gst_tag_register (GST_TAG_LANGUAGE_NAME, GST_TAG_FLAG_META, G_TYPE_STRING,
+      _("language name"),
+      _("freeform name of the language this stream is in"), NULL);
   gst_tag_register (GST_TAG_IMAGE, GST_TAG_FLAG_META, GST_TYPE_BUFFER,
       _("image"), _("image related to this stream"), gst_tag_merge_use_first);
   gst_tag_register (GST_TAG_PREVIEW_IMAGE, GST_TAG_FLAG_META, GST_TYPE_BUFFER,
diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h
index 0cec033..96fcdb5 100644
--- a/gst/gsttaglist.h
+++ b/gst/gsttaglist.h
@@ -741,10 +741,25 @@ gboolean     gst_tag_list_get_buffer_index  (const GstTagList * list,
 /**
  * GST_TAG_LANGUAGE_CODE:
  *
- * Language code (ISO-639-1) (string) of the content
+ * ISO-639-2 or ISO-639-1 code for the language the content is in (string)
+ *
+ * There is utility API in libgsttag in gst-plugins-base to obtain a translated
+ * language name from the language code: gst_tag_get_language_name()
  */
 #define GST_TAG_LANGUAGE_CODE          "language-code"
 /**
+ * GST_TAG_LANGUAGE_NAME:
+ *
+ * Name of the language the content is in (string)
+ *
+ * Free-form name of the language the content is in, if a language code
+ * is not available. This tag should not be set in addition to a language
+ * code. It is undefined what language or locale the language name is in.
+ *
+ * Since: 0.10.37
+ */
+#define GST_TAG_LANGUAGE_NAME          "language-name"
+/**
  * GST_TAG_IMAGE:
  *
  * image (buffer) (buffer caps should specify the content type and preferably



More information about the gstreamer-commits mailing list