webrtc: janus: handle slowlink event

Fix this warning:

webrtc-janusvr-signaller imp.rs:426:gstrswebrtc::janusvr_signaller:👿:Signaller::handle_msg:<GstJanusVRWebRTCSignallerU64@0x7f317009b4d0> Unknown message from server: {
   "janus": "slowlink",
   "session_id": 980554280060589,
   "sender": 5867141593320621,
   "mid": "video0",
   "media": "video",
   "uplink": false,
   "lost": 15
}

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1929>
This commit is contained in:
Guillaume Desmottes 2024-11-19 15:15:56 +01:00 committed by GStreamer Marge Bot
parent 867c2b78b6
commit 45519a7d85

View file

@ -185,6 +185,17 @@ struct InnerHangup {
reason: String, reason: String,
} }
#[derive(Serialize, Deserialize, Debug)]
struct InnerSlowLink {
session_id: u64,
sender: u64,
opaque_id: Option<String>,
mid: String,
media: String,
uplink: bool,
lost: u64,
}
#[derive(Serialize, Deserialize, Debug)] #[derive(Serialize, Deserialize, Debug)]
struct RoomJoined { struct RoomJoined {
room: JanusId, room: JanusId,
@ -267,6 +278,7 @@ enum JsonReply {
Media, Media,
Error(InnerError), Error(InnerError),
HangUp(InnerHangup), HangUp(InnerHangup),
SlowLink(InnerSlowLink),
} }
#[derive(Default)] #[derive(Default)]
@ -561,7 +573,7 @@ impl Signaller {
} }
JsonReply::HangUp(hangup) => self.raise_error(format!("hangup: {}", hangup.reason)), JsonReply::HangUp(hangup) => self.raise_error(format!("hangup: {}", hangup.reason)),
// ignore for now // ignore for now
JsonReply::Ack | JsonReply::Media => {} JsonReply::Ack | JsonReply::Media | JsonReply::SlowLink(_) => {}
} }
} }