Skip to content

Commit

Permalink
Rust: fix bench
Browse files Browse the repository at this point in the history
Update Cargo.lock which was missing.
  • Loading branch information
jmillan committed Oct 27, 2023
1 parent 1f0f4a1 commit 4b1ba62
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions rust/benches/producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ use std::env;
use std::net::{IpAddr, Ipv4Addr};
use std::num::{NonZeroU32, NonZeroU8};

fn create_ssrc() -> u32 {
fastrand::u32(100_000_000..999_999_999)
}

fn media_codecs() -> Vec<RtpCodecCapability> {
vec![
RtpCodecCapability::Audio {
Expand Down Expand Up @@ -162,24 +166,32 @@ fn video_producer_options() -> ProducerOptions {
],
encodings: vec![
RtpEncodingParameters {
ssrc: Some(22222222),
rtx: Some(RtpEncodingParametersRtx { ssrc: 22222223 }),
ssrc: Some(create_ssrc()),
rtx: Some(RtpEncodingParametersRtx {
ssrc: create_ssrc(),
}),
scalability_mode: "L1T3".parse().unwrap(),
..RtpEncodingParameters::default()
},
RtpEncodingParameters {
ssrc: Some(22222224),
rtx: Some(RtpEncodingParametersRtx { ssrc: 22222225 }),
ssrc: Some(create_ssrc()),
rtx: Some(RtpEncodingParametersRtx {
ssrc: create_ssrc(),
}),
..RtpEncodingParameters::default()
},
RtpEncodingParameters {
ssrc: Some(22222226),
rtx: Some(RtpEncodingParametersRtx { ssrc: 22222227 }),
ssrc: Some(create_ssrc()),
rtx: Some(RtpEncodingParametersRtx {
ssrc: create_ssrc(),
}),
..RtpEncodingParameters::default()
},
RtpEncodingParameters {
ssrc: Some(22222228),
rtx: Some(RtpEncodingParametersRtx { ssrc: 22222229 }),
ssrc: Some(create_ssrc()),
rtx: Some(RtpEncodingParametersRtx {
ssrc: create_ssrc(),
}),
..RtpEncodingParameters::default()
},
],
Expand Down

0 comments on commit 4b1ba62

Please sign in to comment.