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

Split up crates to facilitate backend switching #84

Merged
merged 7 commits into from Jul 12, 2018
Merged

Split up crates to facilitate backend switching #84

merged 7 commits into from Jul 12, 2018

Conversation

@Manishearth
Copy link
Member

Manishearth commented Jul 11, 2018

This gets rid of the gst feature, instead using target-switching to select the backend.

The servo-media crate is a thin wrapper that does all the backend switching. The GStreamer backend is
now in the servo-media-gstreamer crate, and all of the audio stuff is in the servo-media-audio crate.

You use the crate the same way (one small difference, in accordance to rust style you will have to import the crate as servo-media in Cargo.toml), and it automatically picks the backend based on the platform.

This makes it pretty easy to swap backends as well; adding a new backend can be done with a cargo feature, and once we fix the android stuff we can make this unconditional.

r? @ferjm

@@ -0,0 +1,225 @@
<<<<<<< HEAD:servo-media-audio/src/node.rs

This comment has been minimized.

Copy link
@CYBAI

CYBAI Jul 11, 2018

Maybe this one is commited accidentally?

This comment has been minimized.

Copy link
@Manishearth

Manishearth Jul 11, 2018

Author Member

fixed

@Manishearth Manishearth force-pushed the crate-split branch from c94bc13 to 4197377 Jul 11, 2018
@Manishearth Manishearth force-pushed the crate-split branch from 4197377 to 479d2fd Jul 11, 2018
@Manishearth
Copy link
Member Author

Manishearth commented Jul 11, 2018

I had to git merge just because rebasing was throwing up way too many merge conflicts.

@Manishearth Manishearth mentioned this pull request Jul 11, 2018
6 of 6 tasks complete
@ferjm
ferjm approved these changes Jul 12, 2018
Copy link
Member

ferjm left a comment

\o/

I swear I had an eureka! moment last night about this approach and now I wake up and see that you already implemented it! :D! Thanks!

@ferjm ferjm merged commit 7f6c598 into master Jul 12, 2018
@ferjm ferjm deleted the crate-split branch Jul 12, 2018
ferjm referenced this pull request in ceyusa/media Jul 12, 2018
@Manishearth
Copy link
Member Author

Manishearth commented Jul 12, 2018

I'd kinda mentioned this last week but I didn't really explain it well 😄

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

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