GStreamer Threading => "Segmentation fault"



Hey,

I was playing with GStreamer-Threading:

====
use utf8;
use GStreamer -init;

my $thread1 = GStreamer::Thread->new("thread1");
my $thread2 = GStreamer::Thread->new("thread2");

my $audiosink = GStreamer::ElementFactory->make("alsasink", "alsa");
my $source = GStreamer::ElementFactory->make("filesrc", "file");
my $mad = GStreamer::ElementFactory->make("mad", "mad");
my $queue = GStreamer::ElementFactory->make("queue", "queue");
GStreamer::Element::link_many($source, $mad, $queue);
$thread1->add_many($source, $mad, $queue);

$source->set("location", "/home/mblaesing/musik/musik/Pur -
Abenteuerland.mp3");

$queue->link($audiosink);

$thread2->add($audiosink);
$thread1->set_state("playing");
$thread2->set_state("playing");

GStreamer->main();
====

When running this small example it just segfaults (when calling the
mainloop) and I don't now why. Am I right if I asume, that perl messes
with the thread handling?

What's not relatet to thread is, the I changed the Threads to pipelines
and tried to Iterate over the to pipe by hand:
while(1) {
        $thread1->iterate();
        $thread2->iterate();
}

That also doesn't work.... Why??

Thanks

Matthias

-- 
Matthias Bläsing
ICQ: 84617206   AIM: linuxfun81   MSN: linuxfun hotmail com
"Diejenigen, die nicht schockiert sind, wenn sie zum ersten mal mit
Quantenmechanik zu tun haben, haben sie nicht verstanden." (Niels Bohr)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]