[Bug 26060] Media Source and Web Worker

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26060

--- Comment #3 from Aaron Colwell <acolwell@google.com> ---
(In reply to Saran Tunyasuvunakool from comment #2)
> From my understanding, the MediaSource object itself parses the byte stream
> in order to extract coded frames from its container (BMFF etc.), which is
> what actually gets appended to the buffer, i.e. the SourceBuffer only holds
> the elementary media stream(s). It is this step that I thought may benefit
> from offloading into a worker.
> 
> While the append operations are asynchronous, is it not the case that they
> are still queued to be executed on the main UI thread?

There is nothing that requires the parsing to occur on the main thread. The
asynchronous nature of the append allows the UA to choose the main thread or a
completely different one. In either case it needs to convey the JavaScript
visible state to the main thread before signalling that the operation has
completed.

> 
> Since I am not involved in implementing a UA I have no idea how much work is
> involved in this "demuxing" stage relative to the overall append operation.
> If it is negligible then perhaps indeed there is not much point in enabling
> Worker support.

I don't believe it is worth adding this. I believe most UA's will choose to use
a different thread for parsing if they deem it performance critical. The
JavaScript application should not have to worry about this.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 17 June 2014 15:51:02 UTC