Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWIP - Import mediasource code #81
Conversation
|
I'd like to write some tests for this before merging. |
|
I'd expect you'd need to rewrite MediaSource, SourceBuffer and SourceBufferList in Servo in Rust, and we'd need some kind of API to expose from gecko-media that the Rust implementations of the DOM bindings would call. The Gecko implementations of the DOM bindings will have lots of hooks into Gecko's DOM code that we don't want to import. |
|
|
||
| namespace mozilla { | ||
|
|
||
| // TODO (gecko-media) class AbstractThread; |
This comment has been minimized.
This comment has been minimized.
philn
Nov 20, 2017
Collaborator
I believe we have AbstractThread in gecko-media already. Why was it disabled in this header?
This comment has been minimized.
This comment has been minimized.
ferjm
Nov 20, 2017
Author
Member
Because Gecko gets it from the global object and I need to figure out what that means for us :)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cpearce
Nov 21, 2017
Contributor
Upstream Gecko gets the Abstract MainThread from the script global object so that that runnables dispatched to the thread can be dispatched in the correct order when Gecko has multiple threads which correspond to the gecko "main" thread. There's more details here, but since in gecko-media we're aiming to have a single thread that thinks it's the Gecko main thread, we can just use AbstractThread::MainThread(), as we've already done in a few places where we need an AbstractThread representation of the main thread.
This comment has been minimized.
This comment has been minimized.
|
|
ferjm commentedNov 17, 2017
•
edited
This is the initial work required to stand up MSE in gecko-media. It is importing most of the code from dom/media/mediasource.
The sources that required modifications are obviously the ones implementing the DOM objects for this API: MediaSource, SourceBuffer and SourceBufferList. I removed all the JS and DOM bindings related code from them and left the remainings, but they'll likely need significant changes.
In addition to the DOM implementation, I moved a slightly modified version of SourceBufferResource.h and TrackBuffersManager.cpp to gecko/glue/ because of missing headers in m-c. I proposed a fix upstream and filed #82 so I don't forget to pull them back to its proper location on the next update after the fix lands.