mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #19806 - ferjm:rm-gecko-media, r=nox
Remove gecko-media dependency The effort to import Gecko's media stack into Servo has been canceled, so I am removing the bits of code from gecko-media that we added to Servo. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- 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/19806) <!-- Reviewable:end -->
This commit is contained in:
commit
acdbbd51af
12 changed files with 72 additions and 252 deletions
|
@ -43,6 +43,3 @@ webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
|||
|
||||
[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios")))'.dependencies]
|
||||
gaol = {git = "https://github.com/servo/gaol"}
|
||||
|
||||
[target.'cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))'.dependencies]
|
||||
gecko-media = {git = "https://github.com/servo/gecko-media.git"}
|
||||
|
|
|
@ -108,8 +108,6 @@ use debugger;
|
|||
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
|
||||
use euclid::{Size2D, TypedSize2D, TypedScale};
|
||||
use event_loop::EventLoop;
|
||||
#[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))]
|
||||
use gecko_media::GeckoMedia;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::{Error as IpcError};
|
||||
|
@ -1483,16 +1481,6 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
|
||||
debug!("Asking compositor to complete shutdown.");
|
||||
self.compositor_proxy.send(ToCompositorMsg::ShutdownComplete);
|
||||
|
||||
#[cfg(all(
|
||||
any(target_os = "macos", target_os = "linux"),
|
||||
not(any(target_arch = "arm", target_arch = "aarch64")),
|
||||
))]
|
||||
{
|
||||
if let Err(()) = GeckoMedia::shutdown() {
|
||||
warn!("Media stack shutdown failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId) {
|
||||
|
|
|
@ -17,8 +17,6 @@ extern crate devtools_traits;
|
|||
extern crate euclid;
|
||||
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
|
||||
extern crate gaol;
|
||||
#[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))]
|
||||
extern crate gecko_media;
|
||||
extern crate gfx;
|
||||
extern crate gfx_traits;
|
||||
extern crate hyper;
|
||||
|
|
|
@ -23,9 +23,6 @@ phf_codegen = "0.7.18"
|
|||
phf_shared = "0.7.18"
|
||||
serde_json = "1.0"
|
||||
|
||||
[target.'cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))'.dependencies]
|
||||
gecko-media = {git = "https://github.com/servo/gecko-media.git"}
|
||||
|
||||
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
|
||||
tinyfiledialogs = "2.5.9"
|
||||
|
||||
|
|
|
@ -31,13 +31,10 @@ use dom::node::{window_from_node, document_from_node, Node, UnbindContext};
|
|||
use dom::promise::Promise;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
#[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))]
|
||||
use gecko_media::{CanPlayType, GeckoMedia};
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use microtask::{Microtask, MicrotaskRunnable};
|
||||
#[allow(unused_imports)]
|
||||
use mime::{Mime, SubLevel, TopLevel};
|
||||
use net_traits::{FetchResponseListener, FetchMetadata, Metadata, NetworkError};
|
||||
use net_traits::request::{CredentialsMode, Destination, RequestInit};
|
||||
|
@ -870,27 +867,6 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
|
|||
self.media_element_load_algorithm();
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
any(target_os = "macos", target_os = "linux"),
|
||||
not(any(target_arch = "arm", target_arch = "aarch64")),
|
||||
))]
|
||||
// https://html.spec.whatwg.org/multipage/#dom-navigator-canplaytype
|
||||
fn CanPlayType(&self, type_: DOMString) -> CanPlayTypeResult {
|
||||
let gecko_media = match GeckoMedia::get() {
|
||||
Ok(gecko_media) => gecko_media,
|
||||
Err(_) => return CanPlayTypeResult::_empty,
|
||||
};
|
||||
match gecko_media.can_play_type(&type_) {
|
||||
CanPlayType::No => CanPlayTypeResult::_empty,
|
||||
CanPlayType::Maybe => CanPlayTypeResult::Maybe,
|
||||
CanPlayType::Probably => CanPlayTypeResult::Probably
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(
|
||||
any(target_os = "macos", target_os = "linux"),
|
||||
not(any(target_arch = "arm", target_arch = "aarch64")),
|
||||
)))]
|
||||
// https://html.spec.whatwg.org/multipage/#dom-navigator-canplaytype
|
||||
fn CanPlayType(&self, type_: DOMString) -> CanPlayTypeResult {
|
||||
match type_.parse::<Mime>() {
|
||||
|
|
|
@ -42,9 +42,6 @@ extern crate domobject_derive;
|
|||
extern crate encoding_rs;
|
||||
extern crate euclid;
|
||||
extern crate fnv;
|
||||
#[allow(unused_extern_crates)]
|
||||
#[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))]
|
||||
extern crate gecko_media;
|
||||
extern crate gleam;
|
||||
extern crate half;
|
||||
#[macro_use] extern crate html5ever;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue