[gst-devel] threads, eos

Gert van Valkenhoef gertvv at hccnet.nl
Thu Feb 12 11:06:46 CET 2004


Hi,

I'm trying to build a threaded audio player application using  
gstreamer. I have a problem with the GstThread element, it insists on  
destroying itself, causing playback to stop.

I have a thread setup with the following elements in it:
 filesrc ! spider ! osssink
And I have the following callback registered:
   g_signal_connect (G_OBJECT(player->thread), "eos",
                     G_CALLBACK(eos_cb), player);

The callback gets called, but when I do anything with the pipeline (for  
example, changing state to GST_STATE_NULL, then set the filename for  
the source element, change back to GST_STATE_PLAYING) I get the  
following error:

(gmms:13331): GStreamer-WARNING **: Thread playback_thread is  
destroying itself. Function call will not return!

When I do a GST_STATE_NULL, change filename, GST_STATE_PLAYING from the  
GUI thread, everything works fine.

Is a thread always destroyed on EOS? If so, how can I bypass this or  
send a message to my GUI thread so I can continue playback to the next  
song?

I use the 0.7.4 release.

I also tried the example from the tutorial on queues, but that one  
doesn't run (cut & paste from website)..

Gert




More information about the gstreamer-devel mailing list