tags: add GST_TAG_LANGUAGE_NAME
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 2 Jan 2012 00:17:17 +0000 (00:17 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 2 Jan 2012 00:17:17 +0000 (00:17 +0000)
API: GST_TAG_LANGUAGE_NAME

docs/gst/gstreamer-sections.txt
gst/gsttaglist.c
gst/gsttaglist.h

index 5fc6ec6..58be88d 100644 (file)
@@ -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
index 282c920..ac88c79 100644 (file)
@@ -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,
index 0cec033..96fcdb5 100644 (file)
@@ -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