* http://mail.kde.org/pipermail/amarok/2006-May/000090.html
*/
{GST_TAG_BEATS_PER_MINUTE, "BPM"},
+ /* What GStreamer calls encoder ("encoder used to encode this stream") is
+ stored in the vendor string in Vorbis/Theora/Kate and possibly others.
+ The Vorbis comment packet used in those streams uses ENCODER as the name
+ of the encoding program, which GStreamer calls application-name. */
+ {GST_TAG_APPLICATION_NAME, "ENCODER"},
{NULL, NULL}
};
*
* Returns: The corresponding GStreamer tag or NULL if none exists.
*/
-G_CONST_RETURN gchar *
+const gchar *
gst_tag_from_vorbis_tag (const gchar * vorbis_tag)
{
int i = 0;
*
* Returns: The corresponding vorbiscomment tag or NULL if none exists.
*/
-G_CONST_RETURN gchar *
+const gchar *
gst_tag_to_vorbis_tag (const gchar * gst_tag)
{
int i = 0;
break;
}
default:{
- if (tag_type == GST_TYPE_DATE) {
+ if (tag_type == G_TYPE_DATE) {
guint y, d = 1, m = 1;
gchar *check = (gchar *) value;
gst_vorbis_tag_add_coverart (GstTagList * tags, gchar * img_data_base64,
gint base64_len)
{
- GstBuffer *img;
+ GstSample *img;
gsize img_len;
if (base64_len < 2)
goto decode_failed;
img =
- gst_tag_image_data_to_image_buffer ((const guint8 *) img_data_base64,
+ gst_tag_image_data_to_image_sample ((const guint8 *) img_data_base64,
img_len, GST_TAG_IMAGE_TYPE_NONE);
if (img == NULL)
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
GST_TAG_PREVIEW_IMAGE, img, NULL);
- gst_buffer_unref (img);
+ gst_sample_unref (img);
return;
/* ERRORS */
guint32 img_len = 0, img_type = 0;
guint32 img_mimetype_len = 0, img_description_len = 0;
gsize decoded_len;
- const guint8 *data;
+ const guint8 *data = NULL;
/* img_data_base64 points to a temporary copy of the base64 encoded data, so
* it's safe to do inpace decoding here
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (id_data != NULL || id_data_length == 0, NULL);
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
if (size < 11 || size <= id_data_length + 4)
goto error;
gst_tag_to_metadata_block_picture (const gchar * tag,
const GValue * image_value)
{
+#if 0
gchar *comment_data, *data_result;
const gchar *mime_type;
guint mime_type_len;
GstStructure *mime_struct;
GstBuffer *buffer;
+#endif
GList *l = NULL;
+#if 0
guint8 *data;
gsize size;
GstByteWriter writer;
gint width = 0, height = 0;
guint8 *metadata_block;
guint metadata_block_len;
+#endif
g_return_val_if_fail (image_value != NULL, NULL);
+ /* FIXME, no more buffer caps */
+ g_assert_not_reached ();
+
+#if 0
buffer = gst_value_get_buffer (image_value);
g_return_val_if_fail (gst_caps_is_fixed (buffer->caps), NULL);
mime_struct = gst_caps_get_structure (buffer->caps, 0);
&image_type, "width", G_TYPE_INT, &width, "height", G_TYPE_INT, &height,
NULL);
- metadata_block_len = 32 + mime_type_len + GST_BUFFER_SIZE (buffer);
+ metadata_block_len = 32 + mime_type_len + gst_buffer_get_size (buffer);
gst_byte_writer_init_with_size (&writer, metadata_block_len, TRUE);
if (image_type == GST_TAG_IMAGE_TYPE_NONE
g_free (comment_data);
l = g_list_append (l, data_result);
+#endif
return l;
}
* Creates a new tag list that contains the information parsed out of a
* vorbiscomment packet.
*
- * Returns: A #GList of newly-allowcated key=value strings. Free with
+ * Returns: A #GList of newly-allocated key=value strings. Free with
* g_list_foreach (list, (GFunc) g_free, NULL) plus g_list_free (list)
*/
GList *
break;
}
default:{
- if (tag_type == GST_TYPE_DATE) {
+ if (tag_type == G_TYPE_DATE) {
GDate *date;
if (!gst_tag_list_get_date_index (list, tag, i, &date))