зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1748515 - Update AudioIPC macOS branch to 978b4082. r=cubeb-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D135080
This commit is contained in:
Родитель
963950be54
Коммит
7a125de74c
|
@ -64,7 +64,7 @@ rev = "21c26326f5f45f415c49eac4ba5bc41a2f961321"
|
|||
[source."https://github.com/kinetiknz/audioipc-2"]
|
||||
git = "https://github.com/kinetiknz/audioipc-2"
|
||||
replace-with = "vendored-sources"
|
||||
rev = "49e4ba52ba911aa9c6a499f30e849de2a972ec82"
|
||||
rev = "978b4082bdc7d8e1aa58dd49e45cdc81beacb333"
|
||||
|
||||
[source."https://github.com/jfkthame/mapped_hyph.git"]
|
||||
git = "https://github.com/jfkthame/mapped_hyph.git"
|
||||
|
|
|
@ -267,7 +267,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "audioipc2"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=49e4ba52ba911aa9c6a499f30e849de2a972ec82#49e4ba52ba911aa9c6a499f30e849de2a972ec82"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=978b4082bdc7d8e1aa58dd49e45cdc81beacb333#978b4082bdc7d8e1aa58dd49e45cdc81beacb333"
|
||||
dependencies = [
|
||||
"ashmem",
|
||||
"audio_thread_priority",
|
||||
|
@ -292,7 +292,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "audioipc2-client"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=49e4ba52ba911aa9c6a499f30e849de2a972ec82#49e4ba52ba911aa9c6a499f30e849de2a972ec82"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=978b4082bdc7d8e1aa58dd49e45cdc81beacb333#978b4082bdc7d8e1aa58dd49e45cdc81beacb333"
|
||||
dependencies = [
|
||||
"audio_thread_priority",
|
||||
"audioipc2",
|
||||
|
@ -303,7 +303,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "audioipc2-server"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=49e4ba52ba911aa9c6a499f30e849de2a972ec82#49e4ba52ba911aa9c6a499f30e849de2a972ec82"
|
||||
source = "git+https://github.com/kinetiknz/audioipc-2?rev=978b4082bdc7d8e1aa58dd49e45cdc81beacb333#978b4082bdc7d8e1aa58dd49e45cdc81beacb333"
|
||||
dependencies = [
|
||||
"audio_thread_priority",
|
||||
"audioipc2",
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"files":{"Cargo.toml":"d12aaf7e88bb704890b9401de55775c9e746be92448c6f280c1cb8e37e2e773f","benches/serialization.rs":"d56855d868dab6aa22c8b03a61084535351b76c94b68d8b1d20764e352fe473f","build.rs":"3f061cf9a989f63a71c693a543d26f7003e8b643c39c23ea555110252a2c39d2","src/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/codec.rs":"b24f3dac2fa0a566883295627b5391b132e1772eddc2ff0b31e857c58f485a09","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/ipccore.rs":"474271f867809b1f4058e52595e0268b2818bb8d56d116c46e711b181d32ac23","src/lib.rs":"69622b35ba60ee17daffb5b243c5d2c31d8359219a54c08ad9a13326a51aa3f6","src/messages.rs":"d78247a1c2d5de1d799df100baaeebf6e1b6daba95ef6058fd90387f82526f80","src/rpccore.rs":"e6800250049690cd900b66a010541affad4b30a6f4dea168ebe807043490f916","src/shm.rs":"748c4a261e298900ee0266acf42e4e9f72594d9b90f530c71d8d4f1d659a6de0","src/sys/mod.rs":"da4412ee630e53a0d3a79d9e18953280818bd58ed3fb3c6abedeeb8a092d3dfc","src/sys/unix/cmsg.rs":"71a51a5cd6fd54054f500af82a76b19a690258767ac7b68c6c35cc9d962d5629","src/sys/unix/mod.rs":"246e83874d9765f6db88ea8bc3511b8d1ce4557744f4415ad41de135f6b9baff","src/sys/unix/msg.rs":"d29d3974c145df8b1b931222f62aa64be0ec165b578f31b8f98555fa4d052b01","src/sys/windows/mod.rs":"50af90f17d9b61045ac009e0f53077f9a645c72c214c400b116c4eca2adce0d7"},"package":null}
|
||||
{"files":{"Cargo.toml":"d12aaf7e88bb704890b9401de55775c9e746be92448c6f280c1cb8e37e2e773f","benches/serialization.rs":"d56855d868dab6aa22c8b03a61084535351b76c94b68d8b1d20764e352fe473f","build.rs":"3f061cf9a989f63a71c693a543d26f7003e8b643c39c23ea555110252a2c39d2","src/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/codec.rs":"b24f3dac2fa0a566883295627b5391b132e1772eddc2ff0b31e857c58f485a09","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/ipccore.rs":"f92de4b5621ad4be02d2c3dd9f95501a368f1644e0b24b6a93d1267afde8c15f","src/lib.rs":"69622b35ba60ee17daffb5b243c5d2c31d8359219a54c08ad9a13326a51aa3f6","src/messages.rs":"d78247a1c2d5de1d799df100baaeebf6e1b6daba95ef6058fd90387f82526f80","src/rpccore.rs":"e6800250049690cd900b66a010541affad4b30a6f4dea168ebe807043490f916","src/shm.rs":"748c4a261e298900ee0266acf42e4e9f72594d9b90f530c71d8d4f1d659a6de0","src/sys/mod.rs":"da4412ee630e53a0d3a79d9e18953280818bd58ed3fb3c6abedeeb8a092d3dfc","src/sys/unix/cmsg.rs":"71a51a5cd6fd54054f500af82a76b19a690258767ac7b68c6c35cc9d962d5629","src/sys/unix/mod.rs":"246e83874d9765f6db88ea8bc3511b8d1ce4557744f4415ad41de135f6b9baff","src/sys/unix/msg.rs":"d29d3974c145df8b1b931222f62aa64be0ec165b578f31b8f98555fa4d052b01","src/sys/windows/mod.rs":"50af90f17d9b61045ac009e0f53077f9a645c72c214c400b116c4eca2adce0d7"},"package":null}
|
|
@ -356,28 +356,51 @@ impl Connection {
|
|||
// Connections are always interested in READABLE. clear_readable is only
|
||||
// called when the connection is in the process of shutting down.
|
||||
fn clear_readable(&mut self, registry: &Registry) -> Result<()> {
|
||||
self.interest.and_then(|i| i.remove(Interest::READABLE));
|
||||
self.update_registration(registry)
|
||||
self.update_registration(
|
||||
registry,
|
||||
self.interest.and_then(|i| i.remove(Interest::READABLE)),
|
||||
)
|
||||
}
|
||||
|
||||
// Connections toggle WRITABLE based on the state of the `outbound` buffer.
|
||||
fn set_writable(&mut self, registry: &Registry) -> Result<()> {
|
||||
self.interest
|
||||
.map_or_else(|| Interest::WRITABLE, |i| i.add(Interest::WRITABLE));
|
||||
self.update_registration(registry)
|
||||
self.update_registration(
|
||||
registry,
|
||||
Some(
|
||||
self.interest
|
||||
.map_or_else(|| Interest::WRITABLE, |i| i.add(Interest::WRITABLE)),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
fn clear_writable(&mut self, registry: &Registry) -> Result<()> {
|
||||
self.interest.and_then(|i| i.remove(Interest::WRITABLE));
|
||||
self.update_registration(registry)
|
||||
self.update_registration(
|
||||
registry,
|
||||
self.interest.and_then(|i| i.remove(Interest::WRITABLE)),
|
||||
)
|
||||
}
|
||||
|
||||
// Update connection registration with the current readiness event interests.
|
||||
fn update_registration(&mut self, registry: &Registry) -> Result<()> {
|
||||
if let Some(interest) = self.interest {
|
||||
registry.reregister(&mut self.io, self.token, interest)?;
|
||||
} else {
|
||||
registry.deregister(&mut self.io)?;
|
||||
fn update_registration(
|
||||
&mut self,
|
||||
registry: &Registry,
|
||||
new_interest: Option<Interest>,
|
||||
) -> Result<()> {
|
||||
// Note: Updating registration always triggers a writable event with NamedPipes, so
|
||||
// it's important to skip updating registration when the set of interests hasn't changed.
|
||||
if new_interest != self.interest {
|
||||
trace!(
|
||||
"{:?}: updating readiness registration old={:?} new={:?}",
|
||||
self.token,
|
||||
self.interest,
|
||||
new_interest
|
||||
);
|
||||
self.interest = new_interest;
|
||||
if let Some(interest) = self.interest {
|
||||
registry.reregister(&mut self.io, self.token, interest)?;
|
||||
} else {
|
||||
registry.deregister(&mut self.io)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -405,8 +428,7 @@ impl Connection {
|
|||
self.outbound.is_empty()
|
||||
);
|
||||
let done = done && self.outbound.is_empty();
|
||||
// If driver is done, stop reading. We may have more outbound to flush.
|
||||
// XXX: This used to happen for recv done, now checks outbound too.
|
||||
// If driver is done and outbound is clear, unregister connection.
|
||||
if done {
|
||||
trace!("{:?}: driver done, clearing read interest", self.token);
|
||||
self.clear_readable(registry)?;
|
||||
|
@ -500,7 +522,11 @@ impl Connection {
|
|||
trace!("{:?}: send bytes: {}", self.token, n);
|
||||
}
|
||||
Err(ref e) if would_block(e) => {
|
||||
trace!("{:?}: send would_block: {:?}", self.token, e);
|
||||
trace!(
|
||||
"{:?}: send would_block: {:?}, setting write interest",
|
||||
self.token,
|
||||
e
|
||||
);
|
||||
// Register for write events.
|
||||
self.set_writable(registry)?;
|
||||
break;
|
||||
|
@ -517,9 +543,6 @@ impl Connection {
|
|||
trace!("{:?}: post-send: outbound {:?}", self.token, self.outbound);
|
||||
}
|
||||
// Outbound buffer flushed, clear registration for WRITABLE.
|
||||
// Note that Windows NamedPipes will cause an additional WRITABLE notification after a write, even if
|
||||
// we're no longer registered for WRITABLE. Any user of Poll is expected to handle spurious events,
|
||||
// so this is fine.
|
||||
if self.outbound.is_empty() {
|
||||
trace!("{:?}: outbound empty, clearing write interest", self.token);
|
||||
self.clear_writable(registry)?;
|
||||
|
|
|
@ -22,8 +22,8 @@ webrender_bindings = { path = "../../../../gfx/webrender_bindings" }
|
|||
cubeb-coreaudio = { git = "https://github.com/mozilla/cubeb-coreaudio-rs", rev = "dea28d0c7d9952bbf430701ee244f6a4349c98f1", optional = true }
|
||||
cubeb-pulse = { git = "https://github.com/mozilla/cubeb-pulse-rs", rev="f2456201dbfdc467b80f0ff6bbb1b8a6faf7df02", optional = true, features=["pulse-dlopen"] }
|
||||
cubeb-sys = { version = "0.9", optional = true, features=["gecko-in-tree"] }
|
||||
audioipc2-client = { git = "https://github.com/kinetiknz/audioipc-2", rev = "49e4ba52ba911aa9c6a499f30e849de2a972ec82", optional = true } # macos (v2) branch
|
||||
audioipc2-server = { git = "https://github.com/kinetiknz/audioipc-2", rev = "49e4ba52ba911aa9c6a499f30e849de2a972ec82", optional = true } # macos (v2) branch
|
||||
audioipc2-client = { git = "https://github.com/kinetiknz/audioipc-2", rev = "978b4082bdc7d8e1aa58dd49e45cdc81beacb333", optional = true } # macos (v2) branch
|
||||
audioipc2-server = { git = "https://github.com/kinetiknz/audioipc-2", rev = "978b4082bdc7d8e1aa58dd49e45cdc81beacb333", optional = true } # macos (v2) branch
|
||||
audioipc-client = { git = "https://github.com/mozilla/audioipc-2", rev = "515bb210a93f520642fd3a60f391652680b3e988", optional = true }
|
||||
audioipc-server = { git = "https://github.com/mozilla/audioipc-2", rev = "515bb210a93f520642fd3a60f391652680b3e988", optional = true }
|
||||
encoding_glue = { path = "../../../../intl/encoding_glue" }
|
||||
|
|
Загрузка…
Ссылка в новой задаче