Auto merge of #12863 - emilio:disable-media, r=larsbergstrom

script: Disable our dependency in ffmpeg until the media madness is over

<!-- Please describe your changes on the following line: -->

r? @larsbergstrom

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12863)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-18 11:22:06 -05:00 committed by GitHub
commit fb7cb92076
14 changed files with 8 additions and 115 deletions

View file

@ -27,13 +27,13 @@ Please select your operating system:
#### On OS X (homebrew) #### On OS X (homebrew)
``` sh ``` sh
brew install automake pkg-config python cmake ffmpeg brew install automake pkg-config python cmake
pip install virtualenv pip install virtualenv
``` ```
#### On OS X (MacPorts) #### On OS X (MacPorts)
``` sh ``` sh
sudo port install python27 py27-virtualenv cmake ffmpeg sudo port install python27 py27-virtualenv cmake
``` ```
#### On OS X 10.11 (El Capitan), you also have to install openssl #### On OS X 10.11 (El Capitan), you also have to install openssl
@ -53,16 +53,6 @@ export DEP_OPENSSL_INCLUDE=/usr/local/include
./mach build ... ./mach build ...
``` ```
If you get this error:
``` sh
"Couldn't find libavformat", do the following:
brew uninstall ffmpeg
brew install ffmpeg --build-from-source
./mach clean
./mach build
```
If you've already partially compiled servo but forgot to do this step, run ./mach clean, link openssl, and recompile. If you've already partially compiled servo but forgot to do this step, run ./mach clean, link openssl, and recompile.
#### On Debian-based Linuxes #### On Debian-based Linuxes
@ -72,8 +62,7 @@ sudo apt-get install git curl freeglut3-dev autoconf \
libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \ libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
gperf g++ build-essential cmake virtualenv python-pip \ gperf g++ build-essential cmake virtualenv python-pip \
libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \ libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev \ libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev
libavformat-dev
``` ```
If you are on **Ubuntu 14.04** and encountered errors on installing these dependencies involving `libcheese`, see [#6158](https://github.com/servo/servo/issues/6158) for a workaround. If you are on **Ubuntu 14.04** and encountered errors on installing these dependencies involving `libcheese`, see [#6158](https://github.com/servo/servo/issues/6158) for a workaround.
@ -86,7 +75,7 @@ sudo dnf install curl freeglut-devel libtool gcc-c++ libXi-devel \
freetype-devel mesa-libGL-devel mesa-libEGL-devel glib2-devel libX11-devel libXrandr-devel gperf \ freetype-devel mesa-libGL-devel mesa-libEGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
fontconfig-devel cabextract ttmkfdir python python-virtualenv python-pip expat-devel \ fontconfig-devel cabextract ttmkfdir python python-virtualenv python-pip expat-devel \
rpm-build openssl-devel cmake bzip2-devel libXcursor-devel libXmu-devel mesa-libOSMesa-devel \ rpm-build openssl-devel cmake bzip2-devel libXcursor-devel libXmu-devel mesa-libOSMesa-devel \
dbus-devel ffmpeg-devel dbus-devel
``` ```
#### On Arch Linux #### On Arch Linux
@ -116,7 +105,7 @@ pacman -Su
pacman -Sy git mingw-w64-x86_64-toolchain mingw-w64-x86_64-freetype \ pacman -Sy git mingw-w64-x86_64-toolchain mingw-w64-x86_64-freetype \
mingw-w64-x86_64-icu mingw-w64-x86_64-nspr mingw-w64-x86_64-ca-certificates \ mingw-w64-x86_64-icu mingw-w64-x86_64-nspr mingw-w64-x86_64-ca-certificates \
mingw-w64-x86_64-expat mingw-w64-x86_64-cmake tar diffutils patch \ mingw-w64-x86_64-expat mingw-w64-x86_64-cmake tar diffutils patch \
patchutils make python2-setuptools mingw-w64-x86_64-ffmpeg patchutils make python2-setuptools
export GCC_URL=http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc export GCC_URL=http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc
export GCC_EXT=5.4.0-1-any.pkg.tar.xz export GCC_EXT=5.4.0-1-any.pkg.tar.xz
pacman -U --noconfirm $GCC_URL-$GCC_EXT $GCC_URL-ada-$GCC_EXT \ pacman -U --noconfirm $GCC_URL-$GCC_EXT $GCC_URL-ada-$GCC_EXT \

View file

@ -20,9 +20,6 @@ cmake = "0.1"
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies] [target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"} tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"}
[target.'cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))'.dependencies]
video-metadata = {git = "https://github.com/GuillaumeGomez/video-metadata-rs"}
[dependencies] [dependencies]
angle = {git = "https://github.com/servo/angle", branch = "servo"} angle = {git = "https://github.com/servo/angle", branch = "servo"}
app_units = "0.3" app_units = "0.3"

View file

