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 635718 - [basesrc] custom, non-OOB events aren't pushed downstream
[basesrc] custom, non-OOB events aren't pushed downstream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: 0.10.33
Assigned To: Sebastian Dröge (slomo)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-24 17:55 UTC by nathanael
Modified: 2011-04-07 08:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example code that should work but doesn't because of the missing gstreamer ability (7.54 KB, text/plain)
2010-11-24 17:55 UTC, nathanael
Details

Description nathanael 2010-11-24 17:55:20 UTC
Created attachment 175189 [details]
Example code that should work but doesn't because of the missing gstreamer ability

http://cgit.freedesktop.org/gstreamer/gstreamer/tree/libs/gst/base/gstbasesrc.c#n1639

As can be seen here, custom events aren't passed on. This affects situations where we try to send a custom event down a bin to handle EOS etc. I've attached sample code where the failure is demonstrated. It was suggested by thaytan on IRC and it was actually thaytan who found the missing code above...
Comment 1 Sebastian Dröge (slomo) 2011-04-07 08:43:29 UTC
commit 09f4b25f6bc049db353af361d82f7ab68b145428
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Apr 7 10:40:16 2011 +0200

    basesrc: Drop delayed events after flushing

commit 1d9cd86af6a90808d04893a72230061632140e2a
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Apr 7 10:29:41 2011 +0200

    basesrc: Send syncronized custom downstream/both events downstream from the 
    
    Instead of just silently dropping them. The same was done for tag events
    before already.
    
    Fixes bug #635718.
Comment 2 Sebastian Dröge (slomo) 2011-04-07 08:55:38 UTC
There are two refcount problems in your sample btw.

* gst_bin_get_by_name() returns a new ref and you should unref the element again after usage
* gst_element_send_event() takes ownership of the event, if you want to use the event afterwards (e.g. send it a second time) you have to increase the refcount before sending it