<div dir="ltr">Because I want my pipeline to auto locate unused port.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-23 14:58 GMT+03:00 bernhard.graaf <span dir="ltr"><<a href="mailto:bernhard.graaf@gmx.de" target="_blank">bernhard.graaf@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Why Port 0?</div><div><br></div><div><br></div><div><br></div><div id="m_91647475093499968composer_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"><div>-------- Ursprüngliche Nachricht --------</div><div>Von: Krutskikh Ivan <<a href="mailto:stein.hak@gmail.com" target="_blank">stein.hak@gmail.com</a>> </div><div>Datum: 23.05.17 13:39 (GMT+01:00) </div><div>An: Discussion of the development of and with GStreamer <<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<wbr>freedesktop.org</a>> </div><div>Betreff: Re: tcpserversink fails to set_state </div><div><br></div></div><div><div class="h5"><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="m_91647475093499968HOEnZb"><div class="m_91647475093499968h5"><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>
</div></div></div><br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div>