<div dir="ltr"><div>Thanks Tim,<br></div>I am not adding elements to a running pipeline. <br><br>Actually, I cloud realize the issue. It seems that the order of terminating the pipeline was not correct and
g_main_loop_quit where get called
before EOS being moved through the pipeline and get received by bus.<br>In other words, I think we should follow these steps, when we want to stop the pipeline:<br><ul class="gmail-wiki-list0"><li> emit the end-of-stream event and send it to appsrc: g_signal_emit_by_name(nameofappsrcelement, "end-of-stream", &ret);<br></li><li> wait for bus to send the EOS message (this means that EOS has gone through the pipeline), and call g_main_loop_quit upon receiving EOS message from bus </li></ul><div class="gmail_extra">Thanks<br><br></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 23, 2017 at 6:15 AM, Tim Müller <span dir="ltr"><<a href="mailto:tim@centricular.com" target="_blank">tim@centricular.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>On Tue, 2017-03-21 at 12:31 -0400, mehdi semsarzadeh wrote:</div><div><br></div><div>Hi,</div><div><br></div><blockquote type="cite"><div dir="ltr"><blockquote type="cite">Dear All,<br>I am having the following pipeline, which sometimes fails to start. <br>It does not give any specific error, only stuck at flushing of appsrc (i.e. logs are <b>pausing after gst_pad_push() = flushing</b> and <b>pausing task, reason flushing</b>)<br clear="all"><div>I have attached the logs for reference. Gstreamer version is 1.2.4-0ubuntu1.1.<br></div><div>Thanks in advance,<br></div><div><br>appsrc name=videoSrc format=3 stream-type=0 ! video/x-raw, format=(string)UYVY, width=1920, height=1080 ! nvvidconv name=videoConvert ! video/x-raw(memory:NVMM), format=I420 ! omxh264enc name=h264enc ! video/x-h264, stream-format=avc ! matroskamux streamable=true ! filesink name=videoPath1 location=vid_es_fifo_0<br></div></blockquote></div></blockquote><pre></pre><div><span><div>Are you adding elements to a running pipeline?</div><div><br></div><div>If so, you need to first set their state to PLAYING after adding them, and only then link them into the pipeline.</div><div><br></div><div>From the log it looks like the element is still in NULL state when it receives data, which means the pads aren't activated yet, which means appsrc will get a flushing flow return and will think the pipeline is shutting down or flushing, and thus silently stop.</div><div><br></div><div>Cheers</div><span class="gmail-HOEnZb"><font color="#888888"><div> -Tim</div><pre>-- <br></pre><div class="gmail-m_7736070192724175649-x-evo-paragraph" style="font-family:monospace;width:71ch">Tim Müller, Centricular Ltd - <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a></div>
</font></span></span></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><br clear="all"><br>-- <br><div class="gmail_signature">Mehdi Semsarzadeh</div>
</div></div>