<html dir="ltr"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body class="" style="text-align:left; direction:ltr;"><div>Hi,</div><div><br></div><div>You have to read the value from the property on the object, so something like:</div><div><br></div><div><blockquote type="cite" class="evo-awrap" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class=""><div class=""><div class="" style="line-height: 21px;"><div class="" style="font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; white-space: pre;">    <span class="" style="color: rgb(0, 0, 255);">def</span> <span class="" style="color: rgb(121, 94, 38);">on_ice_connection_state</span>(<span class="" style="color: rgb(0, 16, 128);">self</span>, <span class="" style="color: rgb(0, 16, 128);">param1</span>, <span class="" style="color: rgb(0, 16, 128);">param2</span>):</div><div style="font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; white-space: pre;">        <span class="" style="color: rgb(0, 0, 255);">print</span>(<span class="" style="color: rgb(163, 21, 21);">"***ON ICE CONNECTION STATE {} {}"</span>.format(param1, self.props.ice_connection_state))</div></div></div></div></div></div></blockquote><br></div><div><br></div><div>Olivier</div><div>On Fri, 2020-07-10 at 20:42 +0200, Neil Young wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">Well, after SDP offer and answer and all ICE candidates have been sent and received I'm getting these callbacks in a row:<div class=""><br class=""></div><div class=""><div class="">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></div><div class="">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></div><div class="">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></div><div class="">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></div><div class=""><br class=""></div><div class="">Is this correct? </div><div><br class=""></div><div>The handler:</div><div><br class=""></div><div><div style="background-color: rgb(255, 255, 255); font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; line-height: 21px; white-space: pre;" class=""><div class="">    <span style="color: #0000ff;" class="">def</span> <span style="color: #795e26;" class="">on_ice_connection_state</span>(<span style="color: #001080;" class="">self</span>, <span style="color: #001080;" class="">_</span>, <span style="color: #001080;" class="">param2</span>):</div><div class="">        <span style="color: #0000ff;" class="">self</span>.<a href="http://logger.info" class="">logger.info</a>(<span style="color: #a31515;" class="">"***ON ICE CONNECTION STATE {}"</span>.format(param2.default_value))</div><div class="">    </div><div class="">    <span style="color: #0000ff;" class="">def</span> <span style="color: #795e26;" class="">on_ice_gathering_state</span>(<span style="color: #001080;" class="">self</span>, <span style="color: #001080;" class="">_</span>, <span style="color: #001080;" class="">param2</span>):</div><div class="">        <span style="color: #0000ff;" class="">self</span>.<a href="http://logger.info" class="">logger.info</a>(<span style="color: #a31515;" class="">"***ON ICE GATHERING STATE {}"</span>.format(param2.default_value))</div><div class=""></div></div></div><div><br class=""></div><div><br class=""></div><div>The setup:</div><div><br class=""></div><div><div style="background-color: rgb(255, 255, 255); font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; line-height: 21px; white-space: pre;" class=""><div class="">        <span style="color: #0000ff;" class="">self</span>.webrtc.connect(<span style="color: #a31515;" class="">'notify::ice-connection-state'</span>, <span style="color: #0000ff;" class="">self</span>.on_ice_connection_state)</div><div class="">        <span style="color: #0000ff;" class="">self</span>.webrtc.connect(<span style="color: #a31515;" class="">'notify::ice-gathering-state'</span>, <span style="color: #0000ff;" class="">self</span>.on_ice_gathering_state)</div><div class=""></div></div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class="">Am 10.07.2020 um 20:34 schrieb Neil Young <<a href="mailto:foreverneilyoung@googlemail.com" class="">foreverneilyoung@googlemail.com</a>>:</div><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Maybe like so:<div class=""><br class=""></div><div class=""><div class=""><br class=""></div><div class=""><div style="background-color: rgb(255, 255, 255); font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; line-height: 21px; white-space: pre;" class=""> <span style="color: #0000ff;" class="">print</span>(<span style="color: #a31515;" class="">"***ON ICE CONNECTION STATE {} {}"</span>.format(param1, param2.default_value))</div></div><div style="background-color: rgb(255, 255, 255); font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; line-height: 21px; white-space: pre;" class=""><br class=""></div><div style="background-color: rgb(255, 255, 255); font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; line-height: 21px; white-space: pre;" class="">But it is not helpful, since it always just returns "STATE_NEW" on different callbacks...</div><div style="background-color: rgb(255, 255, 255); font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; line-height: 21px; white-space: pre;" class=""><br class=""></div><div style="background-color: rgb(255, 255, 255); line-height: 21px;" class=""><font face="Fira Code, Menlo, Monaco, Courier New, monospace" class=""><span style="white-space: pre;" class="">***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>
</span></font></div><div class=""><br class=""></div><div class=""><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class="">Am 10.07.2020 um 20:29 schrieb Neil Young <<a href="mailto:foreverneilyoung@googlemail.com" class="">foreverneilyoung@googlemail.com</a>>:</div><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">A bit further:<div class=""><br class=""></div><div class=""><div style="background-color: rgb(255, 255, 255); font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; line-height: 21px; white-space: pre;" class=""><div class="">        <span style="color: #0000ff;" class="">self</span>.webrtc.connect(<span style="color: #a31515;" class="">'notify::ice-connection-state'</span>, <span style="color: #0000ff;" class="">self</span>.on_ice_connection_state)</div><div class=""></div></div><div class=""><br class=""></div><div class="">and later:</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="background-color: rgb(255, 255, 255); line-height: 21px;" class=""><div style="font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; white-space: pre;" class="">    <span style="color: #0000ff;" class="">def</span> <span style="color: #795e26;" class="">on_ice_connection_state</span>(<span style="color: #001080;" class="">self</span>, <span style="color: #001080;" class="">param1</span>, <span style="color: #001080;" class="">param2</span>):</div><div style="font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; white-space: pre;" class="">        <span style="color: #0000ff;" class="">print</span>(<span style="color: #a31515;" class="">"***ON ICE CONNECTION STATE {} {}"</span>.format(param1, type(param2)))</div><div style="font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; white-space: pre;" class="">        </div><div class=""><font face="Fira Code, Menlo, Monaco, Courier New, monospace" class=""><span style="white-space: pre;" class="">***ON ICE CONNECTION STATE <__gi__.GstWebRTCBin object at 0x112639a00 (GstWebRTCBin at 0x7fe915310220)> <class 'gobject.GParamSpec'></span></font>
</div><div style="font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; white-space: pre;" class=""><br class=""></div></div><div class=""><font face="Fira Code, Menlo, Monaco, Courier New, monospace" class=""><span style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre;" class="">But I can't currently figure out, what element</span> of the "gobject.GParamSpec" contains the value. I can access "name", "nick", "blurb", "flags", but no value...</span></font></div><div class=""><font face="Fira Code, Menlo, Monaco, Courier New, monospace" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></font></div><div class=""><font face="Fira Code, Menlo, Monaco, Courier New, monospace" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></font></div><div class=""><font face="Fira Code, Menlo, Monaco, Courier New, monospace" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></font></div><div class=""><font face="Fira Code, Menlo, Monaco, Courier New, monospace" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></font><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class="">Am 10.07.2020 um 12:20 schrieb Matthew Waters <<a href="mailto:ystreet00@gmail.com" class="">ystreet00@gmail.com</a>>:</div><div class=""><div class="">I'm not aware of anything for this specific example, no.  There are<br class="">plenty of other examples regarding GObject notify signalling for other<br class="">properties though.<br class=""><br class="">On 10/7/20 2:55 pm, Neil Young wrote:<br class=""><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">Thanks Matthew. Are you aware of any sample code, demonstrating that for GStreamer and Python?<br class=""><br class=""><br class=""><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">'ice-connection-state' and 'ice-gathering-state' on webrtcbin.  Use the<br class="">GObject notify signal to track changes.<br class=""><br class=""><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">On 10/7/20 3:36 am, Neil Young wrote:<br class="">Hi,<br class=""><br class="">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.<br class=""><br class="">Regards<br class=""><br class="">_______________________________________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a><br class=""><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" class="">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br class=""></blockquote><br class=""></blockquote></blockquote><br class=""><br class=""></div></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div><pre>_______________________________________________</pre><pre>gstreamer-devel mailing list</pre><a href="mailto:gstreamer-devel@lists.freedesktop.org"><pre>gstreamer-devel@lists.freedesktop.org</pre></a><pre><br></pre><a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"><pre>https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</pre></a><pre><br></pre></blockquote><div><span><pre><pre>-- <br></pre>Olivier Crête
olivier.crete@collabora.com
</pre></span></div></body></html>