GNOME Bugzilla – Bug 738202
funnel: Does not forward sticky events if no data was received
Last modified: 2015-03-10 20:24:12 UTC
GstFunnel element doesn't forward sticky events such as stream-start, caps and segment to downstream if no data is coming. My Pipeline is likes this. / input-selector - audiosink uridecodebin - input-selector - videosink `- funnel - streamiddemux - appsink `- appsink `- appsink `- appsink
Created attachment 288096 [details] [review] Needs to check if the last pad was set in funnel Dear All. Please check and review this patch.
Comment on attachment 288096 [details] [review] Needs to check if the last pad was set in funnel I think if no pad was selected yet and we receive a sticky event, we should select that pad. So we would only forward the events of that single pad, and not all the sticky events of all pads interleaved (which would cause problems).
Created attachment 291514 [details] [review] Ne need to pending sticky events until buffer is coming Thanks for your comment. As I mentioned before, I use the funnel element for supporting internal subtitle contents. My Pipeline is likes this. / input-selector - audiosink uridecodebin - input-selector - videosink `- funnel - streamiddemux - appsink For example, if no data was received or data feeding is late, sticky events can be pending continuously. And streamiddemux only receive gap event continuously. Thus, pipeline can not be constructed completely. I think that if there is one sinkpad in funnel, no need to pending sticky events until data is coming. Please review and check my patch and you want me to do with unit test, I will do.
We should also treat GAP events likes buffers for the funnel.
Review of attachment 291514 [details] [review]: ::: plugins/elements/gstfunnel.c @@ +311,3 @@ } else if (pad != funnel->last_sinkpad) { + /* If there is one sinkpad in funnel, no need to pending sticky events util buffer is coming */ + if ((GST_ELEMENT_CAST (funnel))->numsinkpads == 1) Can't read this without taking the object lock.
Created attachment 291626 [details] [review] Handle GAP event in funnel to forward sticky events to downstream Dear All. Thanks for Olivier with your comment. I modified funnel element to handle GAP event in order to forward sticky events if no data is coming or if it needs. Please review and test my patch.
Created attachment 292170 [details] [review] handle GAP event to forwards sticky events into downstream Dear All. I modify my patch to wrap it with object lock. I think that chain and event handler can be called by different thread. Thus, object lock is required when last pad is changed on event handler. Please review my new patch.
Committed commit 8ce1f4d470d337d734d88daab2d31f40512c3f81 Author: hoonhee.lee <hoonhee.lee@lge.com> Date: Fri Dec 5 14:16:52 2014 +0900 funnel: handle GAP event to forwards sticky events into downstream If no data is coming and funnel receive GAP event, need to forwards sticky events into downstream if it needs. https://bugzilla.gnome.org/show_bug.cgi?id=738202