[gst-devel] Re: Thoughts from FreeBSD on the upcoming GNOME 2.2

Joe Marcus Clarke marcus at FreeBSD.org
Wed Nov 13 20:22:03 CET 2002

On Wed, 2002-11-13 at 16:55, David Schleef wrote:
> On Wed, Nov 13, 2002 at 12:20:04PM -0500, Joe Marcus Clarke wrote:
> > I actually thought of that myself last night.  I'm going to try and get
> > GStreamer working with our linuxthreads port.  I'll keep you posted on
> > my results.
> It might be easier and also more helpful to get the new GThread code
> working.  I'm hoping that it will help to find some of its bugs, too.
> > > > Our pthreads implementation does not allow
> > > > applications to longjump between thread contexts.
> Gstreamer doesn't change contexts between threads.  It splits up
> the stack of a single thread into multiple cothreads, and longjumps
> (or equivalent) between contexts in a single thread.  I don't think
> this should be a problem with most threading implementations.

Attached is a hack that gets gstreamer working on FreeBSD.  The problem
seems to be that FreeBSD's initial thread stack size is only 1 MB. 
gstreamer wants a 2 MB stack.  FreeBSD's pthread implementation sees
this, and thinks gstreamer is trying to jump threads (i.e. the 2 MB
stack address is outside of the current thread's stack). 

Basically what I do is lower gstreamer's stack size to 1 MB, and, to
maintain the cothread stack size ratio, I lower the number of threads
from 8 to 16.  This gets gst-launch running at least.  I don't know if
it's actually doing the right thing, though.  Here is some of the

INFO ( 9750: 0) Initializing GStreamer Core Library version 0.4.2 
INFO ( 9750: 0) CPU features: (0c040843) MMX SSE 
registry: loaded user_registry in 0.000493 seconds
registry: loaded global_registry in 0.029583 seconds
GStreamer-INFO: 0 live buffer(s)
GStreamer-INFO: 0 live bufferpool(s)
GStreamer-INFO: 0 live event(s)
RUNNING pipeline
fakesrc0: last-message = "get      ******* (fakesrc0:src)> (0 bytes, 0)
fakesink0: last-message = "chain   ******* (fakesink0:sink)< (0 bytes,
0) 0x8076800"
fakesrc0: last-message = "get      ******* (fakesrc0:src)> (0 bytes, 1)
fakesink0: last-message = "chain   ******* (fakesink0:sink)< (0 bytes,
1) 0x8076800"
fakesrc0: last-message = "get      ******* (fakesrc0:src)> (0 bytes, 2)
fakesink0: last-message = "chain   ******* (fakesink0:sink)< (0 bytes,
2) 0x8076800"


> dave...
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list at gnome.org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list
Joe Marcus Clarke
FreeBSD GNOME Team	::	marcus at FreeBSD.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-gst_cothreads.c
Type: text/x-c
Size: 443 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20021113/5e602ad8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20021113/5e602ad8/attachment.pgp>

More information about the gstreamer-devel mailing list