servo / gecko-media

Firefox's media playback stack in a stand alone Rust crate
Mozilla Public License 2.0
6 stars 9 forks source link

WIP - Import mediasource code #81

Closed ferjm closed 6 years ago

ferjm commented 6 years ago

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.

ferjm commented 6 years ago

I'd like to write some tests for this before merging.

cpearce commented 6 years ago

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.

bors-servo commented 6 years ago

:umbrella: The latest upstream changes (presumably #88) made this pull request unmergeable. Please resolve the merge conflicts.