<div dir="ltr"><font size="4">Hello,</font><div><font size="4"><br></font></div><div><font size="4">I am trying to have this pipeline end correctly, recorded files being corrupted (invalid duration):</font></div><div><font size="4"><br></font></div><div><font size="4"><font face="monospace">appsrc format=time is-live=true do-timestamp=true name=src ! application/x-rtp,encoding-name=H264 ! tee name=teein ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=5000000000 ! rtpjitterbuffer latency=100 ! rtph264depay ! h264parse ! matroskamux ! filesink location=logs/raw.mkv teein. ! queue max-size-buffers=0 max-size-bytes=0 ! appsink name=sink qos=true</font><br><br></font></div><div><font size="4">At some point the pipeline is stopped by a:</font></div><div><font size="4" face="monospace">gst_element_send_event(pipeline, gst_event_new_eos());<br></font></div><div><font size="4"><br></font></div><div><font size="4">Then a bus watch callback stops the pipeline: <font face="monospace">gst_element_set_state(pipeline, GST_STATE_NULL);</font> on <font face="monospace">GST_MESSAGE_EOS</font></font></div><div><span style="font-family:arial,sans-serif;font-size:large">(I thought that when a bus watch callback receives a </span><span style="font-size:large"><font face="monospace">GST_MESSAGE_EOS</font></span><span style="font-family:arial,sans-serif;font-size:large"> it meant EOS has been propagated to all sinks)</span><br></div><div><span style="font-family:arial,sans-serif;font-size:large"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:large">I am wondering if this may be due to tee and queue in the pipeline.</span></div><div><span style="font-family:arial,sans-serif;font-size:large">I could also catch EOS(s) on every appsink and filesink before ending the pipeline but that seems weird.</span></div><div><span style="font-family:arial,sans-serif;font-size:large"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:large">Two additional observations:</span></div><div><ul><li><span style="font-family:arial,sans-serif;font-size:large">on rare occasions, the recorded file does have a duration</span></li><li><span style="font-family:arial,sans-serif;font-size:large">I've tried waiting (g_usleep) between receiving </span><span style="font-size:large"><font face="monospace">GST_MESSAGE_EOS</font></span><span style="font-family:arial,sans-serif;font-size:large"> and setting pipeline state to </span><span style="font-size:large"><font face="monospace">GST_STATE_NULL</font></span><span style="font-family:arial,sans-serif;font-size:large"> with no effect</span></li></ul><div><font face="arial, sans-serif" size="4">Would you have any suggestions?</font></div></div><div><font face="arial, sans-serif" size="4">Thanks,</font></div><div><font face="arial, sans-serif" size="4">Guillaume</font></div><div><span style="font-family:arial,sans-serif;font-size:large"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:large"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:large"><br></span></div></div>