diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst/modplug/gstmodplug.cc | 17 |
2 files changed, 22 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2008-11-04 Stefan Kost <ensonic@users.sf.net> + + * gst/modplug/gstmodplug.cc: + Send tag event. Fixes #559286. + 2008-11-04 Zaheer Abbas Merali <zaheerabbas at merali dot org> patch by: Sebastian Pölsterl diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc index 6f6e1869..d1c91d8d 100644 --- a/gst/modplug/gstmodplug.cc +++ b/gst/modplug/gstmodplug.cc @@ -609,7 +609,9 @@ gst_modplug_loop (GstModPlug * modplug) /* actually load it */ if (modplug->offset == modplug->song_size) { GstEvent *newsegment; + GstTagList *tags; gboolean ok; + gchar comment[16384]; ok = gst_modplug_load_song (modplug); gst_buffer_unref (modplug->buffer); @@ -623,6 +625,21 @@ gst_modplug_loop (GstModPlug * modplug) newsegment = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME, 0, modplug->song_length, 0); gst_pad_push_event (modplug->srcpad, newsegment); + + /* get and send metadata */ + tags = gst_tag_list_new (); + gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, + GST_TAG_TITLE, modplug->mSoundFile->GetTitle (), + GST_TAG_BEATS_PER_MINUTE, + (gdouble) modplug->mSoundFile->GetMusicTempo (), NULL); + + if (modplug->mSoundFile->GetSongComments ((gchar *) & comment, 16384, 32)) { + gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, + GST_TAG_COMMENT, comment, NULL); + } + + + gst_element_found_tags (GST_ELEMENT (modplug), tags); } else { /* not fully loaded yet */ return; |