GNOME Bugzilla – Bug 797016
Appsink: does not respect allocation query being serialized
Last modified: 2018-11-03 12:09:32 UTC
Created attachment 373433 [details] Demo of how allocation query handing is not being respected The allocation query is serialized, which means that it should respect the flow of data and follow after all buffers that have come before it. However, appsink does not respect this. I have added a demo showing how this behavior breaks v4l2src functionality. I have also added a simple patch for fixing the issue, by calling the same code that GST_QUERY_DRAIN runs.
Created attachment 373434 [details] [review] Patch to make allocation query be serialized
Created attachment 373439 [details] [review] Made the appsink queries respect all serialized queries
Created attachment 373452 [details] Updated demo on how allocation query handling is not being respected
So now all serialized queries do a drain ? In any case can you make your demo a test that fails without the patch and succeeds with the patch. See existing tests https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/check/elements/appsink.c . Thx!
I think it makes sense, unlike events, we can't just put them in the queue. I'm pretty sure queue element do the same. Now, from there, we should start thinking of a mechanism to handle these query, because it makes me realize that using a pad probe (like i did in kmscube) would mean handling the query before the queue and the same issues would happen.
Created attachment 373460 [details] [review] Test updated to check for drain for any serialized query
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/478.