From: Tim-Philipp Müller Date: Thu, 25 Oct 2007 15:10:59 +0000 (+0000) Subject: gst-libs/gst/tag/: Deprecate GST_TAG_MUSICBRAINZ_SORTNAME, replaced by the newly... X-Git-Tag: 1.19.3~511^2~10879 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=698e4050b309a12e46ab92b8f075db776c311d4d;p=platform%2Fupstream%2Fgstreamer.git gst-libs/gst/tag/: Deprecate GST_TAG_MUSICBRAINZ_SORTNAME, replaced by the newly-added Original commit message from CVS: * gst-libs/gst/tag/tag.h: (GST_TAG_MUSICBRAINZ_SORTNAME): * gst-libs/gst/tag/tags.c: Deprecate GST_TAG_MUSICBRAINZ_SORTNAME, replaced by the newly-added GST_TAG_ARTIST_SORTNAME (in an API and ABI compatible way). * gst-libs/gst/tag/gstid3tag.c: (tag_matches): Map ID3v2 TSOP, TSOA and TSOT frames to new SORTNAME tags (#414539). * gst-libs/gst/tag/gstvorbistag.c: (tag_matches), (gst_tag_to_vorbis_comments): Map new SORTNAME tags (these tags aren't even semi-official, so I'm just mapping everything I found in the wild) (#414539). --- diff --git a/ChangeLog b/ChangeLog index e75153c..c56e924 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2007-10-25 Tim-Philipp Müller + + * gst-libs/gst/tag/tag.h: (GST_TAG_MUSICBRAINZ_SORTNAME): + * gst-libs/gst/tag/tags.c: + Deprecate GST_TAG_MUSICBRAINZ_SORTNAME, replaced by the newly-added + GST_TAG_ARTIST_SORTNAME (in an API and ABI compatible way). + + * gst-libs/gst/tag/gstid3tag.c: (tag_matches): + Map ID3v2 TSOP, TSOA and TSOT frames to new SORTNAME tags (#414539). + + * gst-libs/gst/tag/gstvorbistag.c: (tag_matches), + (gst_tag_to_vorbis_comments): + Map new SORTNAME tags (these tags aren't even semi-official, so I'm + just mapping everything I found in the wild) (#414539). + 2007-10-24 Wim Taymans Inspired by patch of: René Stadler diff --git a/gst-libs/gst/tag/gstid3tag.c b/gst-libs/gst/tag/gstid3tag.c index 5d17d3d..574af19 100644 --- a/gst-libs/gst/tag/gstid3tag.c +++ b/gst-libs/gst/tag/gstid3tag.c @@ -209,7 +209,9 @@ static const GstTagEntryMatch tag_matches[] = { {GST_TAG_IMAGE, "APIC"}, {GST_TAG_ENCODER, "TSSE"}, {GST_TAG_BEATS_PER_MINUTE, "TBPM"}, - {GST_TAG_MUSICBRAINZ_SORTNAME, "TSOP"}, + {GST_TAG_ARTIST_SORTNAME, "TSOP"}, + {GST_TAG_ALBUM_SORTNAME, "TSOA"}, + {GST_TAG_TITLE_SORTNAME, "TSOT"}, {NULL, NULL} }; diff --git a/gst-libs/gst/tag/gstvorbistag.c b/gst-libs/gst/tag/gstvorbistag.c index 866ca69..91bd321 100644 --- a/gst-libs/gst/tag/gstvorbistag.c +++ b/gst-libs/gst/tag/gstvorbistag.c @@ -76,7 +76,13 @@ static const GstTagEntryMatch tag_matches[] = { {GST_TAG_MUSICBRAINZ_ALBUMID, "MUSICBRAINZ_ALBUMID"}, {GST_TAG_MUSICBRAINZ_ALBUMARTISTID, "MUSICBRAINZ_ALBUMARTISTID"}, {GST_TAG_MUSICBRAINZ_TRMID, "MUSICBRAINZ_TRMID"}, - {GST_TAG_MUSICBRAINZ_SORTNAME, "MUSICBRAINZ_SORTNAME"}, + {GST_TAG_ARTIST_SORTNAME, "ARTISTSORT"}, + {GST_TAG_ARTIST_SORTNAME, "ARTISTSORTORDER"}, + {GST_TAG_ARTIST_SORTNAME, "MUSICBRAINZ_SORTNAME"}, + {GST_TAG_ALBUM_SORTNAME, "ALBUMSORT"}, + {GST_TAG_ALBUM_SORTNAME, "ALBUMSORTORDER"}, + {GST_TAG_TITLE_SORTNAME, "TITLESORT"}, + {GST_TAG_TITLE_SORTNAME, "TITLESORTORDER"}, {GST_TAG_LANGUAGE_CODE, "LANGUAGE"}, {GST_TAG_CDDA_MUSICBRAINZ_DISCID, "MUSICBRAINZ_DISCID"}, {GST_TAG_CDDA_CDDB_DISCID, "DISCID"}, @@ -408,6 +414,8 @@ gst_tag_to_vorbis_comments (const GstTagList * list, const gchar * tag) return NULL; } + /* FIXME: for tags that can map to multiple vorbis comment keys, add all + * of the possible keys */ for (i = 0; i < gst_tag_list_get_tag_size (list, tag); i++) { GType tag_type = gst_tag_get_type (tag); gchar *result = NULL; diff --git a/gst-libs/gst/tag/tag.h b/gst-libs/gst/tag/tag.h index 5aa3842..48bc549 100644 --- a/gst-libs/gst/tag/tag.h +++ b/gst-libs/gst/tag/tag.h @@ -57,12 +57,19 @@ G_BEGIN_DECLS * MusicBrainz track TRM ID */ #define GST_TAG_MUSICBRAINZ_TRMID "musicbrainz-trmid" + +/* FIXME 0.11: remove GST_TAG_MUSICBRAINZ_SORTNAME */ +#ifndef GST_DISABLE_DEPRECATED /** * GST_TAG_MUSICBRAINZ_SORTNAME * * MusicBrainz artist sort name + * + * Deprecated. Use GST_TAG_ARTIST_SORTNAME instead. */ -#define GST_TAG_MUSICBRAINZ_SORTNAME "musicbrainz-sortname" +#define GST_TAG_MUSICBRAINZ_SORTNAME GST_TAG_ARTIST_SORTNAME +#endif + /** * GST_TAG_CMML_STREAM * diff --git a/gst-libs/gst/tag/tags.c b/gst-libs/gst/tag/tags.c index 19ebb58..acd72ad 100644 --- a/gst-libs/gst/tag/tags.c +++ b/gst-libs/gst/tag/tags.c @@ -64,9 +64,6 @@ gst_tag_register_tags_internal (gpointer unused) _("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); /* CDDA tags */ gst_tag_register (GST_TAG_CDDA_CDDB_DISCID, GST_TAG_FLAG_META,