2 * Copyright (C) 2005 Ross Burton <ross@burtonini.com>
4 * tags.c: Non-core tag registration
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
26 #include <gst/gst-i18n-plugin.h>
32 * @short_description: additional tag definitions for plugins and applications
33 * @see_also: #GstTagList
37 * Contains additional standardized GStreamer tag definitions for plugins
38 * and applications, and functions to register them with the GStreamer
46 gst_tag_register_musicbrainz_tags_internal (gpointer unused)
49 GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
51 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
54 gst_tag_register (GST_TAG_MUSICBRAINZ_TRACKID, GST_TAG_FLAG_META,
55 G_TYPE_STRING, _("track ID"), _("MusicBrainz track ID"), NULL);
56 gst_tag_register (GST_TAG_MUSICBRAINZ_ARTISTID, GST_TAG_FLAG_META,
57 G_TYPE_STRING, _("artist ID"), _("MusicBrainz artist ID"), NULL);
58 gst_tag_register (GST_TAG_MUSICBRAINZ_ALBUMID, GST_TAG_FLAG_META,
59 G_TYPE_STRING, _("album ID"), _("MusicBrainz album ID"), NULL);
60 gst_tag_register (GST_TAG_MUSICBRAINZ_ALBUMARTISTID, GST_TAG_FLAG_META,
62 _("album artist ID"), _("MusicBrainz album artist ID"), NULL);
63 gst_tag_register (GST_TAG_MUSICBRAINZ_TRMID, GST_TAG_FLAG_META,
64 G_TYPE_STRING, _("track TRM ID"), _("MusicBrainz TRM ID"), NULL);
65 gst_tag_register (GST_TAG_MUSICBRAINZ_SORTNAME, GST_TAG_FLAG_META,
67 _("artist sortname"), _("MusicBrainz artist sortname"), NULL);
73 * gst_tag_register_musicbrainz_tags
75 * Registers additional musicbrainz-specific tags with the GStreamer tag
76 * system. Plugins and applications that use these tags should call this
77 * function before using them. Can be called multiple times.
80 gst_tag_register_musicbrainz_tags (void)
82 static GOnce mb_once = G_ONCE_INIT;
84 g_once (&mb_once, gst_tag_register_musicbrainz_tags_internal, NULL);
88 register_tag_image_type_enum (GType * id)
90 static const GEnumValue image_types[] = {
91 {GST_TAG_IMAGE_TYPE_UNDEFINED, "GST_TAG_IMAGE_TYPE_UNDEFINED", "undefined"},
92 {GST_TAG_IMAGE_TYPE_FRONT_COVER, "GST_TAG_IMAGE_TYPE_FRONT_COVER",
94 {GST_TAG_IMAGE_TYPE_BACK_COVER, "GST_TAG_IMAGE_TYPE_BACK_COVER",
96 {GST_TAG_IMAGE_TYPE_LEAFLET_PAGE, "GST_TAG_IMAGE_TYPE_LEAFLET_PAGE",
98 {GST_TAG_IMAGE_TYPE_MEDIUM, "GST_TAG_IMAGE_TYPE_MEDIUM", "medium"},
99 {GST_TAG_IMAGE_TYPE_LEAD_ARTIST, "GST_TAG_IMAGE_TYPE_LEAD_ARTIST",
101 {GST_TAG_IMAGE_TYPE_ARTIST, "GST_TAG_IMAGE_TYPE_ARTIST", "artist"},
102 {GST_TAG_IMAGE_TYPE_CONDUCTOR, "GST_TAG_IMAGE_TYPE_CONDUCTOR", "conductor"},
103 {GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA, "GST_TAG_IMAGE_TYPE_BAND_ORCHESTRA",
105 {GST_TAG_IMAGE_TYPE_COMPOSER, "GST_TAG_IMAGE_TYPE_COMPOSER", "composer"},
106 {GST_TAG_IMAGE_TYPE_LYRICIST, "GST_TAG_IMAGE_TYPE_LYRICIST", "lyricist"},
107 {GST_TAG_IMAGE_TYPE_RECORDING_LOCATION,
108 "GST_TAG_IMAGE_TYPE_RECORDING_LOCATION",
109 "recording-location"},
110 {GST_TAG_IMAGE_TYPE_DURING_RECORDING, "GST_TAG_IMAGE_TYPE_DURING_RECORDING",
112 {GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE,
113 "GST_TAG_IMAGE_TYPE_DURING_PERFORMANCE",
114 "during-performance"},
115 {GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE, "GST_TAG_IMAGE_TYPE_VIDEO_CAPTURE",
117 {GST_TAG_IMAGE_TYPE_FISH, "GST_TAG_IMAGE_TYPE_FISH", "fish"},
118 {GST_TAG_IMAGE_TYPE_ILLUSTRATION, "GST_TAG_IMAGE_TYPE_ILLUSTRATION",
120 {GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO, "GST_TAG_IMAGE_TYPE_BAND_ARTIST_LOGO",
122 {GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO,
123 "GST_TAG_IMAGE_TYPE_PUBLISHER_STUDIO_LOGO",
124 "publisher-studio-logo"},
128 *id = g_enum_register_static ("GstTagImageType", image_types);
132 gst_tag_image_type_get_type (void)
135 static GOnce once = G_ONCE_INIT;
137 g_once (&once, (GThreadFunc) register_tag_image_type_enum, &id);