Hello Tomas,

2006-11-07 (火) の 12:03 +0100 に Tomas Groth さんは書きました:

> If you can make gansta_rap_se.swf (google for it) work with gstreamer i'll be
> really impressed! I gave up because it seems gstremers adder doesn't like when
> it many sounds are added rapidly.

The flash is utterly bad with GStreamer backend...

As you have already been reported at GNOME bugzilla (*1), it's an issue
of GstAdder. I think so too. I investigated about GStreamer itself for a
while, but it is very complicated.

So, I have an idea for avoinding this adder issue.  The idea is that
creating multiple pipeline instead of using adder. I modified the sample
code that you posted at GNOME bugzilla to use multiple pipeline, it
seems to work fine. I attach the modified somple code.

I am not sure whether creating multiple pipeline causes some side effect
or not, but I will try to apply the way to Gnash.


(*1) http://bugzilla.gnome.org/show_bug.cgi?id=343787

Thank you,
Hiroyuki Ikezoe
#include <gst/gst.h>
#include <unistd.h>

GMainLoop *loop;

int
main (int   argc,
      char *argv[])
{
  /* initialize GStreamer */
  gst_init (NULL, NULL);
  loop = g_main_loop_new (NULL, FALSE);

  int i;
  for (i = 0; i < 100; i++) {
    GstElement *pipeline, *source, *decoder, *conv, *sink;
    /* create elements */
    pipeline = gst_pipeline_new ("audio-player");
    sink = gst_element_factory_make ("autoaudiosink", NULL);
  
    gst_bin_add_many (GST_BIN (pipeline), sink, NULL);
  
    if (!pipeline || !sink) {
      g_print ("One main element could not be created\n");
      return -1;
    }
    source = gst_element_factory_make ("filesrc", NULL);
    decoder = gst_element_factory_make ("mad", NULL);
    conv = gst_element_factory_make ("audioconvert", NULL);

    if (!source || !decoder || !conv) {
      g_print ("One element could not be created\n");
      return -1;
    }

    /* set filename property on the file source. Also add a message handler. */
    g_object_set (G_OBJECT (source), "location", argv[1], NULL);

    /* put all elements in a bin */
    gst_bin_add_many (GST_BIN (pipeline), source, decoder, conv, NULL);

    /* link together */
    gst_element_link_many (source, decoder, conv, sink, NULL);

    g_print ("Setting state to PLAYING\n");
    gst_element_set_state (pipeline, GST_STATE_PLAYING);
  }

  printf("sleeping...\n");
  sleep(10);

  /* clean up nicely */
  return 0;
}
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to