Ending a pipeline with EOS sometimes hangs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Ending a pipeline with EOS sometimes hangs

klex0
Hi,

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
written.

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
cause.

Is there a way to get "timed_pop_filtered" to timeout? Or do any of you have
an idea what can induce this problem?

Regards,
alex



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Ending a pipeline with EOS sometimes hangs

gotsring
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.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel