ICE candidate negotiation process

Olivier Crête olivier.crete at collabora.com
Fri Jul 10 19:37:09 UTC 2020


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))

OlivierOn 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 <foreverneilyoung at googlemail.com>:
> > 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 <foreverneilyoung at googlemail.com>:
> > > 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 <ystreet00 at gmail.com>:
> > > > 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
> > > > > > > gstreamer-devel at lists.freedesktop.org
> > > > > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> _______________________________________________gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-- 
Olivier Crête
olivier.crete at collabora.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200710/33f80b26/attachment.htm>


More information about the gstreamer-devel mailing list