diff options
author | Stefan Kost <ensonic@users.sourceforge.net> | 2008-11-04 20:26:00 +0000 |
---|---|---|
committer | Stefan Kost <ensonic@users.sourceforge.net> | 2008-11-04 20:26:00 +0000 |
commit | a5bf402c557ad3b908b253e87a7f6c4b437b5a0c (patch) | |
tree | 3a5815d2546d9463e7c29f80a2833ef873b85bc9 /gst | |
parent | e6587d7dcc0189d94452ab722e67cdde179fd58f (diff) | |
download | gst-plugins-bad-a5bf402c557ad3b908b253e87a7f6c4b437b5a0c.tar.gz gst-plugins-bad-a5bf402c557ad3b908b253e87a7f6c4b437b5a0c.tar.bz2 gst-plugins-bad-a5bf402c557ad3b908b253e87a7f6c4b437b5a0c.zip |
gst/modplug/gstmodplug.cc: Send tag event. Fixes #559286.
Original commit message from CVS:
* gst/modplug/gstmodplug.cc:
Send tag event. Fixes #559286.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/modplug/gstmodplug.cc | 17 |
1 files changed, 17 insertions, 0 deletions
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; |