ICE candidate negotiation process

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

ICE candidate negotiation process

Neil Young
Hi,

I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.

Regards

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: ICE candidate negotiation process

Matthew Waters
'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the
GObject notify signal to track changes.

On 10/7/20 3:36 am, Neil Young wrote:

> Hi,
>
> I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.
>
> Regards
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ICE candidate negotiation process

Neil Young
Thanks Matthew. Are you aware of any sample code, demonstrating that for GStreamer and Python?


>
> 'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the
> GObject notify signal to track changes.
>
>> On 10/7/20 3:36 am, Neil Young wrote:
>> Hi,
>>
>> I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.
>>
>> Regards
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: ICE candidate negotiation process

Matthew Waters
I'm not aware of anything for this specific example, no.  There are
plenty of other examples regarding GObject notify signalling for other
properties though.

On 10/7/20 2:55 pm, Neil Young wrote:

> Thanks Matthew. Are you aware of any sample code, demonstrating that for GStreamer and Python?
>
>
>> 'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the
>> GObject notify signal to track changes.
>>
>>> On 10/7/20 3:36 am, Neil Young wrote:
>>> Hi,
>>>
>>> I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.
>>>
>>> Regards
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> [hidden email]
>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ICE candidate negotiation process

Neil Young
A bit further:

self.webrtc.connect('notify::ice-connection-state', self.on_ice_connection_state)

and later:


def on_ice_connection_state(self, param1, param2):
print("***ON ICE CONNECTION STATE {} {}".format(param1, type(param2)))
***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x112639a00 (GstWebRTCBin at 0x7fe915310220)> <class 'gobject.GParamSpec'>

But I can't currently figure out, what element of the "gobject.GParamSpec" contains the value. I can access "name", "nick", "blurb", "flags", but no value...




Am 10.07.2020 um 12:20 schrieb Matthew Waters <[hidden email]>:

I'm not aware of anything for this specific example, no.  There are
plenty of other examples regarding GObject notify signalling for other
properties though.

On 10/7/20 2:55 pm, Neil Young wrote:
Thanks Matthew. Are you aware of any sample code, demonstrating that for GStreamer and Python?


'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the
GObject notify signal to track changes.

On 10/7/20 3:36 am, Neil Young wrote:
Hi,

I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.

Regards

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel





_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: ICE candidate negotiation process

Neil Young
Maybe like so:


print("***ON ICE CONNECTION STATE {} {}".format(param1, param2.default_value))

But it is not helpful, since it always just returns "STATE_NEW" on different callbacks...

***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x113cf34b0 (GstWebRTCBin at 0x7fa8c52ba220)> <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState> ***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x113cf34b0 (GstWebRTCBin at 0x7fa8c52ba220)> <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>

Am 10.07.2020 um 20:29 schrieb Neil Young <[hidden email]>:

A bit further:

self.webrtc.connect('notify::ice-connection-state', self.on_ice_connection_state)

and later:


def on_ice_connection_state(self, param1, param2):
print("***ON ICE CONNECTION STATE {} {}".format(param1, type(param2)))
***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x112639a00 (GstWebRTCBin at 0x7fe915310220)> <class 'gobject.GParamSpec'>

But I can't currently figure out, what element of the "gobject.GParamSpec" contains the value. I can access "name", "nick", "blurb", "flags", but no value...




Am 10.07.2020 um 12:20 schrieb Matthew Waters <[hidden email]>:

I'm not aware of anything for this specific example, no.  There are
plenty of other examples regarding GObject notify signalling for other
properties though.

On 10/7/20 2:55 pm, Neil Young wrote:
Thanks Matthew. Are you aware of any sample code, demonstrating that for GStreamer and Python?


'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the
GObject notify signal to track changes.

On 10/7/20 3:36 am, Neil Young wrote:
Hi,

I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.

Regards

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel






_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: ICE candidate negotiation process

Neil Young
Well, after SDP offer and answer and all ICE candidates have been sent and received I'm getting these callbacks in a row:

2020-07-10 20:39:06,132 df.py-INFO    : ***ON ICE CONNECTION STATE <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>
2020-07-10 20:39:06,132 df.py-INFO    : ***ON ICE GATHERING STATE <enum GST_WEBRTC_ICE_GATHERING_STATE_NEW of type GstWebRTC.WebRTCICEGatheringState>
2020-07-10 20:39:06,152 df.py-INFO    : ***ON ICE CONNECTION STATE <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>
2020-07-10 20:39:06,197 df.py-INFO    : ***ON ICE GATHERING STATE <enum GST_WEBRTC_ICE_GATHERING_STATE_NEW of type GstWebRTC.WebRTCICEGatheringState>

