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 upFix Android example #101
Merged
Fix Android example #101
Conversation
|
In case that you want to test this patch, you need to remove the code to switch backends based on the platform: diff --git a/servo-media/Cargo.toml b/servo-media/Cargo.toml
index ab8ab27..cade577 100644
--- a/servo-media/Cargo.toml
+++ b/servo-media/Cargo.toml
@@ -12,5 +12,5 @@ path = "../audio"
[dependencies.servo-media-player]
path = "../player"
-[target.'cfg(all(not(target_os = "android"), target_arch = "x86"))'.dependencies.servo-media-gstreamer]
+[dependencies.servo-media-gstreamer]
path = "../backends/gstreamer"
diff --git a/servo-media/src/lib.rs b/servo-media/src/lib.rs
index 91a1da6..65dddec 100644
--- a/servo-media/src/lib.rs
+++ b/servo-media/src/lib.rs
@@ -1,5 +1,4 @@
pub extern crate servo_media_audio as audio;
-#[cfg(all(not(target_os = "android"), target_arch = "x86"))]
extern crate servo_media_gstreamer;
pub extern crate servo_media_player as player;
use std::sync::{self, Arc, Mutex, Once};
@@ -37,10 +36,10 @@ impl PlayerBackend for DummyBackend {
}
}
-#[cfg(all(not(target_os = "android"), target_arch = "x86"))]
+//#[cfg(all(not(target_os = "android"), target_arch = "x86"))]
pub type Backend = servo_media_gstreamer::GStreamerBackend;
-#[cfg(not(all(not(target_os = "android"), target_arch = "x86")))]
-pub type Backend = DummyBackend;
+//#[cfg(not(all(not(target_os = "android"), target_arch = "x86")))]
+//pub type Backend = DummyBackend;
impl ServoMedia {
pub fn new() -> Self |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
ferjm commentedJul 31, 2018
•
edited
Fixes #92
r? @Manishearth