Bug 1670917 - Update audioipc to revision c474b0b. r=cubeb-reviewers,chunmin

Differential Revision: https://phabricator.services.mozilla.com/D93364
This commit is contained in:
Paul Adenot 2020-10-20 20:03:24 +00:00
parent 0ddc112415
commit 7327dec1f6
7 changed files with 19 additions and 5 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 56be0bfc252096818ea8e1bd8cff1de315a623df (2020-07-16 21:58:48 +1200)
The git commit ID used was c474b0b78f49b86531bf09f4c0e4af2e16cf15a9 (2020-10-08 15:13:49 +1300)

View File

@ -11,7 +11,7 @@ edition = "2018"
[dependencies]
bincode = "1"
bytes = "0.4"
cubeb = "0.7"
cubeb = "0.8"
futures = "0.1.29"
log = "0.4"
memmap = "0.7"

View File

@ -208,6 +208,7 @@ pub enum ServerMessage {
StreamGetLatency(usize),
StreamGetInputLatency(usize),
StreamSetVolume(usize, f32),
StreamSetName(usize, CString),
StreamGetCurrentDevice(usize),
StreamRegisterDeviceChangeCallback(usize, bool),
@ -240,6 +241,7 @@ pub enum ClientMessage {
StreamLatency(u32),
StreamInputLatency(u32),
StreamVolumeSet,
StreamNameSet,
StreamCurrentDevice(Device),
StreamRegisterDeviceChangeCallback,

View File

@ -11,7 +11,7 @@ edition = "2018"
[dependencies]
audio_thread_priority = "0.23.4"
audioipc = { path="../audioipc" }
cubeb-backend = "0.7"
cubeb-backend = "0.8"
futures = { version="0.1.18", default-features=false, features=["use_std"] }
futures-cpupool = { version="0.1.8", default-features=false }
log = "0.4"

View File

@ -13,7 +13,7 @@ use audioipc::shm::{SharedMemMutSlice, SharedMemSlice};
use cubeb_backend::{ffi, DeviceRef, Error, Result, Stream, StreamOps};
use futures::Future;
use futures_cpupool::{CpuFuture, CpuPool};
use std::ffi::CString;
use std::ffi::{CStr, CString};
use std::os::raw::c_void;
use std::ptr;
use std::sync::mpsc;
@ -298,6 +298,12 @@ impl<'ctx> StreamOps for ClientStream<'ctx> {
send_recv!(rpc, StreamSetVolume(self.token, volume) => StreamVolumeSet)
}
fn set_name(&mut self, name: &CStr) -> Result<()> {
assert_not_in_callback();
let rpc = self.context.rpc();
send_recv!(rpc, StreamSetName(self.token, name.to_owned()) => StreamNameSet)
}
fn current_device(&mut self) -> Result<&DeviceRef> {
assert_not_in_callback();
let rpc = self.context.rpc();

View File

@ -11,7 +11,7 @@ edition = "2018"
[dependencies]
audio_thread_priority = "0.23.4"
audioipc = { path = "../audioipc" }
cubeb-core = "0.7.0"
cubeb-core = "0.8.0"
futures = "0.1.29"
once_cell = "1.2.0"
log = "0.4"

View File

@ -556,6 +556,12 @@ impl CubebServer {
.map(|_| ClientMessage::StreamVolumeSet)
.unwrap_or_else(error),
ServerMessage::StreamSetName(stm_tok, ref name) => try_stream!(self, stm_tok)
.stream
.set_name(name)
.map(|_| ClientMessage::StreamNameSet)
.unwrap_or_else(error),
ServerMessage::StreamGetCurrentDevice(stm_tok) => try_stream!(self, stm_tok)
.stream
.current_device()