webrtcbin: add turn server fails with "Failed to set TURN server"
I am using the latest master branch of gst-plugins-bad and try to get it worked with webrtc.
Platform: Ubunt-18.04-lts Libnice: 0.1.14-1 Gstreamer: Master branch with latest commit
I have found the issue while adding the turn-server through webrtcbin. I am setting 'turn-server' property of webrtcbin which fails at : ERROR webrtcice gstwebrtcice.c:368:_add_turn_server: Failed to set TURN server
After some investigation, I found that it is failing while passing the parameters to nice_agent_set_relay_info(). We need to use 'host' from gst_uri_get_host as libnice agent expects it.
Currently master code of gst1-plugins-bad use plain-string host name while passing it to libnice agent: nice_agent_set_relay_info() in gstwebrtcice.c while adding turn_server(_add_turn_server).
It is observered that if we don't convert the host parameter by using gst_uri_get_host, it fails in libnice agent(0.1.14-1).
Code does, actually, set the host correctly but while passing params to nice_agent_set_relay_info, it uses incorrect one.