mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 13:18:52 +00:00
Original commit message from CVS: * docs/libs/Makefile.am: * docs/libs/gst-plugins-base-libs-docs.sgml: * docs/libs/gst-plugins-base-libs-sections.txt: * gst-libs/gst/tag/gstid3tag.c: (gst_tag_from_id3_tag): * gst-libs/gst/tag/gstvorbistag.c: * gst-libs/gst/tag/tag.h: * gst-libs/gst/tag/tags.c: Add libgsttag to the docs.
86 lines
2.9 KiB
C
86 lines
2.9 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"
|
|
|
|
/**
|
|
* SECTION:gsttag
|
|
* @short_description: Tag Support Library
|
|
* @see_also: #GstTagList
|
|
*
|
|
* <refsect2>
|
|
* <para>
|
|
* Contains additional standardized GStreamer tag definitions and
|
|
* various utility functions for plugins to parse or create different
|
|
* types of tags. Also provides mappings from and to other tag identifiers
|
|
* to the GStreamer tag identifier.
|
|
* </para>
|
|
* </refsect2>
|
|
*/
|
|
|
|
|
|
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;
|
|
}
|
|
|
|
/**
|
|
* gst_tag_register_musicbrainz_tags
|
|
*
|
|
* Registers additional musicbrainz-specific tags with the GStreamer tag
|
|
* system. Plugins and applications that use these tags should call this
|
|
* function before using them. Can be called multiple times.
|
|
*/
|
|
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);
|
|
}
|