<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>Why Port 0?</div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><div style="font-size:85%;color:#575757" dir="auto">Von meinem Samsung Galaxy Smartphone gesendet.</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Ursprüngliche Nachricht --------</div><div>Von: Krutskikh Ivan <stein.hak@gmail.com> </div><div>Datum: 23.05.17 13:39 (GMT+01:00) </div><div>An: Discussion of the development of and with GStreamer <gstreamer-devel@lists.freedesktop.org> </div><div>Betreff: Re: tcpserversink fails to set_state </div><div><br></div></div><div dir="ltr">Anyone?<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-16 10:01 GMT+03:00 Krutskikh Ivan <span dir="ltr"><<a href="mailto:stein.hak@gmail.com" target="_blank">stein.hak@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm still stumbled with this one. Any help would be appreciated.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-04-18 11:46 GMT+03:00 Krutskikh Ivan <span dir="ltr"><<a href="mailto:stein.hak@gmail.com" target="_blank">stein.hak@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi, everyone<br><br></div>The thing I want to accomplish is this: <br><br></div>Parse pipeline from template like:<br><br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0)"><span style="font-family:arial,helvetica,sans-serif">rtspsrc name=source latency=100 ! queue ! rtph264depay ! mpegtsmux name=mux ! tcpserversink port=0 name=sink<br><br></span></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0)"><span style="font-family:arial,helvetica,sans-serif">Connect client_added to code:<br><br></span><span style="color:rgb(0,0,128);font-weight:bold">def </span>add_client(<span style="color:rgb(148,85,141)">self</span>, <span style="color:rgb(128,128,128)">sink</span>, gsock):<br> <span style="color:rgb(0,0,128);font-weight:bold">print </span><span style="color:rgb(0,128,0);font-weight:bold">'Adding client for input:'</span>, <span style="color:rgb(148,85,141)">self</span>.input<br> <span style="color:rgb(148,85,141)">self</span>.mainbin.set_state(Gst.Sta<wbr>te.PLAYING)<br> state = <span style="color:rgb(148,85,141)">self</span>.mainbin.get_state(<span style="color:rgb(0,0,255)">5 </span>* Gst.SECOND) <span style="color:rgb(128,128,128);font-style:italic"># Wait 5 seconds for pipeline to become playing. If not- panic<br></span><span style="color:rgb(128,128,128);font-style:italic"> </span><span style="color:rgb(0,0,128);font-weight:bold">if </span>state[<span style="color:rgb(0,0,255)">1</span>] != Gst.State.PLAYING:<br> <span style="color:rgb(0,0,128);font-weight:bold">print </span><span style="color:rgb(0,128,0);font-weight:bold">'Failed to start pipeline in time'<br></span><span style="color:rgb(0,128,0);font-weight:bold"> </span><span style="color:rgb(148,85,141)">self</span>.interrupt = <span style="color:rgb(0,0,255)">1<br></span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(0,0,128);font-weight:bold">else</span>:<br> <span style="color:rgb(148,85,141)">self</span>.clients[gsock] = time.time()<br><br></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0)"><font face="arial,helvetica,sans-serif">and set mainbin to state Gst.State.READY.<br><br></font></pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0)"><font face="arial,helvetica,sans-serif">So in theory pipeline would be set to Gst.State.PLAYING upon connection of the first client. But something diffetent is happening:<br></font></pre><div><div><div><br><br>0:00:10.181936142 22902 0x2fd3720 INFO GST_STATES gstbin.c:2316:gst_bin_element_<wbr>set_state:<sink0> current READY pending VOID_PENDING, desired next PAUSED<br>0:00:10.181958384 22902 0x2fd3720 INFO GST_STATES gstelement.c:2657:gst_element_<wbr>change_state:<sink0> have FAILURE change_state return<br>0:00:10.181964597 22902 0x2fd3720 INFO GST_STATES gstelement.c:2247:gst_element_<wbr>abort_state:<sink0> aborting state from READY to PAUSED<br>0:00:10.181970952 22902 0x2fd3720 INFO GST_STATES gstbin.c:2780:gst_bin_change_s<wbr>tate_func:<pipeline0> child 'sink0' failed to go to state 3(PAUSED)<br>0:00:10.181982111 22902 0x2fd3720 INFO GST_STATES gstelement.c:2657:gst_element_<wbr>change_state:<sink0> have FAILURE change_state return<br>0:00:10.181986271 22902 0x2fd3720 INFO GST_STATES gstelement.c:2247:gst_element_<wbr>abort_state:<sink0> aborting state from READY to READY<br>0:00:10.181991927 22902 0x2fd3720 WARN bin gstbin.c:2642:reset_state:<sin<wbr>k0> Failed to switch back down to READY<br><br></div><div>Is my scenario possible and what can I do about it? <br><br></div><div>Thanks in advance!<br></div><div><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</body></html>