[Webkit-unassigned] [Bug 151256] [GStreamer] Use RunLoop instead of GMainLoop in AudioFileReaderGStreamer
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Nov 15 23:35:25 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=151256
--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to comment #3)
> Comment on attachment 265476 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=265476&action=review
>
> > Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:380
> > + if (isMainThread()) {
> > + RefPtr<AudioBus> returnValue;
> > + auto threadID = createThread("AudioFileReader", [&returnValue, filePath, mixToMono, sampleRate] {
> > + returnValue = AudioFileReader(filePath).createBus(sampleRate, mixToMono);
> > + });
> > + waitForThreadCompletion(threadID);
> > +
> > + return returnValue;
> > + }
>
> Would RunLoop::run() not set up a nested main loop in case of running this
> in the main thread?
Yes, but with the same main context, we need a different one to avoid deadlocks. Phil wrote the original code, so he should know the details.
> What about the cases where the bus is created in a non-main WebWorker thread
> that's also managed via RunLoop, wouldn't that set up the nested loop?
In that case a new RunLoop is created for the current thread. If those threads already a have a RunLoop running maybe we should always use a dedicated thread, though.
--
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/20151116/d66fd5c5/attachment.html>
More information about the webkit-unassigned
mailing list