Skip to content

Commit

Permalink
feat: added more echotest params based on janus gateway supported params
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghamza-Jd committed Oct 22, 2024
1 parent 0317f90 commit 4dafd74
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
10 changes: 7 additions & 3 deletions jarust_plugins/examples/echotest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ async fn main() -> anyhow::Result<()> {

handle
.start(EchoTestStartParams {
audio: true,
video: true,
bitrate: None,
audio: Some(true),
video: Some(true),
record: Some(true),
filename: Some("helloworld".to_string()),
min_delay: Some(10),
max_delay: Some(100),
..Default::default()
})
.await?;

Expand Down
6 changes: 3 additions & 3 deletions jarust_plugins/examples/echotest_start_with_est.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ async fn main() -> anyhow::Result<()> {
let rsp = handle
.start_with_est(
EchoTestStartParams {
audio: true,
video: true,
bitrate: None,
audio: Some(true),
video: Some(true),
..Default::default()
},
EstProto::JSEP(Jsep {
sdp: "".to_string(),
Expand Down
22 changes: 18 additions & 4 deletions jarust_plugins/src/echo_test/params.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
make_dto!(
EchoTestStartParams,
required {
optional {
audio: bool,
video: bool
},
optional { bitrate: u32 }
video: bool,
bitrate: u32,
record: bool,
filename: String,
substream: u32,
temporal: u32,
fallback: u32,
svc: bool,
spatial_layer: u32,
temporal_layer: u32,
audiocodec: String,
videocodec: String,
videoprofile: String,
opusred: bool,
min_delay: i32,
max_delay: i32,
}
);

0 comments on commit 4dafd74

Please sign in to comment.