mozilla / janus-plugin-sfu

Janus plugin to act as a kind of SFU for game networking data.
Mozilla Public License 2.0
135 stars 40 forks source link

janus_rtp_header_update should be called before forwarding #51

Open gfodor opened 4 years ago

gfodor commented 4 years ago

The janus_rtp_header_update function (https://github.com/meetecho/janus-gateway/blob/master/plugins/janus_videoroom.c#L6589) is used to adjust the RTP sequence number, among other things, in scenarios where either the SSRC changes or if a stream is paused/resumed. All existing Janus plugins call this (eg https://github.com/meetecho/janus-gateway/blob/master/plugins/janus_videoroom.c#L7176) we should in the SFU as well.

vincentfretin commented 3 years ago

Indeed, in the videoroom plugin I see this is called when using simulcast when the video quality change, or after using a switch request (from the doc: switch request can be used to change the source of the media flowing over a specific PeerConnection (e.g., I was watching Alice, I want to watch Bob now) without having to create a new handle for that). The janus-plugin-sfu plugin doesn't currently implement those features. I see that https://github.com/netology-group/janus-conference Rust plugin implements janus_rtp_header_update, see https://github.com/netology-group/janus-conference/blob/4b1eb19a7079c942f925a0fe0d337ec9a7010624/src/janus_rtp.rs