Hi;

On Wed, 2007-11-14 at 01:42 +0200, Zeeshan Ali Khattak wrote:
>
>    I finally found what exactly was wrong with my super-video
> application: I was missing a call to:
> 
> gst_bus_add_signal_watch (GST_ELEMENT_BUS (video->pipeline));
> 
>    I notced this call in video-sink test app but didn't think of it as
> something important since the app wasn't using any signals from the
> bus, but when nothing else worked i put this call in my app and tada
> everything starts to work. 

Cool.

> The reason is that ClutterGstVideoSink is
> using bus signal hander to actually render the frame. IMHO! the only
> good reason for the element to do that is for clutter to be unable to
> provide thread safety. If that is the case then is it a valid one
> anymore now that clutter (>= 0.4) provide thread safety primitives
> (_threads_enter/leave)?
> 
> If  there is some other reason(s) to do things how they are currently
> done, then I prose we either:
> 
> 1. modify the element to make use of idle func (as in g_idle_add) and
> asyn queues.
> 2. put the gst_bus_add_signal_watch() call in the element.
> 
>   #2 is apparently the simplest one-liner change but I and Wim Taymans
> think #1 is a much better approach.
> 
>   In any case! please let me know of your opinion(s) and i'll try to
> come-up with the appropriate patch(es) ASAP for me.
> 

Approach #2 was iirc originally used with some older style thread
locking (I am talking very old code here - probably around pre 0.2) - It
proved not to be 100% reliable, GL still seemed to get hit from two
different threads and thus very bad stuff happened. I eventually gave up
and turned to the current method (which I agree is probably not 100%
optimal- but safe).

Indeed we now have newer and re done much better thread safety code so
it would be worth attempting #2 (and #1 if even more efficient). Please
attach patch to a bug so we can get some wide testing however. Also with
#1 be careful with the priority of the idle so it fits with repaint,
timeline and event schedules - Ebassi can likely advise best here.

Many thanks;

  == Matthew



-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to