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 756187 - appsink: Always blocks on EOS until buffers are consumed since 1.6, should be configurable
appsink: Always blocks on EOS until buffers are consumed since 1.6, should be...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.6.0
Other Linux
: Normal normal
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-07 13:21 UTC by Jake Foytik
Modified: 2016-01-18 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add WAIT_ON_EOS flag to appsink (5.20 KB, patch)
2015-10-08 13:14 UTC, Evan Callaway
none Details | Review
Update with documentation (11.06 KB, patch)
2015-10-22 17:20 UTC, Evan Callaway
committed Details | Review

Description Jake Foytik 2015-10-07 13:21:46 UTC
While updating our application from gstreamer 1.4.5 to 1.6.0 we noticed that the behavior of appsink has changed during EOS events. In 1.6.0, logic was added so that when an EOS event is received the appsink will block until all of its internal buffers have been processed. 

In our implementation, we make the assumption that an appsink consumer may or may not be connected at a given time. We assume that the pipeline is functional with no appsink consumer which is not the case in 1.6.0.

A simple fix would be to add an option to appsink that disables the while loop that waits for all buffers to be processed in the GST_EVENT_EOS case in gst_app_sink_event() function.

We would be happy to provide a patch if this solution is agreeable.

Thanks
Comment 1 Sebastian Dröge (slomo) 2015-10-07 14:55:38 UTC
Sounds like a good solution, yes
Comment 2 Evan Callaway 2015-10-08 13:14:09 UTC
Created attachment 312911 [details] [review]
Add WAIT_ON_EOS flag to appsink

Here's a patch that adds a WAIT_ON_EOS option to the appsink.  WAIT_ON_EOS defaults to TRUE.  If TRUE, an appsink that receives an EOS will wait until all of its buffers have been processed before continuing.  If set to FALSE, the appsink will continue immediately.

Please let us know if you would like us to tweaks this in any way.
Comment 3 Sebastian Dröge (slomo) 2015-10-11 10:24:40 UTC
Review of attachment 312911 [details] [review]:

Generally looks good, thanks! Just one minor thing:

::: gst-libs/gst/app/gstappsink.c
@@ +214,3 @@
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
+  g_object_class_install_property (gobject_class, PROP_WAIT_ON_EOS,

Add some gtk-docs here, especially the Since: 1.8 marker
Comment 4 Evan Callaway 2015-10-22 17:20:26 UTC
Created attachment 313883 [details] [review]
Update with documentation

I'm new to gtk-docs, is this what you're looking for?
Comment 5 Sebastian Dröge (slomo) 2016-01-18 11:25:29 UTC
commit a1f789770d1383648031030a4b5bb19e8029a05d
Author: Evan Callaway <evan.callaway@ipconfigure.com>
Date:   Thu Oct 15 10:38:16 2015 -0400

    Add WAIT_ON_EOS flag to gstappsink.
    
    If set, an appsink that receives an EOS will wait until all of its buffers have been processed before continuing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756187