Skip to content

Commit

Permalink
script: Disable our dependency in ffmpeg until the media madness is o…
Browse files Browse the repository at this point in the history
…ver.
  • Loading branch information
emilio committed Aug 17, 2016
1 parent ec53136 commit b9f8905
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 115 deletions.
21 changes: 5 additions & 16 deletions README.md
Expand Up @@ -27,13 +27,13 @@ Please select your operating system:
#### On OS X (homebrew)

``` sh
brew install automake pkg-config python cmake ffmpeg
brew install automake pkg-config python cmake
pip install virtualenv
```
#### On OS X (MacPorts)

``` 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

Expand All @@ -53,16 +53,6 @@ export DEP_OPENSSL_INCLUDE=/usr/local/include
./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.

#### On Debian-based Linuxes
Expand All @@ -72,8 +62,7 @@ sudo apt-get install git curl freeglut3-dev autoconf \
libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
gperf g++ build-essential cmake virtualenv python-pip \
libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev \
libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev \
libavformat-dev
libglu1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-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.

Expand All @@ -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 \
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 \
dbus-devel ffmpeg-devel
dbus-devel
```
#### On Arch Linux

Expand Down Expand Up @@ -116,7 +105,7 @@ pacman -Su
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-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_EXT=5.4.0-1-any.pkg.tar.xz
pacman -U --noconfirm $GCC_URL-$GCC_EXT $GCC_URL-ada-$GCC_EXT \
Expand Down
3 changes: 0 additions & 3 deletions components/script/Cargo.toml
Expand Up @@ -20,9 +20,6 @@ cmake = "0.1"
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
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]
angle = {git = "https://github.com/servo/angle", branch = "servo"}
app_units = "0.3"
Expand Down
28 changes: 3 additions & 25 deletions components/script/dom/htmlmediaelement.rs
Expand Up @@ -36,8 +36,6 @@ use string_cache::Atom;
use task_source::TaskSource;
use time::{self, Timespec, Duration};
use url::Url;
#[cfg(not(any(target_os = "android", target_arch = "arm", target_arch = "aarch64")))]
use video_metadata;

struct HTMLMediaElementContext {
/// The element that initiated the request.
Expand Down Expand Up @@ -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) {
// Step 6.
//
// TODO: Properly implement once we have figured out the build and
// licensing ffmpeg issues.
elem.change_ready_state(HAVE_METADATA);
self.have_metadata = true;
}
Expand Down
2 changes: 0 additions & 2 deletions components/script/lib.rs
Expand Up @@ -89,8 +89,6 @@ extern crate url;
#[macro_use]
extern crate util;
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 websocket;
extern crate xml5ever;
Expand Down
12 changes: 0 additions & 12 deletions components/servo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions ports/cef/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

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

[setting src attribute on autoplay audio should trigger loadeddata event]
expected: NOTRUN

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b9f8905

Please sign in to comment.