mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1746689 - Update AudioIPC macos branch to e9eac9d7. r=cubeb-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D134202
This commit is contained in:
parent
2682c30de1
commit
44a6ef81dc
@ -59,7 +59,7 @@ rev = "21c26326f5f45f415c49eac4ba5bc41a2f961321"
|
||||
[source."https://github.com/kinetiknz/audioipc-2"]
|
||||
git = "https://github.com/kinetiknz/audioipc-2"
|
||||
replace-with = "vendored-sources"
|
||||
rev = "abd4a0132ea65057b554221c8f112a9bedd33a92"
|
||||
rev = "e9eac9d7fe3ea93261f8f277cdbefd15b9418edd"
|
||||
|
||||
[source."https://github.com/jfkthame/mapped_hyph.git"]
|
||||
git = "https://github.com/jfkthame/mapped_hyph.git"
|
||||
|
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -251,7 +251,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "audioipc2"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=abd4a0132ea65057b554221c8f112a9bedd33a92#abd4a0132ea65057b554221c8f112a9bedd33a92"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=e9eac9d7fe3ea93261f8f277cdbefd15b9418edd#e9eac9d7fe3ea93261f8f277cdbefd15b9418edd"
|
||||
dependencies = [
|
||||
"ashmem",
|
||||
"audio_thread_priority",
|
||||
@ -276,7 +276,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "audioipc2-client"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=abd4a0132ea65057b554221c8f112a9bedd33a92#abd4a0132ea65057b554221c8f112a9bedd33a92"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=e9eac9d7fe3ea93261f8f277cdbefd15b9418edd#e9eac9d7fe3ea93261f8f277cdbefd15b9418edd"
|
||||
dependencies = [
|
||||
"audio_thread_priority",
|
||||
"audioipc2",
|
||||
@ -287,7 +287,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "audioipc2-server"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=abd4a0132ea65057b554221c8f112a9bedd33a92#abd4a0132ea65057b554221c8f112a9bedd33a92"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=e9eac9d7fe3ea93261f8f277cdbefd15b9418edd#e9eac9d7fe3ea93261f8f277cdbefd15b9418edd"
|
||||
dependencies = [
|
||||
"audio_thread_priority",
|
||||
"audioipc2",
|
||||
|
@ -1 +1 @@
|
||||
{"files":{"Cargo.toml":"d06fa544ba9c0f2ff3ab418b63764b3e395bf326ffef129d6952ae1ae92213f1","cbindgen.toml":"ee9642e39a46b8a7275c4b18319c7a0208ef71e04de868898cd7838b277163d8","src/lib.rs":"b74d694184c11a069a17c76c6942f62a51425b263281f3bdbbf6d690ebfc6574","src/server.rs":"c745bc7bbc1207c1cc642b8da95ff72e6e56d6ed0a3f56e755f27e9b79871e38"},"package":null}
|
||||
{"files":{"Cargo.toml":"d06fa544ba9c0f2ff3ab418b63764b3e395bf326ffef129d6952ae1ae92213f1","cbindgen.toml":"ee9642e39a46b8a7275c4b18319c7a0208ef71e04de868898cd7838b277163d8","src/lib.rs":"e81af6b9577cfb421bdef50ad097b631ae5378784d0da93694abb7e3f26bfb52","src/server.rs":"c745bc7bbc1207c1cc642b8da95ff72e6e56d6ed0a3f56e755f27e9b79871e38"},"package":null}
|
6
third_party/rust/audioipc2-server/src/lib.rs
vendored
6
third_party/rust/audioipc2-server/src/lib.rs
vendored
@ -121,16 +121,16 @@ fn init_threads(
|
||||
device_collection_name.to_string(),
|
||||
None,
|
||||
move || {
|
||||
trace!("Starting {} thread", rpc_name);
|
||||
trace!("Starting {} thread", device_collection_name);
|
||||
register_thread(thread_create_callback);
|
||||
},
|
||||
move || {
|
||||
unregister_thread(thread_destroy_callback);
|
||||
trace!("Stopping {} thread", rpc_name);
|
||||
trace!("Stopping {} thread", device_collection_name);
|
||||
},
|
||||
)
|
||||
.map_err(|e| {
|
||||
debug!("Failed to start {} thread: {:?}", rpc_name, e);
|
||||
debug!("Failed to start {} thread: {:?}", device_collection_name, e);
|
||||
e
|
||||
})?;
|
||||
|
||||
|
@ -1 +1 @@
|
||||
{"files":{"Cargo.toml":"2fdc5fd55b09266565d2f316de7ac9485a63867d76364d3d5dba5b4e4dee19c1","benches/serialization.rs":"d56855d868dab6aa22c8b03a61084535351b76c94b68d8b1d20764e352fe473f","build.rs":"3f061cf9a989f63a71c693a543d26f7003e8b643c39c23ea555110252a2c39d2","src/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/codec.rs":"b24f3dac2fa0a566883295627b5391b132e1772eddc2ff0b31e857c58f485a09","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/ipccore.rs":"ed467bb31d59bec7281eac0f47602fab2e09f985271e06c526915fcd7036d201","src/lib.rs":"69622b35ba60ee17daffb5b243c5d2c31d8359219a54c08ad9a13326a51aa3f6","src/messages.rs":"d5d0d1fa5445b76b6a10ca135ee0b24044ddcbbdbbb04f2098b6589a455184ec","src/rpccore.rs":"1e2eb4181138a4cb0207b8b52a2137dfc5639e8e758665995decaec258b69e0f","src/shm.rs":"94dee9454acfb4541b7757fd6763b8ecfe1961bb0da780caf463dc6509ba1d98","src/sys/mod.rs":"da4412ee630e53a0d3a79d9e18953280818bd58ed3fb3c6abedeeb8a092d3dfc","src/sys/unix/cmsg.rs":"97d8fe99ef94f75db9ed26cb4cf6faf9fbbc913cfa4152a8774ff4e76aead620","src/sys/unix/mod.rs":"505344820a9ab1a5d9a2ddce18e25ac17f025f2bed9a4a92e556020d8c45dcb4","src/sys/unix/msg.rs":"d29d3974c145df8b1b931222f62aa64be0ec165b578f31b8f98555fa4d052b01","src/sys/windows/mod.rs":"50af90f17d9b61045ac009e0f53077f9a645c72c214c400b116c4eca2adce0d7"},"package":null}
|
||||
{"files":{"Cargo.toml":"2fdc5fd55b09266565d2f316de7ac9485a63867d76364d3d5dba5b4e4dee19c1","benches/serialization.rs":"d56855d868dab6aa22c8b03a61084535351b76c94b68d8b1d20764e352fe473f","build.rs":"3f061cf9a989f63a71c693a543d26f7003e8b643c39c23ea555110252a2c39d2","src/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/codec.rs":"b24f3dac2fa0a566883295627b5391b132e1772eddc2ff0b31e857c58f485a09","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/ipccore.rs":"7423fc78476ccb1518de20053cb4bad34845bd1c7da6fc3b2a7658a259e91247","src/lib.rs":"69622b35ba60ee17daffb5b243c5d2c31d8359219a54c08ad9a13326a51aa3f6","src/messages.rs":"d5d0d1fa5445b76b6a10ca135ee0b24044ddcbbdbbb04f2098b6589a455184ec","src/rpccore.rs":"e6800250049690cd900b66a010541affad4b30a6f4dea168ebe807043490f916","src/shm.rs":"94dee9454acfb4541b7757fd6763b8ecfe1961bb0da780caf463dc6509ba1d98","src/sys/mod.rs":"da4412ee630e53a0d3a79d9e18953280818bd58ed3fb3c6abedeeb8a092d3dfc","src/sys/unix/cmsg.rs":"97d8fe99ef94f75db9ed26cb4cf6faf9fbbc913cfa4152a8774ff4e76aead620","src/sys/unix/mod.rs":"505344820a9ab1a5d9a2ddce18e25ac17f025f2bed9a4a92e556020d8c45dcb4","src/sys/unix/msg.rs":"d29d3974c145df8b1b931222f62aa64be0ec165b578f31b8f98555fa4d052b01","src/sys/windows/mod.rs":"50af90f17d9b61045ac009e0f53077f9a645c72c214c400b116c4eca2adce0d7"},"package":null}
|
10
third_party/rust/audioipc2/src/ipccore.rs
vendored
10
third_party/rust/audioipc2/src/ipccore.rs
vendored
@ -111,7 +111,7 @@ impl EventLoopHandle {
|
||||
}
|
||||
|
||||
// Signal EventLoop to shutdown. Causes EventLoop::poll to return Ok(false).
|
||||
pub fn shutdown(&self) -> Result<()> {
|
||||
fn shutdown(&self) -> Result<()> {
|
||||
self.requests_tx
|
||||
.send(Request::Shutdown)
|
||||
.map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))?;
|
||||
@ -813,9 +813,8 @@ mod test {
|
||||
fn dead_server() {
|
||||
init();
|
||||
let (server, _client, client_proxy) = setup();
|
||||
server.handle().shutdown().unwrap();
|
||||
// XXX: Need an explicit server drop here, otherwise the test below is racy.
|
||||
drop(server);
|
||||
|
||||
let response = client_proxy.call(TestServerMessage::TestRequest);
|
||||
response.wait().expect_err("sending on closed channel");
|
||||
}
|
||||
@ -824,7 +823,7 @@ mod test {
|
||||
fn dead_client() {
|
||||
init();
|
||||
let (_server, client, client_proxy) = setup();
|
||||
client.handle().shutdown().unwrap();
|
||||
drop(client);
|
||||
|
||||
let response = client_proxy.call(TestServerMessage::TestRequest);
|
||||
response.wait().expect_err("sending on a closed channel");
|
||||
@ -859,8 +858,7 @@ mod test {
|
||||
|
||||
start_rx.recv().expect("after_start callback done");
|
||||
|
||||
// Explicit shutdown.
|
||||
elt.handle().shutdown().expect("shutdown");
|
||||
drop(elt);
|
||||
|
||||
stop_rx.recv().expect("before_stop callback done");
|
||||
}
|
||||
|
11
third_party/rust/audioipc2/src/rpccore.rs
vendored
11
third_party/rust/audioipc2/src/rpccore.rs
vendored
@ -4,6 +4,7 @@
|
||||
// accompanying file LICENSE for details
|
||||
|
||||
use std::io::{self, Result};
|
||||
use std::mem::ManuallyDrop;
|
||||
use std::{collections::VecDeque, sync::mpsc};
|
||||
|
||||
use mio::Token;
|
||||
@ -71,7 +72,7 @@ impl<Response> ProxyResponse<Response> {
|
||||
#[derive(Debug)]
|
||||
pub struct Proxy<Request, Response> {
|
||||
handle: Option<(EventLoopHandle, Token)>,
|
||||
tx: mpsc::Sender<ProxyRequest<Request, Response>>,
|
||||
tx: ManuallyDrop<mpsc::Sender<ProxyRequest<Request, Response>>>,
|
||||
}
|
||||
|
||||
impl<Request, Response> Proxy<Request, Response> {
|
||||
@ -109,6 +110,9 @@ impl<Request, Response> Clone for Proxy<Request, Response> {
|
||||
impl<Request, Response> Drop for Proxy<Request, Response> {
|
||||
fn drop(&mut self) {
|
||||
trace!("Proxy drop, waking EventLoop");
|
||||
// Must drop Sender before waking the connection, otherwise
|
||||
// the wake may be processed before Sender is closed.
|
||||
unsafe { ManuallyDrop::drop(&mut self.tx) }
|
||||
self.wake_connection();
|
||||
}
|
||||
}
|
||||
@ -180,7 +184,10 @@ pub(crate) fn make_client<C: Client>(
|
||||
// type system noticing.
|
||||
#[allow(clippy::redundant_clone)]
|
||||
let tx = tx.clone();
|
||||
let proxy = Proxy { handle: None, tx };
|
||||
let proxy = Proxy {
|
||||
handle: None,
|
||||
tx: ManuallyDrop::new(tx),
|
||||
};
|
||||
|
||||
(handler, proxy)
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ audioipc-server = { git = "https://github.com/mozilla/audioipc-2", rev = "515bb2
|
||||
|
||||
# https://github.com/kinetiknz/audioipc-2/commits/macos
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
audioipc2-client = { git = "https://github.com/kinetiknz/audioipc-2", rev = "abd4a0132ea65057b554221c8f112a9bedd33a92", optional = true }
|
||||
audioipc2-server = { git = "https://github.com/kinetiknz/audioipc-2", rev = "abd4a0132ea65057b554221c8f112a9bedd33a92", optional = true }
|
||||
audioipc2-client = { git = "https://github.com/kinetiknz/audioipc-2", rev = "e9eac9d7fe3ea93261f8f277cdbefd15b9418edd", optional = true }
|
||||
audioipc2-server = { git = "https://github.com/kinetiknz/audioipc-2", rev = "e9eac9d7fe3ea93261f8f277cdbefd15b9418edd", optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
Loading…
Reference in New Issue
Block a user