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 |
'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 |
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 |
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 |
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...
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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>
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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): def on_ice_gathering_state(self, _, param2): 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)
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi, You have to read the value from the property on the object, so something like:
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: --Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Neil Young
OK, solved it:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |