This page describes the protocol used by the gstreamer WebRTC signaling. The WebRTC tools for gstreamer are defined in the Rust plugin here:
net/webrtc · main · GStreamer / gst-plugins-rs · GitLab
They provides a signaling server, sink for gstreamer and a Node.js API.
Here, we will describe how their signalling protocol works so that you can implement your own signalling solution to connect it with 3rd parties software (such as Unity or aiortc in Python)
Gstreamer signalling defines 3 roles (so the WebRTC peers are not symmetrical)
sequenceDiagram
Server-->>Producer: Welcome (*PeerId)*
Server-->>Consumer: Welcome (PeerId)
Producer->>Server: PeerStatusChanged # declare yourself as producer
Consumer->>Server: StartSession (producer PeerId)
Server-->>Producer: StartSession (SessionId)
Server-->>Consumer: SessionStarted (SessionId)
Producer->>Server: Peer (offer sdp)
Server-->>Consumer: Peer (offer sdp)
Consumer->>Server: Peer (answer sdp)
Server-->>Producer: Peer (answer sdp)
net/webrtc/protocol/src/lib.rs · main · GStreamer / gst-plugins-rs · GitLab