adding vorbis tags fixing replaygain tag names

Original commit message from CVS:
adding vorbis tags
fixing replaygain tag names
This commit is contained in:
Thomas Vander Stichele 2004-01-20 13:37:10 +00:00
parent 3f5ffa36ca
commit 8cab12db34
5 changed files with 65 additions and 18 deletions

View file

@ -1,3 +1,10 @@
2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org>
* 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 <thomas at apestaart dot org> 2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gsterror.h: * gst/gsterror.h:

View file

@ -151,21 +151,36 @@ _gst_tag_initialize (void)
_("codec"), _("codec"),
_("codec the data is stored in"), _("codec the data is stored in"),
gst_tag_merge_strings_with_comma); 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, gst_tag_register (GST_TAG_BITRATE,
G_TYPE_UINT, G_TYPE_UINT,
_("bitrate"), _("bitrate"),
_("exact or average bitrate in bits/s"), _("exact or average bitrate in bits/s"),
NULL); 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, gst_tag_register (GST_TAG_MAXIMUM_BITRATE,
G_TYPE_UINT, G_TYPE_UINT,
_("maximum bitrate"), _("maximum bitrate"),
_("maximum bitrate in bits/s"), _("maximum bitrate in bits/s"),
NULL); 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, gst_tag_register (GST_TAG_TRACK_GAIN,
G_TYPE_DOUBLE, G_TYPE_DOUBLE,
_("replaygain track gain"), _("replaygain track gain"),
@ -643,6 +658,8 @@ gst_tag_list_add_valist (GstTagList *list, GstTagMergeMode mode, const gchar *ta
GValue value = { 0, }; GValue value = { 0, };
quark = g_quark_from_string (tag); quark = g_quark_from_string (tag);
info = gst_tag_lookup (quark); info = gst_tag_lookup (quark);
if (info == NULL)
g_warning ("no GstTag for %s", tag);
g_return_if_fail (info != NULL); g_return_if_fail (info != NULL);
g_value_init (&value, info->type); g_value_init (&value, info->type);
G_VALUE_COLLECT (&value, var_args, 0, &error); G_VALUE_COLLECT (&value, var_args, 0, &error);

View file

@ -233,12 +233,15 @@ GstTagList * gst_event_tag_get_list (GstEvent * tag_event);
#define GST_TAG_DURATION "duration" #define GST_TAG_DURATION "duration"
#define GST_TAG_CODEC "codec" #define GST_TAG_CODEC "codec"
#define GST_TAG_BITRATE "bitrate" #define GST_TAG_BITRATE "bitrate"
#define GST_TAG_NOMINAL_BITRATE "nominal-bitrate"
#define GST_TAG_MINIMUM_BITRATE "minimum-bitrate" #define GST_TAG_MINIMUM_BITRATE "minimum-bitrate"
#define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate" #define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate"
#define GST_TAG_TRACK_GAIN "replaygain_track_gain" #define GST_TAG_SERIAL "serial"
#define GST_TAG_TRACK_PEAK "replaygain_track_peak" #define GST_TAG_ENCODER_VERSION "encoder-version"
#define GST_TAG_ALBUM_GAIN "replaygain_album_gain" #define GST_TAG_TRACK_GAIN "replaygain-track-gain"
#define GST_TAG_ALBUM_PEAK "replaygain_album_peak" #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 G_END_DECLS

View file

@ -151,21 +151,36 @@ _gst_tag_initialize (void)
_("codec"), _("codec"),
_("codec the data is stored in"), _("codec the data is stored in"),
gst_tag_merge_strings_with_comma); 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, gst_tag_register (GST_TAG_BITRATE,
G_TYPE_UINT, G_TYPE_UINT,
_("bitrate"), _("bitrate"),
_("exact or average bitrate in bits/s"), _("exact or average bitrate in bits/s"),
NULL); 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, gst_tag_register (GST_TAG_MAXIMUM_BITRATE,
G_TYPE_UINT, G_TYPE_UINT,
_("maximum bitrate"), _("maximum bitrate"),
_("maximum bitrate in bits/s"), _("maximum bitrate in bits/s"),
NULL); 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, gst_tag_register (GST_TAG_TRACK_GAIN,
G_TYPE_DOUBLE, G_TYPE_DOUBLE,
_("replaygain track gain"), _("replaygain track gain"),
@ -643,6 +658,8 @@ gst_tag_list_add_valist (GstTagList *list, GstTagMergeMode mode, const gchar *ta
GValue value = { 0, }; GValue value = { 0, };
quark = g_quark_from_string (tag); quark = g_quark_from_string (tag);
info = gst_tag_lookup (quark); info = gst_tag_lookup (quark);
if (info == NULL)
g_warning ("no GstTag for %s", tag);
g_return_if_fail (info != NULL); g_return_if_fail (info != NULL);
g_value_init (&value, info->type); g_value_init (&value, info->type);
G_VALUE_COLLECT (&value, var_args, 0, &error); G_VALUE_COLLECT (&value, var_args, 0, &error);

View file

@ -233,12 +233,15 @@ GstTagList * gst_event_tag_get_list (GstEvent * tag_event);
#define GST_TAG_DURATION "duration" #define GST_TAG_DURATION "duration"
#define GST_TAG_CODEC "codec" #define GST_TAG_CODEC "codec"
#define GST_TAG_BITRATE "bitrate" #define GST_TAG_BITRATE "bitrate"
#define GST_TAG_NOMINAL_BITRATE "nominal-bitrate"
#define GST_TAG_MINIMUM_BITRATE "minimum-bitrate" #define GST_TAG_MINIMUM_BITRATE "minimum-bitrate"
#define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate" #define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate"
#define GST_TAG_TRACK_GAIN "replaygain_track_gain" #define GST_TAG_SERIAL "serial"
#define GST_TAG_TRACK_PEAK "replaygain_track_peak" #define GST_TAG_ENCODER_VERSION "encoder-version"
#define GST_TAG_ALBUM_GAIN "replaygain_album_gain" #define GST_TAG_TRACK_GAIN "replaygain-track-gain"
#define GST_TAG_ALBUM_PEAK "replaygain_album_peak" #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 G_END_DECLS