<div dir="ltr">I'm still stumbled with this one. Any help would be appreciated.<br></div><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.<wbr>State.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_<wbr>state_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:<<wbr>sink0> 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>