~ubuntu-branches/ubuntu/quantal/gst-plugins-bad-multiverse0.10/quantal

« back to all changes in this revision

Viewing changes to gst/modplug/gstmodplug.cc

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2009-02-23 02:23:58 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223022358-9yhx5izc7dz60yc8
Tags: 0.10.10-0ubuntu1
* New upstream release.
* debian/rules
  - Disable some plugins which get built by default but we do not ship in 
    multiverse package.
  - Do not build docs as there is no multiverse-doc package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
/**
29
29
 * SECTION:element-modplug
30
30
 * 
31
 
 * <refsect2>
32
 
 * <para>
33
31
 * Modplug uses the <ulink url="http://modplug-xmms.sourceforge.net/">modplug</ulink>
34
32
 * library to decode tracked music in the MOD/S3M/XM/IT and related formats.
35
 
 * </para>
 
33
 * 
 
34
 * <refsect2>
36
35
 * <title>Example pipeline</title>
37
 
 * <programlisting>
 
36
 * |[
38
37
 * gst-launch -v filesrc location=1990s-nostalgia.xm ! modplug ! audioconvert ! alsasink
39
 
 * </programlisting>
 
38
 * ]| Play a FastTracker xm file.
40
39
 * </refsect2>
41
40
 */
42
41
 
610
609
    /* actually load it */
611
610
    if (modplug->offset == modplug->song_size) {
612
611
      GstEvent *newsegment;
 
612
      GstTagList *tags;
613
613
      gboolean ok;
 
614
      gchar comment[16384];
614
615
 
615
616
      ok = gst_modplug_load_song (modplug);
616
617
      gst_buffer_unref (modplug->buffer);
624
625
      newsegment = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME,
625
626
          0, modplug->song_length, 0);
626
627
      gst_pad_push_event (modplug->srcpad, newsegment);
 
628
 
 
629
      /* get and send metadata */
 
630
      tags = gst_tag_list_new ();
 
631
      gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
 
632
          GST_TAG_TITLE, modplug->mSoundFile->GetTitle (),
 
633
          GST_TAG_BEATS_PER_MINUTE,
 
634
          (gdouble) modplug->mSoundFile->GetMusicTempo (), NULL);
 
635
 
 
636
      if (modplug->mSoundFile->GetSongComments ((gchar *) & comment, 16384, 32)) {
 
637
        gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
 
638
            GST_TAG_COMMENT, comment, NULL);
 
639
      }
 
640
 
 
641
 
 
642
      gst_element_found_tags (GST_ELEMENT (modplug), tags);
627
643
    } else {
628
644
      /* not fully loaded yet */
629
645
      return;