Update servo media to include global mute support

This commit is contained in:
Fernando Jiménez Moreno 2019-07-05 11:01:19 +02:00
parent 0dc17af7f0
commit 8e0160fa71
9 changed files with 363 additions and 219 deletions

381
Cargo.lock generated
View file

@ -1528,19 +1528,19 @@ dependencies = [
[[package]] [[package]]
name = "glib" name = "glib"
version = "0.7.1" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "glib-sys" name = "glib-sys"
version = "0.8.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1629,271 +1629,270 @@ dependencies = [
[[package]] [[package]]
name = "gobject-sys" name = "gobject-sys"
version = "0.8.0" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer" name = "gstreamer"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"muldiv 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "muldiv 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-rational 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-app" name = "gstreamer-app"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-app-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-app-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-app-sys" name = "gstreamer-app-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-audio" name = "gstreamer-audio"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"array-init 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "array-init 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-audio-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-audio-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-audio-sys" name = "gstreamer-audio-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-base" name = "gstreamer-base"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-base-sys" name = "gstreamer-base-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-gl" name = "gstreamer-gl"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-gl-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-gl-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-gl-sys" name = "gstreamer-gl-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-player" name = "gstreamer-player"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-player-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-player-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-player-sys" name = "gstreamer-player-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-sdp" name = "gstreamer-sdp"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sdp-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sdp-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-sdp-sys" name = "gstreamer-sdp-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-sys" name = "gstreamer-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-video" name = "gstreamer-video"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-video-sys" name = "gstreamer-video-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-webrtc" name = "gstreamer-webrtc"
version = "0.13.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sdp 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sdp 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-webrtc-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-webrtc-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "gstreamer-webrtc-sys" name = "gstreamer-webrtc-sys"
version = "0.7.0" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sdp-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sdp-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -3336,6 +3335,26 @@ dependencies = [
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "paste"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro-hack 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "paste-impl"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro-hack 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "peeking_take_while" name = "peeking_take_while"
version = "0.1.2" version = "0.1.2"
@ -3437,6 +3456,16 @@ name = "precomputed-hash"
version = "0.1.1" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "proc-macro-hack"
version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "0.4.26" version = "0.4.26"
@ -4134,18 +4163,19 @@ dependencies = [
[[package]] [[package]]
name = "servo-media" name = "servo-media"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)", "servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)", "servo-media-player 0.1.0 (git+https://github.com/servo/media)",
"servo-media-streams 0.1.0 (git+https://github.com/servo/media)", "servo-media-streams 0.1.0 (git+https://github.com/servo/media)",
"servo-media-traits 0.1.0 (git+https://github.com/servo/media)",
"servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)", "servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)",
] ]
[[package]] [[package]]
name = "servo-media-audio" name = "servo-media-audio"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -4154,6 +4184,7 @@ dependencies = [
"petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media-traits 0.1.0 (git+https://github.com/servo/media)",
"servo_media_derive 0.1.0 (git+https://github.com/servo/media)", "servo_media_derive 0.1.0 (git+https://github.com/servo/media)",
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -4161,7 +4192,7 @@ dependencies = [
[[package]] [[package]]
name = "servo-media-dummy" name = "servo-media-dummy"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -4169,30 +4200,31 @@ dependencies = [
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)", "servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)", "servo-media-player 0.1.0 (git+https://github.com/servo/media)",
"servo-media-streams 0.1.0 (git+https://github.com/servo/media)", "servo-media-streams 0.1.0 (git+https://github.com/servo/media)",
"servo-media-traits 0.1.0 (git+https://github.com/servo/media)",
"servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)", "servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)",
] ]
[[package]] [[package]]
name = "servo-media-gstreamer" name = "servo-media-gstreamer"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-app 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-app 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-audio 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-audio 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-base 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-base 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-player 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-player 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sdp 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sdp 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sdp-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-webrtc 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-webrtc 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media 0.1.0 (git+https://github.com/servo/media)", "servo-media 0.1.0 (git+https://github.com/servo/media)",
@ -4201,6 +4233,7 @@ dependencies = [
"servo-media-gstreamer-render-unix 0.1.0 (git+https://github.com/servo/media)", "servo-media-gstreamer-render-unix 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)", "servo-media-player 0.1.0 (git+https://github.com/servo/media)",
"servo-media-streams 0.1.0 (git+https://github.com/servo/media)", "servo-media-streams 0.1.0 (git+https://github.com/servo/media)",
"servo-media-traits 0.1.0 (git+https://github.com/servo/media)",
"servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)", "servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)",
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"zip 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "zip 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -4209,22 +4242,22 @@ dependencies = [
[[package]] [[package]]
name = "servo-media-gstreamer-render" name = "servo-media-gstreamer-render"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)", "servo-media-player 0.1.0 (git+https://github.com/servo/media)",
] ]
[[package]] [[package]]
name = "servo-media-gstreamer-render-unix" name = "servo-media-gstreamer-render-unix"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-gl 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-gl 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gstreamer-video 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "gstreamer-video 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media-gstreamer-render 0.1.0 (git+https://github.com/servo/media)", "servo-media-gstreamer-render 0.1.0 (git+https://github.com/servo/media)",
"servo-media-player 0.1.0 (git+https://github.com/servo/media)", "servo-media-player 0.1.0 (git+https://github.com/servo/media)",
] ]
@ -4232,27 +4265,33 @@ dependencies = [
[[package]] [[package]]
name = "servo-media-player" name = "servo-media-player"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-media-streams 0.1.0 (git+https://github.com/servo/media)", "servo-media-streams 0.1.0 (git+https://github.com/servo/media)",
"servo-media-traits 0.1.0 (git+https://github.com/servo/media)",
] ]
[[package]] [[package]]
name = "servo-media-streams" name = "servo-media-streams"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "servo-media-traits"
version = "0.1.0"
source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
[[package]] [[package]]
name = "servo-media-webrtc" name = "servo-media-webrtc"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -4351,7 +4390,7 @@ dependencies = [
[[package]] [[package]]
name = "servo_media_derive" name = "servo_media_derive"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/media#c145e2097b027ca82ac767f4820693868a408bb5" source = "git+https://github.com/servo/media#046f0575e675fed725e22a36bfb45a0cb8874f9f"
dependencies = [ dependencies = [
"proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
@ -5833,8 +5872,8 @@ dependencies = [
"checksum gl_generator 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0ffaf173cf76c73a73e080366bf556b4776ece104b06961766ff11449f38604" "checksum gl_generator 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0ffaf173cf76c73a73e080366bf556b4776ece104b06961766ff11449f38604"
"checksum gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39a23d5e872a275135d66895d954269cf5e8661d234eb1c2480f4ce0d586acbd" "checksum gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39a23d5e872a275135d66895d954269cf5e8661d234eb1c2480f4ce0d586acbd"
"checksum gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "39bb69499005e11b7b7cc0af38404a1bc0f53d954bffa8adcdb6e8d5b14f75d5" "checksum gleam 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "39bb69499005e11b7b7cc0af38404a1bc0f53d954bffa8adcdb6e8d5b14f75d5"
"checksum glib 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e8fdc159c196a5dfa53a92929ac4c10c8a6637ffb43951f3fff89c2cd2365" "checksum glib 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d70d737019da0473a7cd6d9240571cf58c6897dcb10edf32b90774f4ba237c1b"
"checksum glib-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bda542f3caee39a027638e9644ff89204101ad916fd7370b585ad2c5fc97e61" "checksum glib-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4b86a9169fbc9cf9a0ef315039c2304b09d5c575c5fde7defba3576a0311b863"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb26027a84c3b9e1949ef0df0b6a3db8d0c124243a5c161ea25c7def90cb1474" "checksum glutin 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb26027a84c3b9e1949ef0df0b6a3db8d0c124243a5c161ea25c7def90cb1474"
"checksum glutin_egl_sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "23f48987ab6cb2b61ad903b59e54a2fd0c380a7baff68cffd6826b69a73dd326" "checksum glutin_egl_sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "23f48987ab6cb2b61ad903b59e54a2fd0c380a7baff68cffd6826b69a73dd326"
@ -5843,25 +5882,25 @@ dependencies = [
"checksum glutin_glx_sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1290a5ca5e46fcfa7f66f949cc9d9194b2cb6f2ed61892c8c2b82343631dba57" "checksum glutin_glx_sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1290a5ca5e46fcfa7f66f949cc9d9194b2cb6f2ed61892c8c2b82343631dba57"
"checksum glutin_wgl_sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f801bbc91efc22dd1c4818a47814fc72bf74d024510451b119381579bfa39021" "checksum glutin_wgl_sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f801bbc91efc22dd1c4818a47814fc72bf74d024510451b119381579bfa39021"
"checksum glx 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d56d59aa89ba084f04dd4767df10649c65d1ab180a9a0d1eabb9b1d5a28ab2bd" "checksum glx 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d56d59aa89ba084f04dd4767df10649c65d1ab180a9a0d1eabb9b1d5a28ab2bd"
"checksum gobject-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23e05a14290d3dc255223cba51db4b0f3da438d5250657996fa99b2a30faf43e" "checksum gobject-sys 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61d55bc9202447ca776f6ad0048c36e3312010f66f82ab478e97513e93f3604b"
"checksum gstreamer 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7edd8690dc3fb124e02d06c266c0b2a1ff4617910a26bbf2afb6d8183e76bf8c" "checksum gstreamer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ef25820a32bd6f51191f3eb466499a80f89c00d67a1448c08b9b5f9aebb7613"
"checksum gstreamer-app 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac4e19310527c932c79da0afa2fb973bc300744347b65e7f8d67d83e4a5484c" "checksum gstreamer-app 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a85485c2db4149ccb24d0b3c6598725743dec254bf757ac7a3684e62b9822c27"
"checksum gstreamer-app-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef2e3acd3ac1127109558bad31b8861f1806141375ca8787baecc25ed9c83497" "checksum gstreamer-app-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41c85ef44d827b9292833203f6623cf6592d5eda06ad1eeefa63bca0cc38ce71"
"checksum gstreamer-audio 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "505abc1a03de4dfcff4219ec21a98016ce6180950db7b349a31e4aadb4e376cd" "checksum gstreamer-audio 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d4f0bddc4c983105f3a0666d6e3abc88a72aad3d3b862816ed7f8c86aa3e833"
"checksum gstreamer-audio-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2be21b626cbb00f15582da5fc8e254dea95b728fe79a862687a3ad43918a4e8c" "checksum gstreamer-audio-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03c8b1cc44e9df434e1817ee00bfa5cb146008cacfcfbd88de4a0dac90b04496"
"checksum gstreamer-base 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5125abdd41935c39cf0525160882c18610ee9332496fd4ca69c1218069126ae" "checksum gstreamer-base 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f9e72a0456c51e9cf3a21c96539bed9be3f38c85ea49eee6d87a4d61db0cc2b0"
"checksum gstreamer-base-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a3f7c5624775ddfdc34a0e5932e1f3786a305390f26844e7567fb0179b985f2" "checksum gstreamer-base-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ba1955ea091323c17fdf8ff54fd7cf3dfed1a6035193ba08f85eb76bf549056"
"checksum gstreamer-gl 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "364a49f206a6d58cc7d51204472cfb2b5e274c8b2b5a438aadfb3e93d21207d7" "checksum gstreamer-gl 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3a7e54a021369cc93be69d2aaaab75e8916517bbc6de9d19f6584135df740580"
"checksum gstreamer-gl-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "83ac65068d1e4d9a43e84cc87b68f0f3aa79a16edc107722b8fda476b7ae636a" "checksum gstreamer-gl-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb42f6fb935126b02e6221d0c3655da0b3817bda9e355cc44467cd54ad8259b5"
"checksum gstreamer-player 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e5341030ff6c8fb0e83ed01abab236a74cbcbe88afd0f4870e3a6b34a1fd61c4" "checksum gstreamer-player 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "78395f87de2b954ca3e33a594a4eb85e68246f5f41a70bf0ab52187aacb4d3a9"
"checksum gstreamer-player-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ac29007ef1f9abc0e35ea0b65c4331ddae5355ad6869e1099f3497db606c40a" "checksum gstreamer-player-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c3608d3e96c8977f31b9b8db7da0b8d0e96758b060e3f05fc3ee9626d75ab1c5"
"checksum gstreamer-sdp 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "edbaa1a273328f4e8ab261cc2bc0065fdb0f2f53a16f0525b4f5d75cf0aa6225" "checksum gstreamer-sdp 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b2e680156e5a488eda9ebd6081c0141386ef72bb81e3f0e6a2ca0c3129d82ac2"
"checksum gstreamer-sdp-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81136c0579291b36c1b2fb0e797f4847e22ac502ee36733dfdc5a95fb71c23f0" "checksum gstreamer-sdp-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e062aa557a851d8aac367df24ca80040ec45340033c0c6675fbdc7f26f71da48"
"checksum gstreamer-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "79e3a47e15245892cfa722e5f64714c9e2de5683eef0a706f56a8899b78100c8" "checksum gstreamer-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfc2f6cc9b6a1f5159bfd500310fe431cfb0b74b3af17ce3fdf8353cf586975"
"checksum gstreamer-video 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ac4da6efce179977de2337d392574c6e6c00f502a8fef6f6bfc11f8e16a93ed" "checksum gstreamer-video 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b3f0b864eced7c270c0e083a433128ddf65cda2409a5f400e1c7af3cb59858f"
"checksum gstreamer-video-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da2b2bc12f6cbb96f2735e4b9e3241a9832139de042cf67415025c282b2ff9b7" "checksum gstreamer-video-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b8fcb1e577de93d1ad1e5117234ce64d40f215143d752140719923651608983"
"checksum gstreamer-webrtc 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "90b57e4a91aa677fae841711af3b5b962d37c64c1c62cbeefaba4af18e049c2f" "checksum gstreamer-webrtc 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e085c2c1ddfbbf91459c950d10b40e7acef1f8661f6e86aa4d40edfef91cd167"
"checksum gstreamer-webrtc-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9dd6c04ea7cd1222787d6718f1e42a062cae3abbe257ff9ebb34793e67afcdad" "checksum gstreamer-webrtc-sys 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bf7375d6737037e01c6c2342ab30e6ff77cf5e36fc64c81d8d43054b33f4fa7"
"checksum gvr-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1334b94d8ce67319ddc44663daef53d8c1538629a11562530c981dbd9085b9a" "checksum gvr-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1334b94d8ce67319ddc44663daef53d8c1538629a11562530c981dbd9085b9a"
"checksum h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a27e7ed946e8335bdf9a191bc1b9b14a03ba822d013d2f58437f4fabcbd7fc2c" "checksum h2 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a27e7ed946e8335bdf9a191bc1b9b14a03ba822d013d2f58437f4fabcbd7fc2c"
"checksum half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63d68db75012a85555434ee079e7e6337931f87a087ab2988becbadf64673a7f" "checksum half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63d68db75012a85555434ee079e7e6337931f87a087ab2988becbadf64673a7f"
@ -5974,6 +6013,8 @@ dependencies = [
"checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" "checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7"
"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9"
"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" "checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c"
"checksum paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4a4a1c555c6505821f9d58b8779d0f630a6b7e4e1be24ba718610acf01fa79"
"checksum paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "26e796e623b8b257215f27e6c80a5478856cae305f5b59810ff9acdaa34570e6"
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
"checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356" "checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356"
"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" "checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f"
@ -5986,6 +6027,7 @@ dependencies = [
"checksum png 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9adebf7fb91ccf5eac9da1a8e00e83cb8ae882c3e8d8e4ad59da73cb8c82a2c9" "checksum png 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9adebf7fb91ccf5eac9da1a8e00e83cb8ae882c3e8d8e4ad59da73cb8c82a2c9"
"checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd" "checksum podio 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "780fb4b6698bbf9cf2444ea5d22411cef2953f0824b98f33cf454ec5615645bd"
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
"checksum proc-macro-hack 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0c1dd4172a1e1f96f709341418f49b11ea6c2d95d53dca08c0f74cbd332d9cf3"
"checksum proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "38fddd23d98b2144d197c0eca5705632d4fe2667d14a6be5df8934f8d74f1978" "checksum proc-macro2 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "38fddd23d98b2144d197c0eca5705632d4fe2667d14a6be5df8934f8d74f1978"
"checksum procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9a1574a51c3fd37b26d2c0032b649d08a7d51d4cca9c41bbc5bf7118fa4509d0" "checksum procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9a1574a51c3fd37b26d2c0032b649d08a7d51d4cca9c41bbc5bf7118fa4509d0"
"checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4" "checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4"
@ -6041,6 +6083,7 @@ dependencies = [
"checksum servo-media-gstreamer-render-unix 0.1.0 (git+https://github.com/servo/media)" = "<none>" "checksum servo-media-gstreamer-render-unix 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-player 0.1.0 (git+https://github.com/servo/media)" = "<none>" "checksum servo-media-player 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-streams 0.1.0 (git+https://github.com/servo/media)" = "<none>" "checksum servo-media-streams 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-traits 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)" = "<none>" "checksum servo-media-webrtc 0.1.0 (git+https://github.com/servo/media)" = "<none>"
"checksum servo-skia 0.30000021.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0a65022054874fc1f38dc45e19192accbae775784c3ff05c3875bcc176c19" "checksum servo-skia 0.30000021.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0a65022054874fc1f38dc45e19192accbae775784c3ff05c3875bcc176c19"
"checksum servo_media_derive 0.1.0 (git+https://github.com/servo/media)" = "<none>" "checksum servo_media_derive 0.1.0 (git+https://github.com/servo/media)" = "<none>"

View file

@ -174,7 +174,7 @@ thread_local!(pub static TOP_LEVEL_BROWSING_CONTEXT_ID: Cell<Option<TopLevelBrow
#[derive( #[derive(
Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, Ord, PartialEq, PartialOrd, Serialize, Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, Ord, PartialEq, PartialOrd, Serialize,
)] )]
pub struct TopLevelBrowsingContextId(BrowsingContextId); pub struct TopLevelBrowsingContextId(pub BrowsingContextId);
impl TopLevelBrowsingContextId { impl TopLevelBrowsingContextId {
pub fn new() -> TopLevelBrowsingContextId { pub fn new() -> TopLevelBrowsingContextId {

View file

@ -23,6 +23,7 @@ use crate::dom::promise::Promise;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::task_source::TaskSource; use crate::task_source::TaskSource;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use msg::constellation_msg::BrowsingContextId;
use servo_media::audio::context::{LatencyCategory, ProcessingState, RealTimeAudioContextOptions}; use servo_media::audio::context::{LatencyCategory, ProcessingState, RealTimeAudioContextOptions};
use std::rc::Rc; use std::rc::Rc;
@ -39,10 +40,15 @@ pub struct AudioContext {
impl AudioContext { impl AudioContext {
#[allow(unrooted_must_root)] #[allow(unrooted_must_root)]
// https://webaudio.github.io/web-audio-api/#AudioContext-constructors // https://webaudio.github.io/web-audio-api/#AudioContext-constructors
fn new_inherited(options: &AudioContextOptions) -> AudioContext { fn new_inherited(
options: &AudioContextOptions,
browsing_context_id: BrowsingContextId,
) -> AudioContext {
// Steps 1-3. // Steps 1-3.
let context = let context = BaseAudioContext::new_inherited(
BaseAudioContext::new_inherited(BaseAudioContextOptions::AudioContext(options.into())); BaseAudioContextOptions::AudioContext(options.into()),
browsing_context_id,
);
// Step 4.1. // Step 4.1.
let latency_hint = options.latencyHint; let latency_hint = options.latencyHint;
@ -64,7 +70,8 @@ impl AudioContext {
#[allow(unrooted_must_root)] #[allow(unrooted_must_root)]
pub fn new(window: &Window, options: &AudioContextOptions) -> DomRoot<AudioContext> { pub fn new(window: &Window, options: &AudioContextOptions) -> DomRoot<AudioContext> {
let context = AudioContext::new_inherited(options); let browsing_context_id = window.window_proxy().top_level_browsing_context_id().0;
let context = AudioContext::new_inherited(options, browsing_context_id);
let context = reflect_dom_object(Box::new(context), window, AudioContextBinding::Wrap); let context = reflect_dom_object(Box::new(context), window, AudioContextBinding::Wrap);
context.resume(); context.resume();
context context
@ -128,7 +135,7 @@ impl AudioContextMethods for AudioContext {
let window = DomRoot::downcast::<Window>(self.global()).unwrap(); let window = DomRoot::downcast::<Window>(self.global()).unwrap();
let task_source = window.task_manager().dom_manipulation_task_source(); let task_source = window.task_manager().dom_manipulation_task_source();
let trusted_promise = TrustedPromise::new(promise.clone()); let trusted_promise = TrustedPromise::new(promise.clone());
match self.context.audio_context_impl().suspend() { match self.context.audio_context_impl().lock().unwrap().suspend() {
Ok(_) => { Ok(_) => {
let base_context = Trusted::new(&self.context); let base_context = Trusted::new(&self.context);
let context = Trusted::new(self); let context = Trusted::new(self);
@ -189,7 +196,7 @@ impl AudioContextMethods for AudioContext {
let window = DomRoot::downcast::<Window>(self.global()).unwrap(); let window = DomRoot::downcast::<Window>(self.global()).unwrap();
let task_source = window.task_manager().dom_manipulation_task_source(); let task_source = window.task_manager().dom_manipulation_task_source();
let trusted_promise = TrustedPromise::new(promise.clone()); let trusted_promise = TrustedPromise::new(promise.clone());
match self.context.audio_context_impl().close() { match self.context.audio_context_impl().lock().unwrap().close() {
Ok(_) => { Ok(_) => {
let base_context = Trusted::new(&self.context); let base_context = Trusted::new(&self.context);
let context = Trusted::new(self); let context = Trusted::new(self);

View file

@ -58,7 +58,11 @@ impl AudioNode {
mode: options.mode.into(), mode: options.mode.into(),
interpretation: options.interpretation.into(), interpretation: options.interpretation.into(),
}; };
let node_id = context.audio_context_impl().create_node(node_type, ch); let node_id = context
.audio_context_impl()
.lock()
.unwrap()
.create_node(node_type, ch);
Ok(AudioNode::new_inherited_for_id( Ok(AudioNode::new_inherited_for_id(
node_id, node_id,
context, context,
@ -90,6 +94,8 @@ impl AudioNode {
pub fn message(&self, message: AudioNodeMessage) { pub fn message(&self, message: AudioNodeMessage) {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.message_node(self.node_id, message); .message_node(self.node_id, message);
} }
@ -116,10 +122,14 @@ impl AudioNodeMethods for AudioNode {
// servo-media takes care of ignoring duplicated connections. // servo-media takes care of ignoring duplicated connections.
self.context.audio_context_impl().connect_ports( self.context
self.node_id().output(output), .audio_context_impl()
destination.node_id().input(input), .lock()
); .unwrap()
.connect_ports(
self.node_id().output(output),
destination.node_id().input(input),
);
Ok(DomRoot::from_ref(destination)) Ok(DomRoot::from_ref(destination))
} }
@ -136,10 +146,14 @@ impl AudioNodeMethods for AudioNode {
// servo-media takes care of ignoring duplicated connections. // servo-media takes care of ignoring duplicated connections.
self.context.audio_context_impl().connect_ports( self.context
self.node_id().output(output), .audio_context_impl()
dest.node_id().param(dest.param_type()), .lock()
); .unwrap()
.connect_ports(
self.node_id().output(output),
dest.node_id().param(dest.param_type()),
);
Ok(()) Ok(())
} }
@ -148,6 +162,8 @@ impl AudioNodeMethods for AudioNode {
fn Disconnect(&self) -> ErrorResult { fn Disconnect(&self) -> ErrorResult {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.disconnect_all_from(self.node_id()); .disconnect_all_from(self.node_id());
Ok(()) Ok(())
} }
@ -156,6 +172,8 @@ impl AudioNodeMethods for AudioNode {
fn Disconnect_(&self, out: u32) -> ErrorResult { fn Disconnect_(&self, out: u32) -> ErrorResult {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.disconnect_output(self.node_id().output(out)); .disconnect_output(self.node_id().output(out));
Ok(()) Ok(())
} }
@ -164,6 +182,8 @@ impl AudioNodeMethods for AudioNode {
fn Disconnect__(&self, to: &AudioNode) -> ErrorResult { fn Disconnect__(&self, to: &AudioNode) -> ErrorResult {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.disconnect_between(self.node_id(), to.node_id()); .disconnect_between(self.node_id(), to.node_id());
Ok(()) Ok(())
} }
@ -172,6 +192,8 @@ impl AudioNodeMethods for AudioNode {
fn Disconnect___(&self, to: &AudioNode, out: u32) -> ErrorResult { fn Disconnect___(&self, to: &AudioNode, out: u32) -> ErrorResult {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.disconnect_output_between(self.node_id().output(out), to.node_id()); .disconnect_output_between(self.node_id().output(out), to.node_id());
Ok(()) Ok(())
} }
@ -180,6 +202,8 @@ impl AudioNodeMethods for AudioNode {
fn Disconnect____(&self, to: &AudioNode, out: u32, inp: u32) -> ErrorResult { fn Disconnect____(&self, to: &AudioNode, out: u32, inp: u32) -> ErrorResult {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.disconnect_output_between_to(self.node_id().output(out), to.node_id().input(inp)); .disconnect_output_between_to(self.node_id().output(out), to.node_id().input(inp));
Ok(()) Ok(())
} }
@ -188,6 +212,8 @@ impl AudioNodeMethods for AudioNode {
fn Disconnect_____(&self, param: &AudioParam) -> ErrorResult { fn Disconnect_____(&self, param: &AudioParam) -> ErrorResult {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.disconnect_to(self.node_id(), param.node_id().param(param.param_type())); .disconnect_to(self.node_id(), param.node_id().param(param.param_type()));
Ok(()) Ok(())
} }
@ -196,6 +222,8 @@ impl AudioNodeMethods for AudioNode {
fn Disconnect______(&self, param: &AudioParam, out: u32) -> ErrorResult { fn Disconnect______(&self, param: &AudioParam, out: u32) -> ErrorResult {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.disconnect_output_between_to( .disconnect_output_between_to(
self.node_id().output(out), self.node_id().output(out),
param.node_id().param(param.param_type()), param.node_id().param(param.param_type()),

View file

@ -81,6 +81,8 @@ impl AudioParam {
fn message_node(&self, message: AudioNodeMessage) { fn message_node(&self, message: AudioNodeMessage) {
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.message_node(self.node, message); .message_node(self.node, message);
} }

View file

@ -49,11 +49,12 @@ use crate::task_source::TaskSource;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use js::rust::CustomAutoRooterGuard; use js::rust::CustomAutoRooterGuard;
use js::typedarray::ArrayBuffer; use js::typedarray::ArrayBuffer;
use msg::constellation_msg::BrowsingContextId;
use servo_media::audio::context::{AudioContext, AudioContextOptions, ProcessingState}; use servo_media::audio::context::{AudioContext, AudioContextOptions, ProcessingState};
use servo_media::audio::context::{OfflineAudioContextOptions, RealTimeAudioContextOptions}; use servo_media::audio::context::{OfflineAudioContextOptions, RealTimeAudioContextOptions};
use servo_media::audio::decoder::AudioDecoderCallbacks; use servo_media::audio::decoder::AudioDecoderCallbacks;
use servo_media::audio::graph::NodeId; use servo_media::audio::graph::NodeId;
use servo_media::ServoMedia; use servo_media::{ClientContextId, ServoMedia};
use std::cell::Cell; use std::cell::Cell;
use std::collections::hash_map::Entry; use std::collections::hash_map::Entry;
use std::collections::{HashMap, VecDeque}; use std::collections::{HashMap, VecDeque};
@ -79,7 +80,7 @@ struct DecodeResolver {
pub struct BaseAudioContext { pub struct BaseAudioContext {
eventtarget: EventTarget, eventtarget: EventTarget,
#[ignore_malloc_size_of = "servo_media"] #[ignore_malloc_size_of = "servo_media"]
audio_context_impl: AudioContext, audio_context_impl: Arc<Mutex<AudioContext>>,
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-destination /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-destination
destination: MutNullableDom<AudioDestinationNode>, destination: MutNullableDom<AudioDestinationNode>,
listener: MutNullableDom<AudioListener>, listener: MutNullableDom<AudioListener>,
@ -104,7 +105,10 @@ pub struct BaseAudioContext {
impl BaseAudioContext { impl BaseAudioContext {
#[allow(unrooted_must_root)] #[allow(unrooted_must_root)]
pub fn new_inherited(options: BaseAudioContextOptions) -> BaseAudioContext { pub fn new_inherited(
options: BaseAudioContextOptions,
browsing_context_id: BrowsingContextId,
) -> BaseAudioContext {
let (sample_rate, channel_count) = match options { let (sample_rate, channel_count) = match options {
BaseAudioContextOptions::AudioContext(ref opt) => (opt.sample_rate, 2), BaseAudioContextOptions::AudioContext(ref opt) => (opt.sample_rate, 2),
BaseAudioContextOptions::OfflineAudioContext(ref opt) => { BaseAudioContextOptions::OfflineAudioContext(ref opt) => {
@ -112,11 +116,15 @@ impl BaseAudioContext {
}, },
}; };
let client_context_id = ClientContextId::build(
browsing_context_id.namespace_id.0,
browsing_context_id.index.0.get(),
);
let context = BaseAudioContext { let context = BaseAudioContext {
eventtarget: EventTarget::new_inherited(), eventtarget: EventTarget::new_inherited(),
audio_context_impl: ServoMedia::get() audio_context_impl: ServoMedia::get()
.unwrap() .unwrap()
.create_audio_context(options.into()), .create_audio_context(&client_context_id, options.into()),
destination: Default::default(), destination: Default::default(),
listener: Default::default(), listener: Default::default(),
in_flight_resume_promises_queue: Default::default(), in_flight_resume_promises_queue: Default::default(),
@ -135,16 +143,16 @@ impl BaseAudioContext {
false false
} }
pub fn audio_context_impl(&self) -> &AudioContext { pub fn audio_context_impl(&self) -> Arc<Mutex<AudioContext>> {
&self.audio_context_impl self.audio_context_impl.clone()
} }
pub fn destination_node(&self) -> NodeId { pub fn destination_node(&self) -> NodeId {
self.audio_context_impl.dest_node() self.audio_context_impl.lock().unwrap().dest_node()
} }
pub fn listener(&self) -> NodeId { pub fn listener(&self) -> NodeId {
self.audio_context_impl.listener() self.audio_context_impl.lock().unwrap().listener()
} }
// https://webaudio.github.io/web-audio-api/#allowed-to-start // https://webaudio.github.io/web-audio-api/#allowed-to-start
@ -205,7 +213,7 @@ impl BaseAudioContext {
/// Control thread processing state /// Control thread processing state
pub fn control_thread_state(&self) -> ProcessingState { pub fn control_thread_state(&self) -> ProcessingState {
self.audio_context_impl.state() self.audio_context_impl.lock().unwrap().state()
} }
/// Set audio context state /// Set audio context state
@ -220,7 +228,7 @@ impl BaseAudioContext {
let this = Trusted::new(self); let this = Trusted::new(self);
// Set the rendering thread state to 'running' and start // Set the rendering thread state to 'running' and start
// rendering the audio graph. // rendering the audio graph.
match self.audio_context_impl.resume() { match self.audio_context_impl.lock().unwrap().resume() {
Ok(()) => { Ok(()) => {
self.take_pending_resume_promises(Ok(())); self.take_pending_resume_promises(Ok(()));
let _ = task_source.queue( let _ = task_source.queue(
@ -264,7 +272,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-currenttime /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-currenttime
fn CurrentTime(&self) -> Finite<f64> { fn CurrentTime(&self) -> Finite<f64> {
let current_time = self.audio_context_impl.current_time(); let current_time = self.audio_context_impl.lock().unwrap().current_time();
Finite::wrap(current_time) Finite::wrap(current_time)
} }
@ -279,7 +287,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
let promise = Promise::new_in_current_compartment(&self.global(), comp); let promise = Promise::new_in_current_compartment(&self.global(), comp);
// Step 2. // Step 2.
if self.audio_context_impl.state() == ProcessingState::Closed { if self.audio_context_impl.lock().unwrap().state() == ProcessingState::Closed {
promise.reject_error(Error::InvalidState); promise.reject_error(Error::InvalidState);
return promise; return promise;
} }
@ -520,6 +528,8 @@ impl BaseAudioContextMethods for BaseAudioContext {
}) })
.build(); .build();
self.audio_context_impl self.audio_context_impl
.lock()
.unwrap()
.decode_audio_data(audio_data, callbacks); .decode_audio_data(audio_data, callbacks);
} else { } else {
// Step 3. // Step 3.

View file

@ -493,10 +493,10 @@ unsafe_no_jsmanaged_fields!(InteractiveWindow);
unsafe_no_jsmanaged_fields!(CanvasId); unsafe_no_jsmanaged_fields!(CanvasId);
unsafe_no_jsmanaged_fields!(SourceSet); unsafe_no_jsmanaged_fields!(SourceSet);
unsafe_no_jsmanaged_fields!(AudioBuffer); unsafe_no_jsmanaged_fields!(AudioBuffer);
unsafe_no_jsmanaged_fields!(AudioContext); unsafe_no_jsmanaged_fields!(Arc<Mutex<AudioContext>>);
unsafe_no_jsmanaged_fields!(NodeId); unsafe_no_jsmanaged_fields!(NodeId);
unsafe_no_jsmanaged_fields!(AnalysisEngine, DistanceModel, PanningModel, ParamType); unsafe_no_jsmanaged_fields!(AnalysisEngine, DistanceModel, PanningModel, ParamType);
unsafe_no_jsmanaged_fields!(dyn Player); unsafe_no_jsmanaged_fields!(Arc<Mutex<dyn Player>>);
unsafe_no_jsmanaged_fields!(WebRtcController); unsafe_no_jsmanaged_fields!(WebRtcController);
unsafe_no_jsmanaged_fields!(MediaStreamId, MediaStreamType); unsafe_no_jsmanaged_fields!(MediaStreamId, MediaStreamType);
unsafe_no_jsmanaged_fields!(Mutex<MediaFrameRenderer>); unsafe_no_jsmanaged_fields!(Mutex<MediaFrameRenderer>);

View file

@ -75,7 +75,7 @@ use script_layout_interface::HTMLMediaData;
use servo_config::pref; use servo_config::pref;
use servo_media::player::frame::{Frame, FrameRenderer}; use servo_media::player::frame::{Frame, FrameRenderer};
use servo_media::player::{PlaybackState, Player, PlayerError, PlayerEvent, StreamType}; use servo_media::player::{PlaybackState, Player, PlayerError, PlayerEvent, StreamType};
use servo_media::{ServoMedia, SupportsMediaType}; use servo_media::{ClientContextId, ServoMedia, SupportsMediaType};
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::cell::Cell; use std::cell::Cell;
use std::collections::VecDeque; use std::collections::VecDeque;
@ -297,7 +297,7 @@ pub struct HTMLMediaElement {
#[ignore_malloc_size_of = "promises are hard"] #[ignore_malloc_size_of = "promises are hard"]
in_flight_play_promises_queue: DomRefCell<VecDeque<(Box<[Rc<Promise>]>, ErrorResult)>>, in_flight_play_promises_queue: DomRefCell<VecDeque<(Box<[Rc<Promise>]>, ErrorResult)>>,
#[ignore_malloc_size_of = "servo_media"] #[ignore_malloc_size_of = "servo_media"]
player: DomRefCell<Option<Box<dyn Player>>>, player: DomRefCell<Option<Arc<Mutex<dyn Player>>>>,
#[ignore_malloc_size_of = "Arc"] #[ignore_malloc_size_of = "Arc"]
frame_renderer: Arc<Mutex<MediaFrameRenderer>>, frame_renderer: Arc<Mutex<MediaFrameRenderer>>,
/// https://html.spec.whatwg.org/multipage/#show-poster-flag /// https://html.spec.whatwg.org/multipage/#show-poster-flag
@ -415,10 +415,10 @@ impl HTMLMediaElement {
fn play_media(&self) { fn play_media(&self) {
if let Some(ref player) = *self.player.borrow() { if let Some(ref player) = *self.player.borrow() {
if let Err(e) = player.set_rate(self.playbackRate.get()) { if let Err(e) = player.lock().unwrap().set_rate(self.playbackRate.get()) {
warn!("Could not set the playback rate {:?}", e); warn!("Could not set the playback rate {:?}", e);
} }
if let Err(e) = player.play() { if let Err(e) = player.lock().unwrap().play() {
warn!("Could not play media {:?}", e); warn!("Could not play media {:?}", e);
} }
} }
@ -485,7 +485,7 @@ impl HTMLMediaElement {
this.upcast::<EventTarget>().fire_event(atom!("pause")); this.upcast::<EventTarget>().fire_event(atom!("pause"));
if let Some(ref player) = *this.player.borrow() { if let Some(ref player) = *this.player.borrow() {
if let Err(e) = player.pause() { if let Err(e) = player.lock().unwrap().pause() {
eprintln!("Could not pause player {:?}", e); eprintln!("Could not pause player {:?}", e);
} }
} }
@ -925,6 +925,8 @@ impl HTMLMediaElement {
.borrow() .borrow()
.as_ref() .as_ref()
.unwrap() .unwrap()
.lock()
.unwrap()
.set_stream(&track.id(), pos == tracks.len() - 1) .set_stream(&track.id(), pos == tracks.len() - 1)
{ {
self.queue_dedicated_media_source_failure_steps(); self.queue_dedicated_media_source_failure_steps();
@ -974,7 +976,7 @@ impl HTMLMediaElement {
this.upcast::<EventTarget>().fire_event(atom!("error")); this.upcast::<EventTarget>().fire_event(atom!("error"));
if let Some(ref player) = *this.player.borrow() { if let Some(ref player) = *this.player.borrow() {
if let Err(e) = player.stop() { if let Err(e) = player.lock().unwrap().stop() {
eprintln!("Could not stop player {:?}", e); eprintln!("Could not stop player {:?}", e);
} }
} }
@ -1230,7 +1232,7 @@ impl HTMLMediaElement {
// Step 11. // Step 11.
if let Some(ref player) = *self.player.borrow() { if let Some(ref player) = *self.player.borrow() {
if let Err(e) = player.seek(time) { if let Err(e) = player.lock().unwrap().seek(time) {
eprintln!("Seek error {:?}", e); eprintln!("Seek error {:?}", e);
} }
} }
@ -1302,7 +1304,13 @@ impl HTMLMediaElement {
HTMLMediaElementTypeId::HTMLVideoElement => Some(self.frame_renderer.clone()), HTMLMediaElementTypeId::HTMLVideoElement => Some(self.frame_renderer.clone()),
}; };
let browsing_context_id = window.window_proxy().top_level_browsing_context_id().0;
let client_context_id = ClientContextId::build(
browsing_context_id.namespace_id.0,
browsing_context_id.index.0.get(),
);
let player = ServoMedia::get().unwrap().create_player( let player = ServoMedia::get().unwrap().create_player(
&client_context_id,
stream_type, stream_type,
action_sender, action_sender,
renderer, renderer,
@ -1737,9 +1745,14 @@ impl Drop for HTMLMediaElement {
}); });
if let Some(ref player) = *self.player.borrow() { if let Some(ref player) = *self.player.borrow() {
if let Err(err) = player.shutdown() { let browsing_context_id = window.window_proxy().top_level_browsing_context_id().0;
warn!("Error shutting down player {:?}", err); let client_context_id = ClientContextId::build(
} browsing_context_id.namespace_id.0,
browsing_context_id.index.0.get(),
);
ServoMedia::get()
.unwrap()
.shutdown_player(&client_context_id, player.clone());
} }
} }
} }
@ -1797,7 +1810,7 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
} }
if let Some(ref player) = *self.player.borrow() { if let Some(ref player) = *self.player.borrow() {
let _ = player.set_mute(value); let _ = player.lock().unwrap().set_mute(value);
} }
self.muted.set(value); self.muted.set(value);
@ -2005,7 +2018,7 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
self.queue_ratechange_event(); self.queue_ratechange_event();
if self.is_potentially_playing() { if self.is_potentially_playing() {
if let Some(ref player) = *self.player.borrow() { if let Some(ref player) = *self.player.borrow() {
if let Err(e) = player.set_rate(*value) { if let Err(e) = player.lock().unwrap().set_rate(*value) {
warn!("Could not set the playback rate {:?}", e); warn!("Could not set the playback rate {:?}", e);
} }
} }
@ -2072,7 +2085,7 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
fn Buffered(&self) -> DomRoot<TimeRanges> { fn Buffered(&self) -> DomRoot<TimeRanges> {
let mut buffered = TimeRangesContainer::new(); let mut buffered = TimeRangesContainer::new();
if let Some(ref player) = *self.player.borrow() { if let Some(ref player) = *self.player.borrow() {
if let Ok(ranges) = player.buffered() { if let Ok(ranges) = player.lock().unwrap().buffered() {
for range in ranges { for range in ranges {
let _ = buffered.add(range.start as f64, range.end as f64); let _ = buffered.add(range.start as f64, range.end as f64);
} }
@ -2378,6 +2391,8 @@ impl FetchResponseListener for HTMLMediaElementFetchListener {
.borrow() .borrow()
.as_ref() .as_ref()
.unwrap() .unwrap()
.lock()
.unwrap()
.set_input_size(content_length) .set_input_size(content_length)
{ {
warn!("Could not set player input size {:?}", e); warn!("Could not set player input size {:?}", e);
@ -2431,7 +2446,15 @@ impl FetchResponseListener for HTMLMediaElementFetchListener {
let payload_len = payload.len() as u64; let payload_len = payload.len() as u64;
// Push input data into the player. // Push input data into the player.
if let Err(e) = elem.player.borrow().as_ref().unwrap().push_data(payload) { if let Err(e) = elem
.player
.borrow()
.as_ref()
.unwrap()
.lock()
.unwrap()
.push_data(payload)
{
// If we are pushing too much data and we know that we can // If we are pushing too much data and we know that we can
// restart the download later from where we left, we cancel // restart the download later from where we left, we cancel
// the current request. Otherwise, we continue the request // the current request. Otherwise, we continue the request
@ -2478,7 +2501,15 @@ impl FetchResponseListener for HTMLMediaElementFetchListener {
if elem.generation_id.get() == self.generation_id { if elem.generation_id.get() == self.generation_id {
if let Some(ref current_fetch_context) = *elem.current_fetch_context.borrow() { if let Some(ref current_fetch_context) = *elem.current_fetch_context.borrow() {
if let Some(CancelReason::Error) = current_fetch_context.cancel_reason() { if let Some(CancelReason::Error) = current_fetch_context.cancel_reason() {
if let Err(e) = elem.player.borrow().as_ref().unwrap().end_of_stream() { if let Err(e) = elem
.player
.borrow()
.as_ref()
.unwrap()
.lock()
.unwrap()
.end_of_stream()
{
warn!("Could not signal EOS to player {:?}", e); warn!("Could not signal EOS to player {:?}", e);
} }
return; return;

View file

@ -23,6 +23,7 @@ use crate::dom::promise::Promise;
use crate::dom::window::Window; use crate::dom::window::Window;
use crate::task_source::TaskSource; use crate::task_source::TaskSource;
use dom_struct::dom_struct; use dom_struct::dom_struct;
use msg::constellation_msg::BrowsingContextId;
use servo_media::audio::context::OfflineAudioContextOptions as ServoMediaOfflineAudioContextOptions; use servo_media::audio::context::OfflineAudioContextOptions as ServoMediaOfflineAudioContextOptions;
use std::cell::Cell; use std::cell::Cell;
use std::rc::Rc; use std::rc::Rc;
@ -42,14 +43,21 @@ pub struct OfflineAudioContext {
impl OfflineAudioContext { impl OfflineAudioContext {
#[allow(unrooted_must_root)] #[allow(unrooted_must_root)]
fn new_inherited(channel_count: u32, length: u32, sample_rate: f32) -> OfflineAudioContext { fn new_inherited(
channel_count: u32,
length: u32,
sample_rate: f32,
browsing_context_id: BrowsingContextId,
) -> OfflineAudioContext {
let options = ServoMediaOfflineAudioContextOptions { let options = ServoMediaOfflineAudioContextOptions {
channels: channel_count as u8, channels: channel_count as u8,
length: length as usize, length: length as usize,
sample_rate, sample_rate,
}; };
let context = let context = BaseAudioContext::new_inherited(
BaseAudioContext::new_inherited(BaseAudioContextOptions::OfflineAudioContext(options)); BaseAudioContextOptions::OfflineAudioContext(options),
browsing_context_id,
);
OfflineAudioContext { OfflineAudioContext {
context, context,
channel_count, channel_count,
@ -74,7 +82,13 @@ impl OfflineAudioContext {
{ {
return Err(Error::NotSupported); return Err(Error::NotSupported);
} }
let context = OfflineAudioContext::new_inherited(channel_count, length, sample_rate); let browsing_context_id = window.window_proxy().top_level_browsing_context_id().0;
let context = OfflineAudioContext::new_inherited(
channel_count,
length,
sample_rate,
browsing_context_id,
);
Ok(reflect_dom_object( Ok(reflect_dom_object(
Box::new(context), Box::new(context),
window, window,
@ -130,6 +144,8 @@ impl OfflineAudioContextMethods for OfflineAudioContext {
let sender = Mutex::new(sender); let sender = Mutex::new(sender);
self.context self.context
.audio_context_impl() .audio_context_impl()
.lock()
.unwrap()
.set_eos_callback(Box::new(move |buffer| { .set_eos_callback(Box::new(move |buffer| {
processed_audio_ processed_audio_
.lock() .lock()
@ -181,7 +197,14 @@ impl OfflineAudioContextMethods for OfflineAudioContext {
}) })
.unwrap(); .unwrap();
if self.context.audio_context_impl().resume().is_err() { if self
.context
.audio_context_impl()
.lock()
.unwrap()
.resume()
.is_err()
{
promise.reject_error(Error::Type("Could not start offline rendering".to_owned())); promise.reject_error(Error::Type("Could not start offline rendering".to_owned()));
} }