[Webkit-unassigned] [Bug 150807] [GStreamer] Use RunLoop::Timer instead of GMainLoopSource in video sink

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 3 22:55:50 PST 2015


--- Comment #8 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #7)
> Comment on attachment 264681 [details]
> Updated patch
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=264681&action=review
> > Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp:92
> > +        m_timer.stop();
> > +        LockHolder locker(m_sampleMutex);
> I'm still stuck on this. in requestRender() m_timer operation is protected,
> here it's not.

It's not actually the timer what is protected, but the sample, we need to hold the lock for the condition wait. 

> Regarding previous behavior, timeoutSource was never cancelled after
> scheduling, except when WebKitVideoSinkPrivate was destroyed. This
> technically deviates from that.

That's right, but I think it was not desirable. We always wait until the timer is actually fired. That means that if unlockSampleMutex() was called for whatever reason before the timer is fired, the sample is destroyed and the condition was released, so we don't keep waiting anymore. But the timer will be fired anyway, but will return early because sample is NULL (and unlocked = true). Stopping the timer we just avoid the callback to be called just to return.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151104/77caaf92/attachment-0001.html>

More information about the webkit-unassigned mailing list