Bug 1441588 - P1: Update audioipc to commit 79c1622. r=rillian

Pull in changes
- Fix handling of Result<> to error code.
- Update bincode to match WebRender version.

MozReview-Commit-ID: LSXMocqwJ6R

--HG--
extra : rebase_source : e15be0c36b9a75c1e7dc0c3906d071da8a846aff
This commit is contained in:
Dan Glastonbury 2018-03-03 14:23:41 +10:00
parent c2cf44b1d5
commit 7ec980ee2f
5 changed files with 18 additions and 18 deletions

View File

@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
The audioipc-2 git repository is: https://github.com/djg/audioipc-2.git
The git commit ID used was 933fb48b252a10569ba8d598541577c6f2dc308f (2018-02-21 17:13:04 +1000)
The git commit ID used was 79c1622259b03ef58744da5e6501f95be81272cb (2018-03-03 08:55:52 +1000)

View File

@ -9,7 +9,7 @@ description = "Remote Cubeb IPC"
[dependencies]
cubeb = "0.4"
bincode = "0.8"
bincode = "0.9"
bytes = "0.4"
# rayon-core in Gecko uses futures 0.1.13
futures = "=0.1.13"
@ -26,4 +26,4 @@ tokio-uds = "0.1.7"
[dependencies.error-chain]
version = "0.11.0"
default-features = false
default-features = false

View File

@ -102,7 +102,7 @@ impl<In, Out> LengthDelimitedCodec<In, Out> {
trace!("Attempting to decode");
let msg = try!(deserialize::<Out>(buf.as_ref()).map_err(|e| match *e {
bincode::ErrorKind::IoError(e) => e,
bincode::ErrorKind::Io(e) => e,
_ => io::Error::new(io::ErrorKind::Other, *e),
}));
@ -170,7 +170,7 @@ where
serialize_into::<_, Self::In, _>(&mut buf.writer(), &item, Bounded(encoded_len))
{
match *e {
bincode::ErrorKind::IoError(e) => return Err(e),
bincode::ErrorKind::Io(e) => return Err(e),
_ => return Err(io::Error::new(io::ErrorKind::Other, *e)),
}
}

View File

@ -1,6 +1,6 @@
[package]
name = "audioipc-server"
version = "0.2.1"
version = "0.2.2"
authors = [
"Matthew Gregan <kinetik@flim.org>",
"Dan Glastonbury <dan.glastonbury@gmail.com>"

View File

@ -171,20 +171,20 @@ impl CubebServer {
ClientMessage::StreamDestroyed
}
ServerMessage::StreamStart(stm_tok) => {
let _ = self.streams[stm_tok].start();
ClientMessage::StreamStarted
}
ServerMessage::StreamStart(stm_tok) => self.streams[stm_tok]
.start()
.map(|_| ClientMessage::StreamStarted)
.unwrap_or_else(error),
ServerMessage::StreamStop(stm_tok) => {
let _ = self.streams[stm_tok].stop();
ClientMessage::StreamStopped
}
ServerMessage::StreamStop(stm_tok) => self.streams[stm_tok]
.stop()
.map(|_| ClientMessage::StreamStopped)
.unwrap_or_else(error),
ServerMessage::StreamResetDefaultDevice(stm_tok) => {
let _ = self.streams[stm_tok].reset_default_device();
ClientMessage::StreamDefaultDeviceReset
}
ServerMessage::StreamResetDefaultDevice(stm_tok) => self.streams[stm_tok]
.reset_default_device()
.map(|_| ClientMessage::StreamDefaultDeviceReset)
.unwrap_or_else(error),
ServerMessage::StreamGetPosition(stm_tok) => self.streams[stm_tok]
.position()