Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jbg committed May 26, 2024
1 parent c94cc03 commit 5b1f842
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
22 changes: 14 additions & 8 deletions lib-gst-meet/src/conference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,13 @@ impl JitsiConference {
.append("false")
.build(),
xmpp_parsers::Element::builder("SourceInfo", ns::DEFAULT_NS)
.append(serde_json::to_string(&serde_json::json!({
format!("{endpoint_id}-a0"): {"muted": false},
format!("{endpoint_id}-v0"): {"muted": false},
}))?.as_str())
.append(
serde_json::to_string(&serde_json::json!({
format!("{endpoint_id}-a0"): {"muted": false},
format!("{endpoint_id}-v0"): {"muted": false},
}))?
.as_str(),
)
.build(),
xmpp_parsers::Element::builder("nick", "http://jabber.org/protocol/nick")
.append(config.nick.as_str())
Expand Down Expand Up @@ -683,10 +686,13 @@ impl StanzaFilter for JitsiConference {
let my_endpoint_id = self.endpoint_id()?.to_owned();

info!("Sending source video type message");
if let Err(e) = colibri_channel.send(ColibriMessage::SourceVideoTypeMessage {
source_name: format!("{my_endpoint_id}-v0"),
video_type: colibri::VideoType::Camera,
}).await {
if let Err(e) = colibri_channel
.send(ColibriMessage::SourceVideoTypeMessage {
source_name: format!("{my_endpoint_id}-v0"),
video_type: colibri::VideoType::Camera,
})
.await
{
warn!("Failed to send source video type message: {e:?}");
}

Expand Down
14 changes: 11 additions & 3 deletions lib-gst-meet/src/jingle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@ impl JingleSession {
return Ok(None);
}

let codecs = [opus, h264, vp8, vp9, av1].iter().flatten().cloned().collect();
let codecs = [opus, h264, vp8, vp9, av1]
.iter()
.flatten()
.cloned()
.collect();

for ssrc in &description.ssrcs {
let owner = ssrc
Expand Down Expand Up @@ -1366,7 +1370,7 @@ impl JingleSession {
};

description.rtcp_mux = Some(RtcpMux);

let endpoint_id = conference.endpoint_id()?;

let mslabel = format!("{}-{}-0-1", endpoint_id, initiate_content.name.0);
Expand All @@ -1380,7 +1384,11 @@ impl JingleSession {
});

description.ssrcs = if initiate_content.name.0 == "audio" {
vec![jingle_ssma::Source::new(audio_ssrc, Some(format!("{endpoint_id}-a0")), None)]
vec![jingle_ssma::Source::new(
audio_ssrc,
Some(format!("{endpoint_id}-a0")),
None,
)]
}
else {
let source_name = format!("{endpoint_id}-v0");
Expand Down

0 comments on commit 5b1f842

Please sign in to comment.