mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
pad: consider PROBE_TYPE_EVENT_FLUSH when using PROBE_TYPE_ALL_BOTH
When GST_PAD_PROBE_EVENT_FLUSH is used, the probes already have a data type and it is not needed to automatically add the default types. https://bugzilla.gnome.org/show_bug.cgi?id=762330
This commit is contained in:
parent
8db72e7df7
commit
45b0e7aa16
1 changed files with 4 additions and 2 deletions
|
@ -123,6 +123,8 @@ enum
|
||||||
#define GST_PAD_GET_PRIVATE(obj) \
|
#define GST_PAD_GET_PRIVATE(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_PAD, GstPadPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_PAD, GstPadPrivate))
|
||||||
|
|
||||||
|
#define _PAD_PROBE_TYPE_ALL_BOTH_AND_FLUSH (GST_PAD_PROBE_TYPE_ALL_BOTH | GST_PAD_PROBE_TYPE_EVENT_FLUSH)
|
||||||
|
|
||||||
/* we have a pending and an active event on the pad. On source pads only the
|
/* we have a pending and an active event on the pad. On source pads only the
|
||||||
* active event is used. On sinkpads, events are copied to the pending entry and
|
* active event is used. On sinkpads, events are copied to the pending entry and
|
||||||
* moved to the active event when the eventfunc returned %TRUE. */
|
* moved to the active event when the eventfunc returned %TRUE. */
|
||||||
|
@ -1379,7 +1381,7 @@ gst_pad_add_probe (GstPad * pad, GstPadProbeType mask,
|
||||||
|
|
||||||
/* when no contraints are given for the types, assume all types are
|
/* when no contraints are given for the types, assume all types are
|
||||||
* acceptable */
|
* acceptable */
|
||||||
if ((mask & GST_PAD_PROBE_TYPE_ALL_BOTH) == 0)
|
if ((mask & _PAD_PROBE_TYPE_ALL_BOTH_AND_FLUSH) == 0)
|
||||||
mask |= GST_PAD_PROBE_TYPE_ALL_BOTH;
|
mask |= GST_PAD_PROBE_TYPE_ALL_BOTH;
|
||||||
if ((mask & GST_PAD_PROBE_TYPE_SCHEDULING) == 0)
|
if ((mask & GST_PAD_PROBE_TYPE_SCHEDULING) == 0)
|
||||||
mask |= GST_PAD_PROBE_TYPE_SCHEDULING;
|
mask |= GST_PAD_PROBE_TYPE_SCHEDULING;
|
||||||
|
@ -3407,7 +3409,7 @@ probe_hook_marshal (GHook * hook, ProbeMarshall * data)
|
||||||
|
|
||||||
/* one of the data types for non-idle probes */
|
/* one of the data types for non-idle probes */
|
||||||
if ((type & GST_PAD_PROBE_TYPE_IDLE) == 0
|
if ((type & GST_PAD_PROBE_TYPE_IDLE) == 0
|
||||||
&& (flags & GST_PAD_PROBE_TYPE_ALL_BOTH & type) == 0)
|
&& (flags & _PAD_PROBE_TYPE_ALL_BOTH_AND_FLUSH & type) == 0)
|
||||||
goto no_match;
|
goto no_match;
|
||||||
/* one of the scheduling types */
|
/* one of the scheduling types */
|
||||||
if ((flags & GST_PAD_PROBE_TYPE_SCHEDULING & type) == 0)
|
if ((flags & GST_PAD_PROBE_TYPE_SCHEDULING & type) == 0)
|
||||||
|
|
Loading…
Reference in a new issue