diff --git a/ChangeLog b/ChangeLog index bec1ec968b..9e8de0138f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-01-20 Thomas Vander Stichele + + * gst/gsttag.c: (_gst_tag_initialize), (gst_tag_list_add_valist): + * gst/gsttag.h: + add some tags used in ogg as well + fix _ in replaygain tags + 2004-01-20 Thomas Vander Stichele * gst/gsterror.h: diff --git a/gst/gsttag.c b/gst/gsttag.c index b9aa3fc045..33aa8ac91c 100644 --- a/gst/gsttag.c +++ b/gst/gsttag.c @@ -151,21 +151,36 @@ _gst_tag_initialize (void) _("codec"), _("codec the data is stored in"), gst_tag_merge_strings_with_comma); - gst_tag_register (GST_TAG_MINIMUM_BITRATE, - G_TYPE_UINT, - _("minimum bitrate"), - _("minimum bitrate in bits/s"), - NULL); gst_tag_register (GST_TAG_BITRATE, G_TYPE_UINT, _("bitrate"), _("exact or average bitrate in bits/s"), NULL); + gst_tag_register (GST_TAG_NOMINAL_BITRATE, + G_TYPE_UINT, + _("nominal bitrate"), + _("nominal bitrate in bits/s"), + NULL); + gst_tag_register (GST_TAG_MINIMUM_BITRATE, + G_TYPE_UINT, + _("minimum bitrate"), + _("minimum bitrate in bits/s"), + NULL); gst_tag_register (GST_TAG_MAXIMUM_BITRATE, G_TYPE_UINT, _("maximum bitrate"), _("maximum bitrate in bits/s"), NULL); + gst_tag_register (GST_TAG_ENCODER_VERSION, + G_TYPE_UINT, + _("encoder version"), + _("version of the encoder used to encode this stream"), + NULL); + gst_tag_register (GST_TAG_SERIAL, + G_TYPE_UINT, + _("serial"), + _("serial number of track"), + NULL); gst_tag_register (GST_TAG_TRACK_GAIN, G_TYPE_DOUBLE, _("replaygain track gain"), @@ -643,6 +658,8 @@ gst_tag_list_add_valist (GstTagList *list, GstTagMergeMode mode, const gchar *ta GValue value = { 0, }; quark = g_quark_from_string (tag); info = gst_tag_lookup (quark); + if (info == NULL) + g_warning ("no GstTag for %s", tag); g_return_if_fail (info != NULL); g_value_init (&value, info->type); G_VALUE_COLLECT (&value, var_args, 0, &error); diff --git a/gst/gsttag.h b/gst/gsttag.h index 95cb6244ce..ab9f3209d6 100644 --- a/gst/gsttag.h +++ b/gst/gsttag.h @@ -233,12 +233,15 @@ GstTagList * gst_event_tag_get_list (GstEvent * tag_event); #define GST_TAG_DURATION "duration" #define GST_TAG_CODEC "codec" #define GST_TAG_BITRATE "bitrate" +#define GST_TAG_NOMINAL_BITRATE "nominal-bitrate" #define GST_TAG_MINIMUM_BITRATE "minimum-bitrate" #define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate" -#define GST_TAG_TRACK_GAIN "replaygain_track_gain" -#define GST_TAG_TRACK_PEAK "replaygain_track_peak" -#define GST_TAG_ALBUM_GAIN "replaygain_album_gain" -#define GST_TAG_ALBUM_PEAK "replaygain_album_peak" +#define GST_TAG_SERIAL "serial" +#define GST_TAG_ENCODER_VERSION "encoder-version" +#define GST_TAG_TRACK_GAIN "replaygain-track-gain" +#define GST_TAG_TRACK_PEAK "replaygain-track-peak" +#define GST_TAG_ALBUM_GAIN "replaygain-album-gain" +#define GST_TAG_ALBUM_PEAK "replaygain-album-peak" G_END_DECLS diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index b9aa3fc045..33aa8ac91c 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -151,21 +151,36 @@ _gst_tag_initialize (void) _("codec"), _("codec the data is stored in"), gst_tag_merge_strings_with_comma); - gst_tag_register (GST_TAG_MINIMUM_BITRATE, - G_TYPE_UINT, - _("minimum bitrate"), - _("minimum bitrate in bits/s"), - NULL); gst_tag_register (GST_TAG_BITRATE, G_TYPE_UINT, _("bitrate"), _("exact or average bitrate in bits/s"), NULL); + gst_tag_register (GST_TAG_NOMINAL_BITRATE, + G_TYPE_UINT, + _("nominal bitrate"), + _("nominal bitrate in bits/s"), + NULL); + gst_tag_register (GST_TAG_MINIMUM_BITRATE, + G_TYPE_UINT, + _("minimum bitrate"), + _("minimum bitrate in bits/s"), + NULL); gst_tag_register (GST_TAG_MAXIMUM_BITRATE, G_TYPE_UINT, _("maximum bitrate"), _("maximum bitrate in bits/s"), NULL); + gst_tag_register (GST_TAG_ENCODER_VERSION, + G_TYPE_UINT, + _("encoder version"), + _("version of the encoder used to encode this stream"), + NULL); + gst_tag_register (GST_TAG_SERIAL, + G_TYPE_UINT, + _("serial"), + _("serial number of track"), + NULL); gst_tag_register (GST_TAG_TRACK_GAIN, G_TYPE_DOUBLE, _("replaygain track gain"), @@ -643,6 +658,8 @@ gst_tag_list_add_valist (GstTagList *list, GstTagMergeMode mode, const gchar *ta GValue value = { 0, }; quark = g_quark_from_string (tag); info = gst_tag_lookup (quark); + if (info == NULL) + g_warning ("no GstTag for %s", tag); g_return_if_fail (info != NULL); g_value_init (&value, info->type); G_VALUE_COLLECT (&value, var_args, 0, &error); diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index 95cb6244ce..ab9f3209d6 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -233,12 +233,15 @@ GstTagList * gst_event_tag_get_list (GstEvent * tag_event); #define GST_TAG_DURATION "duration" #define GST_TAG_CODEC "codec" #define GST_TAG_BITRATE "bitrate" +#define GST_TAG_NOMINAL_BITRATE "nominal-bitrate" #define GST_TAG_MINIMUM_BITRATE "minimum-bitrate" #define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate" -#define GST_TAG_TRACK_GAIN "replaygain_track_gain" -#define GST_TAG_TRACK_PEAK "replaygain_track_peak" -#define GST_TAG_ALBUM_GAIN "replaygain_album_gain" -#define GST_TAG_ALBUM_PEAK "replaygain_album_peak" +#define GST_TAG_SERIAL "serial" +#define GST_TAG_ENCODER_VERSION "encoder-version" +#define GST_TAG_TRACK_GAIN "replaygain-track-gain" +#define GST_TAG_TRACK_PEAK "replaygain-track-peak" +#define GST_TAG_ALBUM_GAIN "replaygain-album-gain" +#define GST_TAG_ALBUM_PEAK "replaygain-album-peak" G_END_DECLS