Is this correct? 

The handler:

def on_ice_connection_state(self, _, param2):
self.logger.info("***ON ICE CONNECTION STATE {}".format(param2.default_value))
def on_ice_gathering_state(self, _, param2):
self.logger.info("***ON ICE GATHERING STATE {}".format(param2.default_value))


The setup:

self.webrtc.connect('notify::ice-connection-state', self.on_ice_connection_state)
self.webrtc.connect('notify::ice-gathering-state', self.on_ice_gathering_state)



Am 10.07.2020 um 20:34 schrieb Neil Young <[hidden email]>:

Maybe like so:


print("***ON ICE CONNECTION STATE {} {}".format(param1, param2.default_value))

But it is not helpful, since it always just returns "STATE_NEW" on different callbacks...

***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x113cf34b0 (GstWebRTCBin at 0x7fa8c52ba220)> <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState> ***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x113cf34b0 (GstWebRTCBin at 0x7fa8c52ba220)> <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>

Am 10.07.2020 um 20:29 schrieb Neil Young <[hidden email]>:

A bit further:

self.webrtc.connect('notify::ice-connection-state', self.on_ice_connection_state)

and later:


def on_ice_connection_state(self, param1, param2):
print("***ON ICE CONNECTION STATE {} {}".format(param1, type(param2)))
***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x112639a00 (GstWebRTCBin at 0x7fe915310220)> <class 'gobject.GParamSpec'>

But I can't currently figure out, what element of the "gobject.GParamSpec" contains the value. I can access "name", "nick", "blurb", "flags", but no value...




Am 10.07.2020 um 12:20 schrieb Matthew Waters <[hidden email]>:

I'm not aware of anything for this specific example, no.  There are
plenty of other examples regarding GObject notify signalling for other
properties though.

On 10/7/20 2:55 pm, Neil Young wrote:
Thanks Matthew. Are you aware of any sample code, demonstrating that for GStreamer and Python?


'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the
GObject notify signal to track changes.

On 10/7/20 3:36 am, Neil Young wrote:
Hi,

I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.

Regards

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel







_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: ICE candidate negotiation process

Olivier Crête-3
Hi,

You have to read the value from the property on the object, so something like:

def on_ice_connection_state(self, param1, param2):
print("***ON ICE CONNECTION STATE {} {}".format(param1, self.props.ice_connection_state))


Olivier
On Fri, 2020-07-10 at 20:42 +0200, Neil Young wrote:
Well, after SDP offer and answer and all ICE candidates have been sent and received I'm getting these callbacks in a row:

2020-07-10 20:39:06,132 df.py-INFO    : ***ON ICE CONNECTION STATE <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>
2020-07-10 20:39:06,132 df.py-INFO    : ***ON ICE GATHERING STATE <enum GST_WEBRTC_ICE_GATHERING_STATE_NEW of type GstWebRTC.WebRTCICEGatheringState>
2020-07-10 20:39:06,152 df.py-INFO    : ***ON ICE CONNECTION STATE <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>
2020-07-10 20:39:06,197 df.py-INFO    : ***ON ICE GATHERING STATE <enum GST_WEBRTC_ICE_GATHERING_STATE_NEW of type GstWebRTC.WebRTCICEGatheringState>

Is this correct? 

The handler:

def on_ice_connection_state(self, _, param2):
self.logger.info("***ON ICE CONNECTION STATE {}".format(param2.default_value))
def on_ice_gathering_state(self, _, param2):
self.logger.info("***ON ICE GATHERING STATE {}".format(param2.default_value))


The setup:

self.webrtc.connect('notify::ice-connection-state', self.on_ice_connection_state)
self.webrtc.connect('notify::ice-gathering-state', self.on_ice_gathering_state)



Am 10.07.2020 um 20:34 schrieb Neil Young <[hidden email]>:
Maybe like so:


print("***ON ICE CONNECTION STATE {} {}".format(param1, param2.default_value))

But it is not helpful, since it always just returns "STATE_NEW" on different callbacks...

***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x113cf34b0 (GstWebRTCBin at 0x7fa8c52ba220)> <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState> ***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x113cf34b0 (GstWebRTCBin at 0x7fa8c52ba220)> <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>

Am 10.07.2020 um 20:29 schrieb Neil Young <[hidden email]>:
A bit further:

