TURN relay in python - nice transmitter

Olivier Crête olivier.crete at collabora.com
Mon Nov 8 14:19:19 UTC 2021


Hi,

I believe you need to put it in an array in a dict. So something like

stream.set_transmitter_ht(trans, {'relay-info', [relay_structure]})

You can put other parametes inside the dict.
You can also put multiple relays inside the array.

Olivier


On Mon, 2021-11-08 at 00:01 +0100, Skorpeo Skorpeo wrote:
> Hi,
> 
> How can I add TURN server info for a nice transmitter in python for
> Farstream?  I have tried different things but to no avail.  I am not
> sure how to get a hold of the transmitter itself or to pass it
> parameters initially.  Right now local candidates generated are only
> of type "host".
> 
> I use the function stream.set_transmitter("nice") which appears to
> also allow for a parameter argument.  I can get as far as:
> 
> relay_structure = Gst.Structure.new_empty("relay-info") 
> relay_structure.set_value("ip", "123.45.678.999")
> relay_structure.set_value("port", 3478)
> relay_structure.set_value("username", "user1")
> relay_structure.set_value("password", "user1pwd")
> relay_structure.set_value("relay-type", "udp")
> 
> but I am not sure how to pass this parameter to
> stream.set_transmitter() or stream.set_transmitter_ht().
> 
> I also see the function nice_agent_set_relay_info in the source but I
> am not sure how to use it or access it in python.
> 
> I would also like to add STUN but just trying to figure out TURN
> first...
> 
> Any help would be massively appreciated!
> 
> Thanks!
> 
> 

-- 
Olivier Crête
olivier.crete at collabora.com


More information about the Farstream-devel mailing list