@ -36,8 +36,6 @@ use string_cache::Atom;
use task_source::TaskSource; use task_source::TaskSource;
use time::{self, Timespec, Duration}; use time::{self, Timespec, Duration};
use url::Url; use url::Url;
#[cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))]
use video_metadata;
struct HTMLMediaElementContext { struct HTMLMediaElementContext {
/// The element that initiated the request. /// The element that initiated the request.
@ -161,31 +159,11 @@ impl HTMLMediaElementContext {
} }
} }
#[cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))]
fn check_metadata(&mut self, elem: &HTMLMediaElement) {
match video_metadata::get_format_from_slice(&self.data) {
Ok(meta) => {
let dur = meta.duration.unwrap_or(::std::time::Duration::new(0, 0));
*elem.video.borrow_mut() = Some(VideoMedia {
format: format!("{:?}", meta.format),
duration: Duration::seconds(dur.as_secs() as i64) +
Duration::nanoseconds(dur.subsec_nanos() as i64),
width: meta.size.width,
height: meta.size.height,
video: meta.video,
audio: meta.audio,
});
// Step 6
elem.change_ready_state(HAVE_METADATA);
self.have_metadata = true;
}
_ => {}
}
}
#[cfg(any(target_os = "android", target_arch = "arm", target_arch = "aarch64"))]
fn check_metadata(&mut self, elem: &HTMLMediaElement) { fn check_metadata(&mut self, elem: &HTMLMediaElement) {
// Step 6. // Step 6.
//
// TODO: Properly implement once we have figured out the build and
// licensing ffmpeg issues.
elem.change_ready_state(HAVE_METADATA); elem.change_ready_state(HAVE_METADATA);
self.have_metadata = true; self.have_metadata = true;
} }

View file

@ -89,8 +89,6 @@ extern crate url;
#[macro_use] #[macro_use]
extern crate util; extern crate util;
extern crate uuid; extern crate uuid;
#[cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))]
extern crate video_metadata;
extern crate webrender_traits; extern crate webrender_traits;
extern crate websocket; extern crate websocket;
extern crate xml5ever; extern crate xml5ever;

View file

@ -1941,7 +1941,6 @@ dependencies = [
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"video-metadata 0.1.3 (git+https://github.com/GuillaumeGomez/video-metadata-rs)",
"webrender_traits 0.3.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.3.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
"xml5ever 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "xml5ever 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2479,17 +2478,6 @@ dependencies = [
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "video-metadata"
version = "0.1.3"
source = "git+https://github.com/GuillaumeGomez/video-metadata-rs#ca921f8529d4ed4b3e093fe30143b3fba08a7bf4"
dependencies = [
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "void" name = "void"
version = "1.0.2" version = "1.0.2"

12
ports/cef/Cargo.lock generated
View file

@ -1793,7 +1793,6 @@ dependencies = [
"url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"uuid 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"video-metadata 0.1.3 (git+https://github.com/GuillaumeGomez/video-metadata-rs)",
"webrender_traits 0.3.0 (git+https://github.com/servo/webrender_traits)", "webrender_traits 0.3.0 (git+https://github.com/servo/webrender_traits)",
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
"xml5ever 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "xml5ever 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2339,17 +2338,6 @@ dependencies = [
"serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "video-metadata"
version = "0.1.3"
source = "git+https://github.com/GuillaumeGomez/video-metadata-rs#ca921f8529d4ed4b3e093fe30143b3fba08a7bf4"
dependencies = [
"gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "void" name = "void"
version = "1.0.2" version = "1.0.2"

View file

@ -1,6 +0,0 @@
[error.html]
type: testharness
expected: TIMEOUT
[audio.error after successful load]
expected: TIMEOUT

View file

@ -7,6 +7,3 @@
[setting src attribute on autoplay video should trigger loadeddata event] [setting src attribute on autoplay video should trigger loadeddata event]
expected: NOTRUN expected: NOTRUN
[setting src attribute on autoplay audio should trigger loadeddata event]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[event_loadeddata_noautoplay.html]
type: testharness
expected: TIMEOUT
[setting src attribute on non-autoplay audio should trigger loadeddata event]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[event_loadedmetadata.html]
type: testharness
expected: TIMEOUT
[setting src attribute on autoplay audio should trigger loadedmetadata event]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[event_loadedmetadata_noautoplay.html]
type: testharness
expected: TIMEOUT
[setting src attribute on non-autoplay audio should trigger loadedmetadata event]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[event_order_loadedmetadata_loadeddata.html]
type: testharness
expected: TIMEOUT
[setting src attribute on autoplay audio should trigger loadedmetadata then loadeddata event]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[readyState_during_loadeddata.html]
type: testharness
expected: TIMEOUT
[audio.readyState should be >= HAVE_CURRENT_DATA during loadeddata event]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[readyState_during_loadedmetadata.html]
type: testharness
expected: TIMEOUT
[audio.readyState should be >= HAVE_METADATA during loadedmetadata event]
expected: NOTRUN