GNOME Bugzilla – Bug 756187
appsink: Always blocks on EOS until buffers are consumed since 1.6, should be configurable
Last modified: 2016-01-18 11:26:11 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
Sounds like a good solution, yes
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.
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
Created attachment 313883 [details] [review] Update with documentation I'm new to gtk-docs, is this what you're looking for?
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