Commit ae45b7d7 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

Move GST_TAG_CDDA_* tags into libgsttag and make libgstcddabasesrc depend on...

Move GST_TAG_CDDA_* tags into libgsttag and make libgstcddabasesrc depend on libgsttag. This is required so we can ex...

Original commit message from CVS:
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/cdda/Makefile.am:
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_base_init):
* gst-libs/gst/cdda/gstcddabasesrc.h:
* gst-libs/gst/tag/tag.h:
* gst-libs/gst/tag/tags.c: (gst_tag_register_tags_internal),
(gst_tag_register_musicbrainz_tags):
Move GST_TAG_CDDA_* tags into libgsttag and make libgstcddabasesrc
depend on libgsttag. This is required so we can extract/read tags like
DISCID without depending on libgstcddabasesrc (which used to register
them).
* gst-libs/gst/tag/gstvorbistag.c:
Add vorbiscomment mapping for CDDB_DISCID and MUSICBRAINZ_DISCID
tags (also see #347848).
* ext/vorbis/vorbisenc.c: (gst_vorbis_enc_metadata_set1):
Log vorbis comments we are actually writing. Const-ify array.
parent 3469171e
2006-09-23 Tim-Philipp Müller <tim at centricular dot net>
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/cdda/Makefile.am:
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_base_init):
* gst-libs/gst/cdda/gstcddabasesrc.h:
* gst-libs/gst/tag/tag.h:
* gst-libs/gst/tag/tags.c: (gst_tag_register_tags_internal),
(gst_tag_register_musicbrainz_tags):
Move GST_TAG_CDDA_* tags into libgsttag and make libgstcddabasesrc
depend on libgsttag. This is required so we can extract/read tags like
DISCID without depending on libgstcddabasesrc (which used to register
them).
* gst-libs/gst/tag/gstvorbistag.c:
Add vorbiscomment mapping for CDDB_DISCID and MUSICBRAINZ_DISCID
tags (also see #347848).
* ext/vorbis/vorbisenc.c: (gst_vorbis_enc_metadata_set1):
Log vorbis comments we are actually writing. Const-ify array.
2006-09-23 Wim Taymans <wim@fluendo.com>
 
* gst/playback/gstplaybasebin.c: (gen_preroll_element):
......@@ -215,10 +215,6 @@ GstCddaBaseSrcClass
GstCddaBaseSrcTrack
GstCddaBaseSrcMode
gst_cdda_base_src_add_track
GST_TAG_CDDA_CDDB_DISCID
GST_TAG_CDDA_CDDB_DISCID_FULL
GST_TAG_CDDA_MUSICBRAINZ_DISCID
GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL
<SUBSECTION Standard>
GST_CDDA_BASE_SRC
GST_CDDA_BASE_SRC_CLASS
......@@ -851,6 +847,10 @@ GST_TAG_MUSICBRAINZ_ALBUMID
GST_TAG_MUSICBRAINZ_ALBUMARTISTID
GST_TAG_MUSICBRAINZ_TRMID
GST_TAG_MUSICBRAINZ_SORTNAME
GST_TAG_CDDA_CDDB_DISCID
GST_TAG_CDDA_CDDB_DISCID_FULL
GST_TAG_CDDA_MUSICBRAINZ_DISCID
GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL
GST_TAG_CMML_CLIP
GST_TAG_CMML_HEAD
GST_TAG_CMML_STREAM
......
......@@ -237,7 +237,7 @@ gst_vorbis_enc_dispose (GObject * object)
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static GstAudioChannelPosition vorbischannelpositions[][6] = {
static const GstAudioChannelPosition vorbischannelpositions[][6] = {
{ /* Mono */
GST_AUDIO_CHANNEL_POSITION_FRONT_MONO},
{ /* Stereo */
......@@ -637,6 +637,7 @@ gst_vorbis_enc_metadata_set1 (const GstTagList * list, const gchar * tag,
const gchar *vc_string = (const gchar *) l->data;
gchar *key = NULL, *val = NULL;
GST_LOG_OBJECT (vorbisenc, "vorbis comment: %s", vc_string);
if (gst_tag_parse_extended_comment (vc_string, &key, NULL, &val, TRUE)) {
vorbis_comment_add_tag (&enc->vc, key, val);
g_free (key);
......
......@@ -11,6 +11,7 @@ libgstcdda_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@
libgstcdda_@GST_MAJORMINOR@include_HEADERS = \
gstcddabasesrc.h
libgstcdda_@GST_MAJORMINOR@_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
libgstcdda_@GST_MAJORMINOR@_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
$(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_MAJORMINOR@.la
libgstcdda_@GST_MAJORMINOR@_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
libgstcdda_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
......@@ -70,6 +70,14 @@
* setting a new cdda://n+1 URI on playbin (as setting a new URI on playbin
* involves closing and re-opening the CD device, which is much much slower).
* </para>
* <title>Tags and meta-information</title>
* <para>
* CDDA sources will automatically emit a number of tags, details about which
* can be found in the libgsttag documentation. Those tags are:
* #GST_TAG_CDDA_CDDB_DISCID, #GST_TAG_CDDA_CDDB_DISCID_FULL,
* #GST_TAG_CDDA_MUSICBRAINZ_DISCID, #GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL,
* among others.
* </para>
* </refsect2>
*/
......@@ -182,23 +190,8 @@ gst_cdda_base_src_base_init (gpointer g_class)
track_format = gst_format_register ("track", "CD track");
sector_format = gst_format_register ("sector", "CD sector");
/* tags */
gst_tag_register (GST_TAG_CDDA_CDDB_DISCID, GST_TAG_FLAG_META,
G_TYPE_STRING, "discid", "CDDB discid for metadata retrieval",
gst_tag_merge_use_first);
gst_tag_register (GST_TAG_CDDA_CDDB_DISCID_FULL, GST_TAG_FLAG_META,
G_TYPE_STRING, "discid full",
"CDDB discid for metadata retrieval (full)", gst_tag_merge_use_first);
gst_tag_register (GST_TAG_CDDA_MUSICBRAINZ_DISCID, GST_TAG_FLAG_META,
G_TYPE_STRING, "musicbrainz-discid",
"Musicbrainz discid for metadata retrieval", gst_tag_merge_use_first);
gst_tag_register (GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL, GST_TAG_FLAG_META,
G_TYPE_STRING, "musicbrainz-discid-full",
"Musicbrainz discid for metadata retrieval (full)",
gst_tag_merge_use_first);
/* register CDDA tags */
gst_tag_register_musicbrainz_tags ();
#if 0
///// FIXME: what type to use here? ///////
......
......@@ -24,6 +24,10 @@
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
/* must include this for backwards-compatibility so the
* GST_TAG_CDDA_* defines are included. Remove in 0.11 */
#include <gst/tag/tag.h>
G_BEGIN_DECLS
#define GST_TYPE_CDDA_BASE_SRC (gst_cdda_base_src_get_type())
......@@ -134,37 +138,6 @@ GType gst_cdda_base_src_get_type (void);
gboolean gst_cdda_base_src_add_track (GstCddaBaseSrc * src,
GstCddaBaseSrcTrack * track);
/* tags */
/**
* GST_TAG_CDDA_CDDB_DISCID:
*
* CDDB disc id in its short form (e.g. 'aa063d0f')
*/
#define GST_TAG_CDDA_CDDB_DISCID "discid"
/**
* GST_TAG_CDDA_CDDB_DISCID_FULL:
*
* CDDB disc id including all details
*/
#define GST_TAG_CDDA_CDDB_DISCID_FULL "discid-full"
/**
* GST_TAG_CDDA_MUSICBRAINZ_DISCID:
*
* Musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-')
*/
#define GST_TAG_CDDA_MUSICBRAINZ_DISCID "musicbrainz-discid"
/**
* GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL:
*
* Musicbrainz disc id details
*/
#define GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL "musicbrainz-discid-full"
#if 0
/*
* GST_TAG_CDDA_TRACK_TAGS:
......
......@@ -71,6 +71,8 @@ static const GstTagEntryMatch tag_matches[] = {
{GST_TAG_MUSICBRAINZ_TRMID, "MUSICBRAINZ_TRMID"},
{GST_TAG_MUSICBRAINZ_SORTNAME, "MUSICBRAINZ_SORTNAME"},
{GST_TAG_LANGUAGE_CODE, "LANGUAGE"},
{GST_TAG_CDDA_MUSICBRAINZ_DISCID, "MUSICBRAINZ_DISCID"},
{GST_TAG_CDDA_CDDB_DISCID, "DISCID"},
{NULL, NULL}
};
......
......@@ -83,6 +83,37 @@ G_BEGIN_DECLS
*/
#define GST_TAG_CMML_CLIP "cmml-clip"
/* CDDA tags */
/**
* GST_TAG_CDDA_CDDB_DISCID:
*
* CDDB disc id in its short form (e.g. 'aa063d0f')
*/
#define GST_TAG_CDDA_CDDB_DISCID "discid"
/**
* GST_TAG_CDDA_CDDB_DISCID_FULL:
*
* CDDB disc id including all details
*/
#define GST_TAG_CDDA_CDDB_DISCID_FULL "discid-full"
/**
* GST_TAG_CDDA_MUSICBRAINZ_DISCID:
*
* Musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-')
*/
#define GST_TAG_CDDA_MUSICBRAINZ_DISCID "musicbrainz-discid"
/**
* GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL:
*
* Musicbrainz disc id details
*/
#define GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL "musicbrainz-discid-full"
/* additional information for image tags */
......
......@@ -44,7 +44,7 @@
static gpointer
gst_tag_register_musicbrainz_tags_internal (gpointer unused)
gst_tag_register_tags_internal (gpointer unused)
{
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
......@@ -52,6 +52,7 @@ gst_tag_register_musicbrainz_tags_internal (gpointer unused)
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#endif
/* musicbrainz tags */
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,
......@@ -67,9 +68,28 @@ gst_tag_register_musicbrainz_tags_internal (gpointer unused)
G_TYPE_STRING,
_("artist sortname"), _("MusicBrainz artist sortname"), NULL);
/* CDDA tags */
gst_tag_register (GST_TAG_CDDA_CDDB_DISCID, GST_TAG_FLAG_META,
G_TYPE_STRING, "discid", "CDDB discid for metadata retrieval",
gst_tag_merge_use_first);
gst_tag_register (GST_TAG_CDDA_CDDB_DISCID_FULL, GST_TAG_FLAG_META,
G_TYPE_STRING, "discid full",
"CDDB discid for metadata retrieval (full)", gst_tag_merge_use_first);
gst_tag_register (GST_TAG_CDDA_MUSICBRAINZ_DISCID, GST_TAG_FLAG_META,
G_TYPE_STRING, "musicbrainz-discid",
"Musicbrainz discid for metadata retrieval", gst_tag_merge_use_first);
gst_tag_register (GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL, GST_TAG_FLAG_META,
G_TYPE_STRING, "musicbrainz-discid-full",
"Musicbrainz discid for metadata retrieval (full)",
gst_tag_merge_use_first);
return NULL;
}
/* FIXME 0.11: rename this to gst_tag_init() or gst_tag_register_tags() */
/**
* gst_tag_register_musicbrainz_tags
*
......@@ -82,7 +102,7 @@ gst_tag_register_musicbrainz_tags (void)
{
static GOnce mb_once = G_ONCE_INIT;
g_once (&mb_once, gst_tag_register_musicbrainz_tags_internal, NULL);
g_once (&mb_once, gst_tag_register_tags_internal, NULL);
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment