gstreamer/gst-libs/gst/tag/tags.c
Tim-Philipp Müller ce175c9953 gst-libs/gst/tag/: Forward-port some tags stuff from the 0.8 branch. This is mostly the addition of musicbrainz tags ...
Original commit message from CVS:
* gst-libs/gst/tag/Makefile.am:
* gst-libs/gst/tag/gstvorbistag.c: (gst_vorbis_tag_add):
* gst-libs/gst/tag/tag.h:
* gst-libs/gst/tag/tags.c:
(gst_tag_register_musicbrainz_tags_internal),
(gst_tag_register_musicbrainz_tags):
Forward-port some tags stuff from the 0.8 branch. This is
mostly the addition of musicbrainz tags and their mapping
to vorbistags, and a vorbistag mapping of the language tag.
2006-02-05 14:59:28 +00:00

64 lines
2.2 KiB
C

/* GStreamer
* Copyright (C) 2005 Ross Burton <ross@burtonini.com>
*
* tags.c: Non-core tag registration
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/gst-i18n-plugin.h>
#include <gst/gst.h>
#include "tag.h"
static gpointer
gst_tag_register_musicbrainz_tags_internal (gpointer unused)
{
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#endif
gst_tag_register (GST_TAG_MUSICBRAINZ_TRACKID, GST_TAG_FLAG_META,
G_TYPE_STRING, _("track ID"), _("MusicBrainz track ID"), NULL);
gst_tag_register (GST_TAG_MUSICBRAINZ_ARTISTID, GST_TAG_FLAG_META,
G_TYPE_STRING, _("artist ID"), _("MusicBrainz artist ID"), NULL);
gst_tag_register (GST_TAG_MUSICBRAINZ_ALBUMID, GST_TAG_FLAG_META,
G_TYPE_STRING, _("album ID"), _("MusicBrainz album ID"), NULL);
gst_tag_register (GST_TAG_MUSICBRAINZ_ALBUMARTISTID, GST_TAG_FLAG_META,
G_TYPE_STRING,
_("album artist ID"), _("MusicBrainz album artist ID"), NULL);
gst_tag_register (GST_TAG_MUSICBRAINZ_TRMID, GST_TAG_FLAG_META,
G_TYPE_STRING, _("track TRM ID"), _("MusicBrainz TRM ID"), NULL);
gst_tag_register (GST_TAG_MUSICBRAINZ_SORTNAME, GST_TAG_FLAG_META,
G_TYPE_STRING,
_("artist sortname"), _("MusicBrainz artist sortname"), NULL);
return NULL;
}
void
gst_tag_register_musicbrainz_tags (void)
{
static GOnce mb_once = G_ONCE_INIT;
g_once (&mb_once, gst_tag_register_musicbrainz_tags_internal, NULL);
}