i have a pipeline for interleaving two RTP audio streams and writing them
into a file. I have around 100-200 of these pipelines running in parallel
and around 30.000 of them running per day.
To end a pipeline, I send an EOS Event and wait with
"bus.timed_pop_filtered(Gst.SECOND, Gst.MessageType.EOS |
Gst.MessageType.ERROR)" for the EOS Message to be sure, everything is
Every few minutes a "timed_pop_filtered" didn't exit, even not with a
timeout. I found this happens reproducible when only one RTP stream has send
packets but not the other. I have fixed this with supervising the SEGMENT
events on each RTP stream. But never the less, I still have this problem of
hanging threads in timed_pop_filtered and currently have no idea about the
Is there a way to get "timed_pop_filtered" to timeout? Or do any of you have
an idea what can induce this problem?
I believe I had encountered something similar when I tried closing a pipeline
with an HTTP stream that never started. My solution (kind of a hack) was to
set a timer that triggered the cleanup function after 5 seconds regardless
of EOS. I did this using g_timeout_add_seconds(). Of course, this probably
means not all elements are flushing correctly, so your output files might
not be finalized correctly.
Or you can try monitoring where the EOS is getting hung up by enabling debug
output (level 4 or 5 maybe?) and from there further debug the problem.