Bug 1441588 - P1: Update audioipc to commit 79c1622. r=rillian
authorDan Glastonbury <dan.glastonbury@gmail.com>
Sat, 03 Mar 2018 14:23:41 +1000
changeset 461451 e924345d896482a238c2b17ea285aff6454be31c
parent 461450 c672cca7633a7e4a1571a668cf3808b1834a075b
child 461452 9f87ddff4b02b89cc5530b4cb8ec767b14f4c687
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1441588
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
media/audioipc/README_MOZILLA
media/audioipc/audioipc/Cargo.toml
media/audioipc/audioipc/src/codec.rs
media/audioipc/server/Cargo.toml
media/audioipc/server/src/lib.rs
--- a/media/audioipc/README_MOZILLA
+++ b/media/audioipc/README_MOZILLA
@@ -1,8 +1,8 @@
 The source from this directory was copied from the audioipc-2
 git repository using the update.sh script.  The only changes
 made were those applied by update.sh and the addition of
 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)
--- a/media/audioipc/audioipc/Cargo.toml
+++ b/media/audioipc/audioipc/Cargo.toml
@@ -4,26 +4,26 @@ version = "0.2.1"
 authors = [
         "Matthew Gregan <kinetik@flim.org>",
         "Dan Glastonbury <dan.glastonbury@gmail.com>"
         ]
 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"
 iovec = "0.1"
 libc = "0.2"
 log = "^0.3.6"
 memmap = "0.5.2"
 scoped-tls = "0.1"
 serde = "1.*.*"
 serde_derive = "1.*.*"
 tokio-core = "0.1"
 tokio-io = "0.1"
 tokio-uds = "0.1.7"
 
 [dependencies.error-chain]
 version = "0.11.0"
-default-features = false
\ No newline at end of file
+default-features = false
--- a/media/audioipc/audioipc/src/codec.rs
+++ b/media/audioipc/audioipc/src/codec.rs
@@ -97,17 +97,17 @@ impl<In, Out> LengthDelimitedCodec<In, O
         if buf.len() < n {
             return Ok(None);
         }
 
         let buf = buf.split_to(n).freeze();
 
         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),
         }));
 
         trace!("... Decoded {:?}", msg);
         Ok(Some(msg))
     }
 }
 
@@ -165,16 +165,16 @@ where
         buf.reserve((encoded_len + 2) as usize);
 
         buf.put_u16::<LittleEndian>(encoded_len as u16);
 
         if let Err(e) =
             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)),
             }
         }
 
         Ok(())
     }
 }
--- a/media/audioipc/server/Cargo.toml
+++ b/media/audioipc/server/Cargo.toml
@@ -1,11 +1,11 @@
 [package]
 name = "audioipc-server"
-version = "0.2.1"
+version = "0.2.2"
 authors = [
         "Matthew Gregan <kinetik@flim.org>",
         "Dan Glastonbury <dan.glastonbury@gmail.com>"
         ]
 description = "Remote cubeb server"
 
 [dependencies]
 audioipc = { path = "../audioipc" }
--- a/media/audioipc/server/src/lib.rs
+++ b/media/audioipc/server/src/lib.rs
@@ -166,30 +166,30 @@ impl CubebServer {
             ServerMessage::StreamInit(ref params) => self.process_stream_init(context, params)
                 .unwrap_or_else(|_| error(cubeb::Error::error())),
 
             ServerMessage::StreamDestroy(stm_tok) => {
                 self.streams.remove(stm_tok);
                 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()
                 .map(ClientMessage::StreamPosition)
                 .unwrap_or_else(error),
 
             ServerMessage::StreamGetLatency(stm_tok) => self.streams[stm_tok]
                 .latency()