In some cases, probes might want to handle the buffer/event/query
themselves and stop the data from travelling further downstream.
While this was somewhat possible with buffer/events and using
GST_PROBE_DROP, it was not applicable to queries, and would result
in the query failing.
With this new GST_PROBE_HANDLED value, the buffer/event/query will
be considered as successfully handled, will not be pushed further
and the appropriate return value (TRUE or GST_FLOW_OK) will be returned
This also allows probes to return a non-default GstFlowReturn when dealing
with buffer push. This can be done by setting the
GST_PAD_PROBE_INFO_FLOW_RETURN() field accordingly
https://bugzilla.gnome.org/show_bug.cgi?id=748643
This tests add an idle probe on an idle pad from a separate thread
so that the callback is called immediatelly. This callback will sit
still and then we try to push a buffer on this same pad. It verifies
that the idle probe blocks data passing
https://bugzilla.gnome.org/show_bug.cgi?id=747852
Use case: we want to block the source pad of a leaky queue and
drop the buffer that causes the block. If we return PROBE_DROP
then the buffer gets dropped, but we get called again. If we
return PROBE_OK we can't easily drop the buffer. If we just
replace the item into the GstPadProbeInfo structure with NULL,
GStreamer will push a NULL buffer to the next element when we
unblock the pad probe. This patch ensures it doesn't do that.
https://bugzilla.gnome.org/show_bug.cgi?id=734342
Stores the last result of a gst_pad_push or a pull on the GstPad and provides
a getter and a macro to access this field.
Whenever the pad is inactive it is set to FLUSHING
API: gst_pad_get_last_flow_return
https://bugzilla.gnome.org/show_bug.cgi?id=709224
Also add test to make sure that if a pad probe is removed while it's
callback is running, the cleanup_hook isn't called again if it
returns GST_PAD_PROBE_REMOVE
Sticky events pushed on an unlinked pad should be stored on the pad. When the
pad is then linked and an event is pushed, the event should be merged with the
already existing sticky events and then the sticky events should be pushed in
the order that they were originally pushed.
Because gst_pad_get_pad_template_caps() returns ANY when there is no template,
the query caps function should also return ANY when there is no template (and no
pad current caps) instead of EMPTY.
If we are dealing with a blocking probe, only then check if one the
blocking flags of the hook matches.
Add some more debug.
Make the pad unit test less racy.
This test currently fails, but is there to ensure we fix this issue
and keep it fixed, since it completely breaks delayed negotiation
use-cases.
This behaviour started breaking since
dd65aae9a1
The fixate caps function was not used externally and we have vmethods in the
base classes where it is needed.
Update some docs.
simplify some fixate functions in the base classes. Also pass the untruncated
caps to the vmethod.
Make a new GstPadProbeInfo structure and pass this in the probe callback. This
allows us to add more things later and also allow the callback to replace or
modify the passed object.
Make a separate cookie to detect chancges in the list of probes and keeping
track of what hooks have been invoked yet.
Remove the requirement to have probes on srcpads in push mode and sinkpads in
pull mode.
Add some more debug.
Keep track of what callbacks got executed. If no callback is called and we are a
blocking pad, let the item pass. This allows you to block pads on selected
items only.
Explicitly have an UPSTREAM and DOWNSTREAM PadProbeType. This allows you to only
block the pad on upstream or downstream items.
Add convenience macros to only block on downstream/upstream items.
Better now than later in the cycle. These might come in handy:
sed -i -e 's/GstProbeReturn/GstPadProbeReturn/g' `git grep GstProbeReturn | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GST_PROBE_/GST_PAD_PROBE_/g' `git grep GST_PROBE_ | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GstProbeType/GstPadProbeType/g' `git grep GstProbeType | sed -e 's/:.*//' | sort -u`