+2007-09-03 Johan Dahlin <johan@gnome.org>
+
+ * gst/nsf/gstnsf.c: (gst_nsfdec_finalize), (start_play_tune):
+ * gst/nsf/gstnsf.h:
+ Add support for (very) basic tagging.
+
2007-09-03 Wim Taymans <wim.taymans@gmail.com>
* gst/rtpmanager/gstrtpbin-marshal.list:
if (nsfdec->tune_buffer)
gst_buffer_unref (nsfdec->tune_buffer);
+ if (nsfdec->taglist)
+ gst_tag_list_free (nsfdec->taglist);
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
if (!nsfdec_negotiate (nsfdec))
goto could_not_negotiate;
+ nsfdec->taglist = gst_tag_list_new ();
+ gst_tag_list_add (nsfdec->taglist, GST_TAG_MERGE_REPLACE,
+ GST_TAG_AUDIO_CODEC, "Nosefart", NULL);
+
+ if (nsfdec->nsf->artist_name)
+ gst_tag_list_add (nsfdec->taglist, GST_TAG_MERGE_REPLACE,
+ GST_TAG_ARTIST, nsfdec->nsf->artist_name, NULL);
+
+ if (nsfdec->nsf->song_name)
+ gst_tag_list_add (nsfdec->taglist, GST_TAG_MERGE_REPLACE,
+ GST_TAG_TITLE, nsfdec->nsf->song_name, NULL);
+
+ gst_element_post_message (GST_ELEMENT_CAST (nsfdec),
+ gst_message_new_tag (GST_OBJECT (nsfdec),
+ gst_tag_list_copy (nsfdec->taglist)));
+
nsf_playtrack (nsfdec->nsf,
nsfdec->tune_number, nsfdec->frequency, nsfdec->bits, nsfdec->stereo);
nsf_setfilter (nsfdec->nsf, nsfdec->filter);