self.webrtc.connect('notify::ice-connection-state', self.on_ice_connection_state)

and later:


def on_ice_connection_state(self, param1, param2):
print("***ON ICE CONNECTION STATE {} {}".format(param1, type(param2)))
***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x112639a00 (GstWebRTCBin at 0x7fe915310220)> <class 'gobject.GParamSpec'>

But I can't currently figure out, what element of the "gobject.GParamSpec" contains the value. I can access "name", "nick", "blurb", "flags", but no value...




Am 10.07.2020 um 12:20 schrieb Matthew Waters <[hidden email]>:
I'm not aware of anything for this specific example, no.  There are
plenty of other examples regarding GObject notify signalling for other
properties though.

On 10/7/20 2:55 pm, Neil Young wrote:
Thanks Matthew. Are you aware of any sample code, demonstrating that for GStreamer and Python?


'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the
GObject notify signal to track changes.

On 10/7/20 3:36 am, Neil Young wrote:
Hi,

I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.

Regards

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel






_______________________________________________
gstreamer-devel mailing list
[hidden email]

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Olivier Crête [hidden email]

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: ICE candidate negotiation process

Neil Young
In reply to this post by Neil Young
OK, solved it:

self.logger.info("***ON ICE CONNECTION STATE {}".format(self.webrtc.get_property(param2.name)))

Am 10.07.2020 um 20:42 schrieb Neil Young <[hidden email]>:

Well, after SDP offer and answer and all ICE candidates have been sent and received I'm getting these callbacks in a row:

2020-07-10 20:39:06,132 df.py-INFO    : ***ON ICE CONNECTION STATE <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>
2020-07-10 20:39:06,132 df.py-INFO    : ***ON ICE GATHERING STATE <enum GST_WEBRTC_ICE_GATHERING_STATE_NEW of type GstWebRTC.WebRTCICEGatheringState>
2020-07-10 20:39:06,152 df.py-INFO    : ***ON ICE CONNECTION STATE <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>
2020-07-10 20:39:06,197 df.py-INFO    : ***ON ICE GATHERING STATE <enum GST_WEBRTC_ICE_GATHERING_STATE_NEW of type GstWebRTC.WebRTCICEGatheringState>

Is this correct? 

The handler:

def on_ice_connection_state(self, _, param2):
self.logger.info("***ON ICE CONNECTION STATE {}".format(param2.default_value))
def on_ice_gathering_state(self, _, param2):
self.logger.info("***ON ICE GATHERING STATE {}".format(param2.default_value))


The setup:

self.webrtc.connect('notify::ice-connection-state', self.on_ice_connection_state)
self.webrtc.connect('notify::ice-gathering-state', self.on_ice_gathering_state)



Am 10.07.2020 um 20:34 schrieb Neil Young <[hidden email]>:

Maybe like so:


print("***ON ICE CONNECTION STATE {} {}".format(param1, param2.default_value))

But it is not helpful, since it always just returns "STATE_NEW" on different callbacks...

***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x113cf34b0 (GstWebRTCBin at 0x7fa8c52ba220)> <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState> ***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x113cf34b0 (GstWebRTCBin at 0x7fa8c52ba220)> <enum GST_WEBRTC_ICE_CONNECTION_STATE_NEW of type GstWebRTC.WebRTCICEConnectionState>

Am 10.07.2020 um 20:29 schrieb Neil Young <[hidden email]>:

A bit further:

self.webrtc.connect('notify::ice-connection-state', self.on_ice_connection_state)

and later:


def on_ice_connection_state(self, param1, param2):
print("***ON ICE CONNECTION STATE {} {}".format(param1, type(param2)))
***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x112639a00 (GstWebRTCBin at 0x7fe915310220)> <class 'gobject.GParamSpec'>

But I can't currently figure out, what element of the "gobject.GParamSpec" contains the value. I can access "name", "nick", "blurb", "flags", but no value...




Am 10.07.2020 um 12:20 schrieb Matthew Waters <[hidden email]>:

I'm not aware of anything for this specific example, no.  There are
plenty of other examples regarding GObject notify signalling for other
properties though.

On 10/7/20 2:55 pm, Neil Young wrote:
Thanks Matthew. Are you aware of any sample code, demonstrating that for GStreamer and Python?


'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the
GObject notify signal to track changes.

On 10/7/20 3:36 am, Neil Young wrote:
Hi,

I'm wondering, if there would be kind of a status callback, which provides me the ICE negotiation state. I'm using the Python bindings of GStreamer.

Regards

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel








_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel