Yeah, I actually tried creating the sink element in the current thread and linking it in the pad-added callback and it worked till the point that it didn't fail. I still have to test it end to end but some problems with my program aren't allowing me to do so. So far the call to create and link the sink element has passed, so it looks good.
It seems it should work, once I have the testing done more throughly, I will post the results here. Thanks for your reply, On Mon, Jul 27, 2009 at 6:57 AM, Damien Lespiau <[email protected]>wrote: > On Mon, 2009-07-27 at 03:10 +0100, Uday Verma wrote: > > Hi, > > Hi, > > > I am trying to create a GstElement using clutter_gst_video_sink_new in > > a thread other than the main thread and its segfaulting with: > > > > Program received signal SIGSEGV, Segmentation fault. > > [Switching to Thread 0x7f6e767fc950 (LWP 26454)] > > 0x00007f6e8b6bf889 in glGetString () from /usr/lib/libGL.so.1 > > When creating the GStreamer sink, clutter-gst checks what is available > in your OpenGL implementation to advertise its caps accordingly. This > has to be done in the clutter (GL) thread, as it uses GL calls and > potentially could use Cogl and/or clutter calls. > > > The thread has been created by gstreamer. I am handling a pad-added > > message for an element and then dynamically creating and linking my > > newly created pipeline. The creation of my pipeline fails when I call > > the above function, the parameter I passed is a valid ClutterTexture > > object. > > What works is to create the clutter sink in the clutter thread, and do > only the linking part in the pad-added callback. A pointer to your > project source code would allow me to give a more insightful answer. > > > This used to work with 0.8.x series. > > Well, you were using an undefined (or not well defined) behaviour. It's > best to assume that clutter-gst calls have to be done in the clutter > thread. The bug could be that the documentation lacks to says so. > > > I also tried using ClutterGstVideoTexture, I couldn't find any sink > > pads on it. Although it didn't crash on cross thread access. > > That's because ClutterGstVideoTexture is not a GstElement as the sink > is. > > HTH, > > -- > Damien > > -- Uday http://soundc.de/
