MSE-in-Workers: Remove direct usage of media element from MSE
Replaces remaining direct usage of the attached HTMLMediaElement from MediaSource and SourceBuffer, relying instead on the attachment to moderate that communication. Specifically, this change: * Adds attachment helpers to enable SourceBuffers to create their audio and video tracklist members, including a same-thread attachment implementation. Cross-thread attachment implementation of this is deferred until TrackListBase and TrackBase can be owned off the main thread (in a worker thread), and until they can function without themselves directly accessing an HTMLMediaElement. * Removes superfluous usage in SourceBuffer of `source_->MediaElement()` in DCHECKs; other DCHECKs already suffice. * Removes MediaSource::MediaElement() and `attached_element_`. Removes their superfluous implementation and usage from MediaSource. * Fixes outdated assumptions in various DCHECKs that all attachments use a tracer. Only same-thread attachments use a tracer. BUG=878133 Change-Id: I346b320804a0ffbf731788b7ea7c344588f660b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2439677 Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org> Reviewed-by:Will Cassella <cassew@google.com> Cr-Commit-Position: refs/heads/master@{#814329}
Showing
Please register or sign in to comment