[gst-devel] Re: [gst-cvs] soto gstreamer: gstreamer/ gstreamer/gst/

Ronald Bultje rbultje at ronald.bitfreak.net
Tue Nov 23 00:50:07 CET 2004

Op di 23-11-2004, om 02:03 schreef Jan Schmidt:
> <quote who="Martin Soto">
> > Log message:
> > 2004-11-23  Martin Soto  <martinsoto at users.sourceforge.net>
> > 	* gst/gstqueue.c (gst_queue_init, gst_queue_link_sink)
> > 	(gst_queue_link_src): Allow for renegotiating the caps of the sink
> > 	pad. The queue will now wait until it is empty and forward the new
> > 	caps to the source.
> Can one of the other core guys comment on this? 

I'm not sure how to do this correctly. What Martin is doing sounds like
the right thing, although ideally I'd prefer something less
deadlock-sensitive. In practice, there's not that many risks, though. I
didn't go over Martin's patch closely yet (will do), but I assume he
simply uses g_cond_* functions for the waiting with the usual checkings
that you learn in second year of computing science university. In case
of state changes (errors, ...), the g_cond_* is fired unconditionally. A
good thread-aware coder does check for that in the while(..) { wait(); }
loop. Like I said, I didn't go over the patch yet, but if that's taken
care of, all should be fine.
>From then on, there's only the issue of latency and hanging of the
negotiating thread, which shouldn't be too bad. Don't forget that in
practice, those renegotiations will only occur on language changes or on
scene-changes (e.g. going from AC-3 presenter to LPCM concert), where
the effect on the user experience, if any at all, won't be too dramatic
(and besides: it's fixable - we *are* running, just with empty buffers;
add a few nego optimizations and we're done).
I'd suggest to just give this patch a try, let a few people review it
while we're doing it, fix theoretical issues if we see any and then just
wait for practical issues to come up and fix those. We'll have to do
this at some point; the patch is needed. Old behaviour was definately

I'm sure Benjamin and Wim have ideas on how to do this nicely in 0.9,
but we're unfortunately in 0.8 right now. ;).


Ronald Bultje <rbultje at ronald.bitfreak.net>

More information about the gstreamer-devel mailing list