mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-25 08:40:10 -07:00
285 lines
11 KiB
Diff
285 lines
11 KiB
Diff
Dylan Araps <dylan.araps@gmail.com>
|
|
|
|
Firefox 69 - Disable mandatory dependency on dbus.
|
|
|
|
Firefox has historically allowed the disablement of dbus through
|
|
the '--disable-dbus' mozconfig option, in 69.0 this option is broken.
|
|
|
|
The new feature to prioritize audio threads requires dbus to function
|
|
and the build will fail when dbus isn't installed on the host machine.
|
|
|
|
This patch disables 'audio_thread_priority' which in effect disables
|
|
the dbus dependency.
|
|
|
|
diff --git a/Cargo.lock b/Cargo.lock
|
|
index 9aef82c139..8f2400e746 100644
|
|
--- a/Cargo.lock
|
|
+++ b/Cargo.lock
|
|
@@ -76,19 +76,6 @@ dependencies = [
|
|
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
|
]
|
|
|
|
-[[package]]
|
|
-name = "audio_thread_priority"
|
|
-version = "0.15.0"
|
|
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
-dependencies = [
|
|
- "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
- "dbus 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
- "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
- "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
- "mach 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
- "winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
|
|
-]
|
|
-
|
|
[[package]]
|
|
name = "audioipc"
|
|
version = "0.2.4"
|
|
@@ -117,7 +104,6 @@ dependencies = [
|
|
name = "audioipc-client"
|
|
version = "0.4.0"
|
|
dependencies = [
|
|
- "audio_thread_priority 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
"audioipc 0.2.4",
|
|
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
"cubeb-backend 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
@@ -135,7 +121,6 @@ dependencies = [
|
|
name = "audioipc-server"
|
|
version = "0.2.3"
|
|
dependencies = [
|
|
- "audio_thread_priority 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
"audioipc 0.2.4",
|
|
"bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
"cubeb-core 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
@@ -1242,7 +1227,6 @@ name = "gkrust-shared"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
- "audio_thread_priority 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
"audioipc-client 0.4.0",
|
|
"audioipc-server 0.2.3",
|
|
"authenticator 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
@@ -3845,7 +3829,6 @@ dependencies = [
|
|
"checksum arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2f0ef4a9820019a0c91d918918c93dc71d469f581a49b47ddc1d285d4270bbe2"
|
|
"checksum atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"
|
|
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
|
|
-"checksum audio_thread_priority 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "047460864ea9f62fbdfb80fc04a2e5d844aef9e50727e6e9730ca58d9f1a9267"
|
|
"checksum authenticator 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ec149e5d5d4caa2c9ead53a8ce1ea9c4204c388c65bf3b96c2d1dc0fcf4aeb66"
|
|
"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799"
|
|
"checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a"
|
|
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
|
|
index 659d4f94f6..9fe6583fb2 100644
|
|
--- a/dom/ipc/ContentChild.cpp
|
|
+++ b/dom/ipc/ContentChild.cpp
|
|
@@ -104,7 +104,6 @@
|
|
#include "nsIStringBundle.h"
|
|
#include "nsIWorkerDebuggerManager.h"
|
|
#include "nsGeolocation.h"
|
|
-#include "audio_thread_priority.h"
|
|
|
|
#if !defined(XP_WIN)
|
|
# include "mozilla/Omnijar.h"
|
|
diff --git a/dom/media/GraphRunner.cpp b/dom/media/GraphRunner.cpp
|
|
index f764623737..73811c0f8c 100644
|
|
--- a/dom/media/GraphRunner.cpp
|
|
+++ b/dom/media/GraphRunner.cpp
|
|
@@ -13,7 +13,6 @@
|
|
#include "nsISupportsImpl.h"
|
|
#include "prthread.h"
|
|
#include "Tracing.h"
|
|
-#include "audio_thread_priority.h"
|
|
|
|
namespace mozilla {
|
|
|
|
@@ -93,9 +92,6 @@ bool GraphRunner::OneIteration(GraphTime aStateEnd) {
|
|
void GraphRunner::Run() {
|
|
PR_SetCurrentThreadName("GraphRunner");
|
|
|
|
- atp_handle* handle =
|
|
- atp_promote_current_thread_to_real_time(0, mGraph->GraphRate());
|
|
-
|
|
MonitorAutoLock lock(mMonitor);
|
|
while (true) {
|
|
while (mThreadState == ThreadState::Wait) {
|
|
@@ -111,10 +107,6 @@ void GraphRunner::Run() {
|
|
mMonitor.Notify();
|
|
}
|
|
|
|
- if (handle) {
|
|
- atp_demote_current_thread_from_real_time(handle);
|
|
- }
|
|
-
|
|
dom::WorkletThread::DeleteCycleCollectedJSContext();
|
|
}
|
|
|
|
diff --git a/dom/media/moz.build b/dom/media/moz.build
|
|
index 8f89e7b940..524bb3a4de 100644
|
|
--- a/dom/media/moz.build
|
|
+++ b/dom/media/moz.build
|
|
@@ -89,7 +89,6 @@ XPIDL_SOURCES += [
|
|
XPIDL_MODULE = 'dom_media'
|
|
|
|
EXPORTS += [
|
|
- '../../third_party/rust/audio_thread_priority/audio_thread_priority.h',
|
|
'ADTSDecoder.h',
|
|
'ADTSDemuxer.h',
|
|
'AsyncLogger.h',
|
|
diff --git a/media/audioipc/client/Cargo.toml b/media/audioipc/client/Cargo.toml
|
|
index 90fa464f2a..60039f3117 100644
|
|
--- a/media/audioipc/client/Cargo.toml
|
|
+++ b/media/audioipc/client/Cargo.toml
|
|
@@ -17,6 +17,5 @@ libc = "0.2"
|
|
log = "0.4"
|
|
tokio-core = "0.1"
|
|
tokio-uds = "0.1.7"
|
|
-audio_thread_priority = "0.15.0"
|
|
lazy_static = "1.2.0"
|
|
cfg-if = "0.1.0"
|
|
diff --git a/media/audioipc/client/src/context.rs b/media/audioipc/client/src/context.rs
|
|
index 6c959d4fac..e04a28e890 100644
|
|
--- a/media/audioipc/client/src/context.rs
|
|
+++ b/media/audioipc/client/src/context.rs
|
|
@@ -4,7 +4,6 @@
|
|
// accompanying file LICENSE for details
|
|
|
|
use assert_not_in_callback;
|
|
-use audio_thread_priority::promote_current_thread_to_real_time;
|
|
use audioipc::codec::LengthDelimitedCodec;
|
|
use audioipc::platformhandle_passing::{framed_with_platformhandles, FramedWithPlatformHandles};
|
|
use audioipc::{core, rpc};
|
|
@@ -86,14 +85,6 @@ fn open_server_stream() -> Result<audioipc::MessageStream> {
|
|
}
|
|
|
|
fn register_thread(callback: Option<extern "C" fn(*const ::std::os::raw::c_char)>) {
|
|
- match promote_current_thread_to_real_time(0, 48000) {
|
|
- Ok(_) => {
|
|
- info!("Audio thread promoted to real-time.");
|
|
- }
|
|
- Err(_) => {
|
|
- warn!("Could not promote thread to real-time.");
|
|
- }
|
|
- }
|
|
if let Some(func) = callback {
|
|
let thr = thread::current();
|
|
let name = CString::new(thr.name().unwrap()).unwrap();
|
|
diff --git a/media/audioipc/client/src/lib.rs b/media/audioipc/client/src/lib.rs
|
|
index 302ca87a91..9b30a2643e 100644
|
|
--- a/media/audioipc/client/src/lib.rs
|
|
+++ b/media/audioipc/client/src/lib.rs
|
|
@@ -14,7 +14,6 @@ extern crate libc;
|
|
extern crate log;
|
|
extern crate tokio_core;
|
|
extern crate tokio_uds;
|
|
-extern crate audio_thread_priority;
|
|
#[macro_use]
|
|
extern crate lazy_static;
|
|
#[macro_use]
|
|
@@ -32,13 +31,11 @@ use std::os::raw::{c_char, c_int};
|
|
use stream::ClientStream;
|
|
use std::sync::{Mutex};
|
|
use futures_cpupool::CpuPool;
|
|
-use audio_thread_priority::RtPriorityHandle;
|
|
cfg_if! {
|
|
if #[cfg(target_os = "linux")] {
|
|
use std::sync::{Arc, Condvar};
|
|
use std::ffi::CString;
|
|
use std::thread;
|
|
- use audio_thread_priority::promote_current_thread_to_real_time;
|
|
}
|
|
}
|
|
|
|
@@ -46,7 +43,6 @@ type InitParamsTls = std::cell::RefCell<Option<CpuPoolInitParams>>;
|
|
|
|
thread_local!(static IN_CALLBACK: std::cell::RefCell<bool> = std::cell::RefCell::new(false));
|
|
thread_local!(static CPUPOOL_INIT_PARAMS: InitParamsTls = std::cell::RefCell::new(None));
|
|
-thread_local!(static G_PRIORITY_HANDLES: std::cell::RefCell<Vec<RtPriorityHandle>> = std::cell::RefCell::new(vec![]));
|
|
|
|
lazy_static! {
|
|
static ref G_THREAD_POOL: Mutex<Option<CpuPool>> = Mutex::new(None);
|
|
@@ -119,16 +115,6 @@ cfg_if! {
|
|
|
|
let register_thread = move || {
|
|
if let Some(func) = thread_create_callback {
|
|
- match promote_current_thread_to_real_time(0, 48000) {
|
|
- Ok(handle) => {
|
|
- G_PRIORITY_HANDLES.with(|handles| {
|
|
- (handles.borrow_mut()).push(handle);
|
|
- });
|
|
- }
|
|
- Err(_) => {
|
|
- warn!("Could not promote audio threads to real-time during initialization.");
|
|
- }
|
|
- }
|
|
let thr = thread::current();
|
|
let name = CString::new(thr.name().unwrap()).unwrap();
|
|
func(name.as_ptr());
|
|
diff --git a/media/audioipc/server/Cargo.toml b/media/audioipc/server/Cargo.toml
|
|
index 8daa952823..62b6d838ea 100644
|
|
--- a/media/audioipc/server/Cargo.toml
|
|
+++ b/media/audioipc/server/Cargo.toml
|
|
@@ -18,7 +18,6 @@ slab = "0.3.0"
|
|
futures = "0.1.18"
|
|
tokio-core = "0.1"
|
|
tokio-uds = "0.1.7"
|
|
-audio_thread_priority = "0.15.0"
|
|
|
|
[dependencies.error-chain]
|
|
version = "0.11.0"
|
|
diff --git a/media/audioipc/server/src/lib.rs b/media/audioipc/server/src/lib.rs
|
|
index eff54e6bb6..df1a6a3396 100644
|
|
--- a/media/audioipc/server/src/lib.rs
|
|
+++ b/media/audioipc/server/src/lib.rs
|
|
@@ -18,7 +18,6 @@ extern crate libc;
|
|
extern crate slab;
|
|
extern crate tokio_core;
|
|
extern crate tokio_uds;
|
|
-extern crate audio_thread_priority;
|
|
|
|
use audioipc::core;
|
|
use audioipc::platformhandle_passing::framed_with_platformhandles;
|
|
@@ -29,7 +28,6 @@ use futures::Future;
|
|
use std::error::Error;
|
|
use std::os::raw::c_void;
|
|
use std::ptr;
|
|
-use audio_thread_priority::promote_current_thread_to_real_time;
|
|
|
|
mod server;
|
|
|
|
@@ -59,12 +57,6 @@ fn run() -> Result<ServerWrapper> {
|
|
|
|
let callback_thread = try!(
|
|
core::spawn_thread("AudioIPC Callback RPC", || {
|
|
- match promote_current_thread_to_real_time(0, 48000) {
|
|
- Ok(_) => { }
|
|
- Err(_) => {
|
|
- debug!("Failed to promote audio callback thread to real-time.");
|
|
- }
|
|
- }
|
|
trace!("Starting up cubeb audio callback event loop thread...");
|
|
Ok(())
|
|
}).or_else(|e| {
|
|
diff --git a/toolkit/library/rust/shared/Cargo.toml b/toolkit/library/rust/shared/Cargo.toml
|
|
index c659552cdc..71b9d64942 100644
|
|
--- a/toolkit/library/rust/shared/Cargo.toml
|
|
+++ b/toolkit/library/rust/shared/Cargo.toml
|
|
@@ -39,7 +39,6 @@ bitsdownload = { path = "../../../components/bitsdownload", optional = true }
|
|
storage = { path = "../../../../storage/rust" }
|
|
bookmark_sync = { path = "../../../components/places/bookmark_sync", optional = true }
|
|
shift_or_euc_c = "0.1.0"
|
|
-audio_thread_priority = "0.15.0"
|
|
|
|
[build-dependencies]
|
|
rustc_version = "0.2"
|
|
diff --git a/toolkit/library/rust/shared/lib.rs b/toolkit/library/rust/shared/lib.rs
|
|
index c5ff9e10dc..a648c7ea13 100644
|
|
--- a/toolkit/library/rust/shared/lib.rs
|
|
+++ b/toolkit/library/rust/shared/lib.rs
|
|
@@ -48,8 +48,6 @@ extern crate shift_or_euc_c;
|
|
|
|
extern crate arrayvec;
|
|
|
|
-extern crate audio_thread_priority;
|
|
-
|
|
use std::boxed::Box;
|
|
use std::env;
|
|
use std::ffi::{CStr, CString};
|