appsink: add API to catch events
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Fri, 19 Feb 2021 12:32:48 +0000 (13:32 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>
Thu, 22 Jul 2021 11:56:22 +0000 (13:56 +0200)
commit0a657d6db5ba912b13092a907ea507638cd01cf9
tree3b2317918e6c7ce4ad406670ad959e20bb7e654c
parent457e33fee579705b6a3ec8ac058a2c9ad71b4bfa
appsink: add API to catch events

There is currently no way for users to receive incoming events from
appsink while keeping them properly serialized with the buffers flow.
This can be especially useful when application is injecting custom
downstream events into the pipeline and needs to know when they reached
appsink.

Solving this by adding a new signal notifying about new incoming events
and a set of action signals and method to pull those events.
The API is actually pulling the samples and events all together as they
are actually fetched from the same queue.
Having a specific API to pull only events would have the side effect of
discarding samples (and pulling samples would discard events) making
this API not convenient for users.

Partially fix #247

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1046>
docs/plugins/gst_plugins_cache.json
gst-libs/gst/app/gstappsink.c
gst-libs/gst/app/gstappsink.h
tests/check/elements/appsink.c