Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - Import mediasource code #81

Closed
wants to merge 1 commit into from
Closed

WIP - Import mediasource code #81

wants to merge 1 commit into from

Conversation

@ferjm
Copy link
Member

ferjm commented Nov 17, 2017

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 ferjm force-pushed the ferjm:mediasource branch from 09839a0 to 54eeeb2 Nov 17, 2017
@ferjm ferjm changed the title WIP - Import mediasource code Import mediasource code Nov 17, 2017
@ferjm
Copy link
Member Author

ferjm commented Nov 17, 2017

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

@cpearce
Copy link
Contributor

cpearce commented Nov 20, 2017

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.

@philn

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.

@ferjm

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.

@ferjm

ferjm Nov 20, 2017

Author Member

In any case, as @cpearce mentioned above I need to rewrite MediaSource, so I'm not sure how much of this code will be left.

This comment has been minimized.

@cpearce

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.

@ferjm

ferjm Nov 21, 2017

Author Member

Makes sense. Thanks for the explanation!

@ferjm ferjm changed the title Import mediasource code WIP - Import mediasource code Nov 21, 2017
@bors-servo
Copy link
Collaborator

bors-servo commented Nov 23, 2017

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

@ferjm ferjm closed this Nov 28, 2017
@ferjm ferjm deleted the ferjm:mediasource branch Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.