Skip to content

Commit 81c4f14

Browse files
committed
compilable with cargo build
1 parent 762ed06 commit 81c4f14

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

Cargo.lock

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ members = [
6161
"pulsebeam-simulator",
6262
]
6363

64-
default-members = [
65-
"pulsebeam",
66-
"pulsebeam-agent",
67-
"pulsebeam-cli",
68-
"pulsebeam-runtime",
69-
]
64+
# default-members = [
65+
# "pulsebeam",
66+
# "pulsebeam-agent",
67+
# "pulsebeam-cli",
68+
# "pulsebeam-runtime",
69+
# ]

pulsebeam-agent/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ authors.workspace = true
1111

1212
[features]
1313
default = []
14-
sim = ["dep:turmoil"]
1514
# default = ["ffmpeg-static"]
1615
#
1716
# # Force static linking (default)
@@ -26,7 +25,6 @@ thiserror = { workspace = true }
2625
tracing = { workspace = true }
2726
str0m = { workspace = true }
2827
bytes = { workspace = true }
29-
turmoil = { workspace = true, optional = true }
3028

3129
tokio = { workspace = true }
3230
metrics = "0.24.3"
@@ -35,6 +33,7 @@ maybe-async = "0.2.10"
3533
http = "1.4.0"
3634
tokio-stream = "0.1.17"
3735
if-addrs = "0.14.0"
36+
pulsebeam-core = { version = "0.1.0", path = "../pulsebeam-core" }
3837

3938
# FFmpeg integration
4039
# ffmpeg-next = { version = "8.0.0", default-features = false, features = ["codec", "format", "filter", "software-resampling", "software-scaling"] }

pulsebeam-agent/src/actor.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
use crate::signaling::{HttpSignalingClient, SignalingError};
2+
use crate::{MediaFrame, TransceiverDirection};
13
use futures_lite::StreamExt;
4+
use pulsebeam_core::net::UdpSocket;
25
use std::collections::HashMap;
36
use std::net::{IpAddr, SocketAddr};
47
use std::sync::Arc;
@@ -15,16 +18,6 @@ use tokio::time::Instant;
1518
use tokio_stream::StreamMap;
1619
use tokio_stream::wrappers::ReceiverStream;
1720

18-
use crate::signaling::{HttpSignalingClient, SignalingError};
19-
use crate::{MediaFrame, TransceiverDirection};
20-
21-
#[cfg(not(feature = "sim"))]
22-
use tokio::net as async_net;
23-
#[cfg(feature = "sim")]
24-
use turmoil::net as async_net;
25-
26-
use async_net::UdpSocket;
27-
2821
#[derive(Debug)]
2922
pub struct TrackSender {
3023
pub mid: Mid,

pulsebeam-cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ tracing = { workspace = true }
1515

1616
pulsebeam-agent = { version = "0.1.0", path = "../pulsebeam-agent" }
1717
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
18+
pulsebeam-core = { version = "0.1.0", path = "../pulsebeam-core" }

pulsebeam-cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use pulsebeam_agent::{
44
media::H264Looper,
55
signaling::HttpSignalingClient,
66
};
7+
use pulsebeam_core::net::UdpSocket;
78
use std::time::Duration;
8-
use tokio::net::UdpSocket;
99

1010
const RAW_H264: &[u8] = include_bytes!("video.h264");
1111

pulsebeam-core/src/net.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ mod sim {
2525
Ok(Self(inner))
2626
}
2727

28+
pub async fn accept(&self) -> io::Result<(TurmoilStream, SocketAddr)> {
29+
self.0.accept().await
30+
}
31+
2832
pub fn local_addr(&self) -> io::Result<SocketAddr> {
2933
self.0.local_addr()
3034
}

pulsebeam-runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dashmap = "6.1.0"
4040
async-channel = "2.5.0"
4141
tokio-util = "0.7.17"
4242
systemstat = "0.2.5"
43-
pulsebeam-core = { version = "0.1.0", path = "../pulsebeam-core" }
43+
pulsebeam-core = { version = "0.1.0", path = "../pulsebeam-core" }
4444

4545
[dev-dependencies]
4646
criterion = { version = "0.8.1", features = ["async", "async_tokio"] }

pulsebeam-simulator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ turmoil.workspace = true
1717
pulsebeam = { version = "0.3.1", path = "../pulsebeam" }
1818
pulsebeam-runtime = { version = "0.1.0", path = "../pulsebeam-runtime" }
1919
pulsebeam-agent = { version = "0.1.0", path = "../pulsebeam-agent" }
20+
pulsebeam-core = { version = "0.1.0", path = "../pulsebeam-core", features = ["sim"] }
2021

2122
proptest = "1.9.0"
2223
test-strategy = "0.4.3"

0 commit comments

Comments
 (0)