webrtcbin: determine the type of the ICE connection
Using webrtcbin
and trickle ICE, I would like to trigger a callback when a candidate pair is selected, with the candidates in tow, to figure out if it's a local/host connection, a STUN relfexive one, or if it's being relayed by my TURN server.
There's no obvious way to do it right now (I tried to trigger GstWebRTCICETransport
's on-selected-candidate-pair-change
and extract the data from the GstStructure
returned by get-stats
and various other things to no avail).
What worked for me was getting the GstWebRTCICE
from the ice-agent
property, and then NiceAgent
from the agent
property. From there, connecting to the new-selected-pair-full
signal did the trick.
The documentation warns again using the NiceAgent
, however, ("WARNING! Accessing this property may have disastrous consequences for the operation of webrtcbin."), so I'm not sure if I want to rely on this. Is this the proper way to do it?
I'm using the gstreamer-rs
Rust bindings, if it's relevant.