Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
720 changes: 317 additions & 403 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"

[patch.crates-io]
# make receive flows close on connection close: https://github.com/n0-computer/iroh-roq/pull/4
iroh-roq = { git = "https://github.com/n0-computer/iroh-roq.git", branch = "fix/close-flows" }
iroh-roq = { git = "https://github.com/arcinston/iroh-roq.git", branch = "main" }

# fix android device names: https://github.com/RustAudio/cpal/pull/959
cpal = { git = "https://github.com/Frando/cpal.git", branch = "feat/android-device-name" }
Expand Down
4 changes: 2 additions & 2 deletions callme-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ license = false
eula = false

[dependencies]
anyhow = "1.0.96"
anyhow = "1.0.98"
clap = { version = "4.5.31", features = ["derive"] }
callme = { version = "0.1.0", path = "../callme", default-features = false }
tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread", "rt"] }
tracing = "0.1.41"
tracing-subscriber = "0.3.19"
iroh = { version = "0.33.0", default-features = false }
iroh = { version = "0.35.0", default-features = false }
dialoguer = "0.11.0"
n0-future = "0.1.2"

Expand Down
3 changes: 1 addition & 2 deletions callme-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ async fn main() -> anyhow::Result<()> {
let proto = RtcProtocol::new(endpoint.clone());
let _router = Router::builder(endpoint.clone())
.accept(RtcProtocol::ALPN, proto.clone())
.spawn()
.await?;
.spawn();

endpoint_shutdown = Some(endpoint.clone());
println!("our node id:\n{}", endpoint.node_id());
Expand Down
4 changes: 2 additions & 2 deletions callme-egui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ description = "make voicecalls over iroh (gui app)"
crate-type = ["lib", "cdylib"]

[dependencies]
anyhow = "1.0.96"
anyhow = "1.0.98"
async-channel = "2.3.1"
egui = { version = "0.31.0", default-features = false, features = [
"color-hex",
] }
iroh = { version = "0.33.0", default-features = false }
iroh = { version = "0.35.0", default-features = false }
callme = { version = "0.1.0", path = "../callme", default-features = false }
n0-future = "0.1.2"
tokio = { version = "1.43.0", features = ["rt", "rt-multi-thread", "sync"] }
Expand Down
3 changes: 1 addition & 2 deletions callme-egui/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,7 @@ impl Worker {
let handler = RtcProtocol::new(endpoint.clone());
let _router = Router::builder(endpoint.clone())
.accept(RtcProtocol::ALPN, handler.clone())
.spawn()
.await?;
.spawn();
Ok(Self {
command_rx,
event_tx,
Expand Down
6 changes: 3 additions & 3 deletions callme/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = { workspace = true }
authors = { workspace = true }

[dependencies]
anyhow = "1.0.96"
anyhow = "1.0.98"
async-channel = "2.3.1"
audio_thread_priority = "0.33.0"
bytes = "1.10.0"
Expand All @@ -16,7 +16,7 @@ dasp_sample = "0.11.0"
derive_more = { version = "2.0.1", features = ["debug", "deref"] }
fixed-resample = "0.6.1"
futures-concurrency = "7.6.3"
iroh = { version = "0.33.0", default-features = false }
iroh = { version = "0.35.0", default-features = false }
iroh-roq = "0.1.0"
n0-future = "0.1.2"
# opus = { package = "magnum-opus", version = "0.3" }
Expand All @@ -34,7 +34,7 @@ webrtc-audio-processing = { version = "0.4.0", optional = true, features = [
"bundled",
"derive_serde",
] }
webrtc-media = "0.9.0"
webrtc-media = "0.10.0"

[target.'cfg(target_os = "android")'.dependencies]
cpal = { version = "0.15.3", features = ["oboe-shared-stdcxx"] }
Expand Down
3 changes: 1 addition & 2 deletions callme/examples/playback-record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ async fn main() -> Result<()> {
let rtc = RtcProtocol::new(endpoint.clone());
let _router = Router::builder(endpoint)
.accept(RtcProtocol::ALPN, rtc.clone())
.spawn()
.await?;
.spawn();

while let Some(conn) = rtc.accept().await? {
info!("accepted");
Expand Down
3 changes: 1 addition & 2 deletions callme/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ mod tests {
let proto = RtcProtocol::new(endpoint.clone());
let router = Router::builder(endpoint)
.accept(RtcProtocol::ALPN, proto.clone())
.spawn()
.await?;
.spawn();
Ok((router, proto))
}

Expand Down
6 changes: 2 additions & 4 deletions callme/src/rtc/protocol_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ pub struct RtcProtocol {
}

impl ProtocolHandler for RtcProtocol {
fn accept(&self, connecting: iroh::endpoint::Connecting) -> BoxFuture<Result<()>> {
fn accept(&self, connection: iroh::endpoint::Connection) -> BoxFuture<Result<()>> {
let sender = self.sender.clone();
async move {
debug!("ProtocolHandler::accept: connecting");
let conn = connecting.await?;
debug!("ProtocolHandler::accept: conn");
let conn = RtcConnection::new(conn);
let conn = RtcConnection::new(connection);
sender.send(conn).await?;
Ok(())
}
Expand Down
Loading