After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738202 - funnel: Does not forward sticky events if no data was received
funnel: Does not forward sticky events if no data was received
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.4.3
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-09 06:19 UTC by HoonHee Lee
Modified: 2015-03-10 20:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Needs to check if the last pad was set in funnel (1.10 KB, patch)
2014-10-09 06:30 UTC, HoonHee Lee
needs-work Details | Review
Ne need to pending sticky events until buffer is coming (1.31 KB, patch)
2014-11-26 01:46 UTC, HoonHee Lee
needs-work Details | Review
Handle GAP event in funnel to forward sticky events to downstream (6.86 KB, patch)
2014-11-27 10:11 UTC, HoonHee Lee
none Details | Review
handle GAP event to forwards sticky events into downstream (6.54 KB, patch)
2014-12-05 08:14 UTC, HoonHee Lee
committed Details | Review

Description HoonHee Lee 2014-10-09 06:19:48 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
Comment 1 HoonHee Lee 2014-10-09 06:30:41 UTC
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 2 Sebastian Dröge (slomo) 2014-10-09 08:12:31 UTC
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).
Comment 3 HoonHee Lee 2014-11-26 01:46:40 UTC
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.
Comment 4 Olivier Crête 2014-11-26 21:22:38 UTC
We should also treat GAP events likes buffers for the funnel.
Comment 5 Olivier Crête 2014-11-26 21:24:19 UTC
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.
Comment 6 HoonHee Lee 2014-11-27 10:11:10 UTC
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.
Comment 7 HoonHee Lee 2014-12-05 08:14:02 UTC
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.
Comment 8 Olivier Crête 2015-03-10 20:23:59 UTC
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