<div dir="ltr"><div>Hi,</div><div><br></div><div>Thank you for the reply. I haven't had success in using TURN, although it would be great.., however I am able to use it with stun :).</div><div><br></div><div>I am completely in the dark on the c side of things otherwise I would have tried to solve it...</div><div><br></div><div>Thanks again!<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 28, 2022 at 9:30 AM Olivier Crête <<a href="mailto:olivier.crete@collabora.com">olivier.crete@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
The GLib.PtrArray should just be translated from a Python list (a []).<br>
<br>
That said, I'm not sure we can create this thing from Python. It feels<br>
like I need to add an second property that is more introspection<br>
friendly...<br>
<br>
Olivier<br>
<br>
On Mon, 2021-11-08 at 16:17 +0100, Skorpeo Skorpeo wrote:<br>
> Hello,<br>
> <br>
> Thank you for the quick response!  I spent more time this morning and<br>
> got a little further and I had also tried that but it didn't work:/  <br>
> <br>
> When I do stream.set_transmitter_ht('nice', {'relay-info':<br>
> [relay_structure]}) I get error:<br>
> <br>
> gi.repository.GLib.Error: fs-error: Invalid type of argument relay-<br>
> info for transmitter nice (100)<br>
> <br>
> I confirm that this is what I am passing in:<br>
> {'relay-info': [<Gst.Structure object at 0x111fb5b80 (GstStructure at<br>
> 0x7f9d58741bd0)>]}<br>
> <br>
> I was able to get the function to accept the following:<br>
> <br>
> {'relay-info': GLib.PtrArray()}  <br>
> {'relay-info': GObject.Value(GLib.PtrArray)} <br>
> <br>
> both of which are meaningless because I haven't figured out a way of<br>
> putting values in there.<br>
> <br>
> {'relay-info': relay_structure} also doesn't work<br>
> <br>
> I also tried various things like:<br>
> <br>
> value = GObject.Value(GLib.PtrArray)<br>
> value.set_value([relay_structure]) #also doesn't work<br>
> <br>
> value = GObject.Value(GLib.PtrArray)<br>
> value.set_instance([relay_structure]) #also doesn't work<br>
> <br>
> I also tried other things none of which got me to the promised land. <br>
> <br>
> It seems I have to somehow instantiate a GLib.PtrArray in python but<br>
> there appears to be no facility for that and the function doesn't<br>
> seem to accept a python list as equivalent?<br>
> <br>
> Your input is greatly appreciated<br>
> Many thanks<br>
> <br>
> On Mon, Nov 8, 2021 at 3:19 PM Olivier Crête<br>
> <<a href="mailto:olivier.crete@collabora.com" target="_blank">olivier.crete@collabora.com</a>> wrote:<br>
> > Hi,<br>
> > <br>
> > I believe you need to put it in an array in a dict. So something<br>
> > like<br>
> > <br>
> > stream.set_transmitter_ht(trans, {'relay-info', [relay_structure]})<br>
> > <br>
> > You can put other parametes inside the dict.<br>
> > You can also put multiple relays inside the array.<br>
> > <br>
> > Olivier<br>
> > <br>
> > <br>
> > On Mon, 2021-11-08 at 00:01 +0100, Skorpeo Skorpeo wrote:<br>
> > > Hi,<br>
> > > <br>
> > > How can I add TURN server info for a nice transmitter in python<br>
> > > for<br>
> > > Farstream?  I have tried different things but to no avail.  I am<br>
> > > not<br>
> > > sure how to get a hold of the transmitter itself or to pass it<br>
> > > parameters initially.  Right now local candidates generated are<br>
> > > only<br>
> > > of type "host".<br>
> > > <br>
> > > I use the function stream.set_transmitter("nice") which appears<br>
> > > to<br>
> > > also allow for a parameter argument.  I can get as far as:<br>
> > > <br>
> > > relay_structure = Gst.Structure.new_empty("relay-info") <br>
> > > relay_structure.set_value("ip", "123.45.678.999")<br>
> > > relay_structure.set_value("port", 3478)<br>
> > > relay_structure.set_value("username", "user1")<br>
> > > relay_structure.set_value("password", "user1pwd")<br>
> > > relay_structure.set_value("relay-type", "udp")<br>
> > > <br>
> > > but I am not sure how to pass this parameter to<br>
> > > stream.set_transmitter() or stream.set_transmitter_ht().<br>
> > > <br>
> > > I also see the function nice_agent_set_relay_info in the source<br>
> > > but I<br>
> > > am not sure how to use it or access it in python.<br>
> > > <br>
> > > I would also like to add STUN but just trying to figure out TURN<br>
> > > first...<br>
> > > <br>
> > > Any help would be massively appreciated!<br>
> > > <br>
> > > Thanks!<br>
> > > <br>
> > > <br>
> > <br>
<br>
-- <br>
Olivier Crête<br>
<a href="mailto:olivier.crete@collabora.com" target="_blank">olivier.crete@collabora.com</a><br>
<br>
</blockquote></div>