webrtc: janus: handle slow_link videoroom event

Fix this warning:

webrtc-janusvr-signaller imp.rs:426:gstrswebrtc::janusvr_signaller:👿:Signaller::handle_msg:<GstJanusVRWebRTCSignallerU64@0x7f317009b4d0> Unknown message from server: {
   "janus": "event",
   "session_id": 980554280060589,
   "sender": 5867141593320621,
   "plugindata": {
      "plugin": "janus.plugin.videoroom",
      "data": {
         "videoroom": "slow_link",
         "current-bitrate": 0
      }
   }
}

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 4d31001c4b
commit 867c2b78b6

View file

@ -211,6 +211,12 @@ struct RoomTalking {
audio_level: f32,
}
#[derive(Serialize, Deserialize, Debug)]
struct SlowLink {
#[serde(rename = "current-bitrate")]
current_bitrate: u32,
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(tag = "videoroom", rename_all = "kebab-case")]
enum VideoRoomData {
@ -219,6 +225,8 @@ enum VideoRoomData {
Destroyed(RoomDestroyed),
Talking(RoomTalking),
StoppedTalking(RoomTalking),
#[serde(rename = "slow_link")]
SlowLink(SlowLink),
}
#[derive(Serialize, Deserialize, Debug)]
@ -542,6 +550,9 @@ impl Signaller {
VideoRoomData::StoppedTalking(talking) => {
self.emit_talking(false, talking.id, talking.audio_level);
}
VideoRoomData::SlowLink(_slow_link) => {
// TODO: use to reduce the bitrate?
}
}
}
}