Add GST_TAG_LANGUAGE_CODE as we have in 0.8, and don't spew out a warning if a tag that is already registered is re-r...

Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsttag.c: (_gst_tag_initialize), (gst_tag_register):
* gst/gsttag.h:
Add GST_TAG_LANGUAGE_CODE as we have in 0.8, and don't
spew out a warning if a tag that is already registered
is re-registered, unless it is re-registered with a
different type (#308438).
This commit is contained in:
Tim-Philipp Müller 2005-08-13 10:33:22 +00:00
parent f40be99d4b
commit 680ddc0cea
6 changed files with 39 additions and 2 deletions

View file

@ -1,3 +1,13 @@
2005-08-13 Tim-Philipp Müller <tim at centricular dot net>
* docs/gst/gstreamer-sections.txt:
* gst/gsttag.c: (_gst_tag_initialize), (gst_tag_register):
* gst/gsttag.h:
Add GST_TAG_LANGUAGE_CODE as we have in 0.8, and don't
spew out a warning if a tag that is already registered
is re-registered, unless it is re-registered with a
different type (#308438).
2005-08-12 Tim-Philipp Müller <tim at centricular dot net>
* docs/pwg/appendix-porting.xml:

View file

@ -1319,6 +1319,7 @@ GST_TAG_TRACK_GAIN
GST_TAG_TRACK_PEAK
GST_TAG_ALBUM_GAIN
GST_TAG_ALBUM_PEAK
GST_TAG_LANGUAGE_CODE
<SUBSECTION Standard>
GST_TAG_LIST
GST_IS_TAG_LIST

View file

@ -188,6 +188,9 @@ _gst_tag_initialize (void)
G_TYPE_DOUBLE, _("replaygain album gain"), _("album gain in db"), NULL);
gst_tag_register (GST_TAG_ALBUM_PEAK, GST_TAG_FLAG_META,
G_TYPE_DOUBLE, _("replaygain album peak"), _("peak of the album"), 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);
}
/**
@ -277,7 +280,11 @@ gst_tag_register (const gchar * name, GstTagFlag flag, GType type,
key = g_quark_from_string (name);
info = gst_tag_lookup (key);
g_return_if_fail (info == NULL);
if (info) {
g_return_if_fail (info->type == type);
return;
}
info = g_new (GstTagInfo, 1);
info->flag = flag;

View file

@ -424,6 +424,12 @@ gboolean gst_tag_list_get_pointer_index (const GstTagList * list,
* peak of the album
*/
#define GST_TAG_ALBUM_PEAK "replaygain-album-peak"
/**
* GST_TAG_LANGUAGE_CODE:
*
* Language code (ISO-639-1)
*/
#define GST_TAG_LANGUAGE_CODE "language-code"
G_END_DECLS

View file

@ -188,6 +188,9 @@ _gst_tag_initialize (void)
G_TYPE_DOUBLE, _("replaygain album gain"), _("album gain in db"), NULL);
gst_tag_register (GST_TAG_ALBUM_PEAK, GST_TAG_FLAG_META,
G_TYPE_DOUBLE, _("replaygain album peak"), _("peak of the album"), 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);
}
/**
@ -277,7 +280,11 @@ gst_tag_register (const gchar * name, GstTagFlag flag, GType type,
key = g_quark_from_string (name);
info = gst_tag_lookup (key);
g_return_if_fail (info == NULL);
if (info) {
g_return_if_fail (info->type == type);
return;
}
info = g_new (GstTagInfo, 1);
info->flag = flag;

View file

@ -424,6 +424,12 @@ gboolean gst_tag_list_get_pointer_index (const GstTagList * list,
* peak of the album
*/
#define GST_TAG_ALBUM_PEAK "replaygain-album-peak"
/**
* GST_TAG_LANGUAGE_CODE:
*
* Language code (ISO-639-1)
*/
#define GST_TAG_LANGUAGE_CODE "language-code"
G_END_DECLS