mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
pad: rework probe's hook_marshall function
PUSH and PULL mode have opposite scenarios for IDLE and BLOCK probes. For PUSH it will BLOCK with some data type and IDLE won't have a type. For PULL it will BLOCK before getting some data and will be IDLE when some data is obtained. The check in hook_marshall was specific for PUSH mode and would cause PULL probes to fail to be called. Adding different checks for the mode to fix this issue. https://bugzilla.gnome.org/show_bug.cgi?id=761211
This commit is contained in:
parent
1967d56aea
commit
368ee8a336
1 changed files with 16 additions and 4 deletions
20
gst/gstpad.c
20
gst/gstpad.c
|
@ -3407,13 +3407,25 @@ probe_hook_marshal (GHook * hook, ProbeMarshall * data)
|
|||
type = info->type;
|
||||
original_data = info->data;
|
||||
|
||||
/* one of the data types for non-idle probes */
|
||||
if ((type & GST_PAD_PROBE_TYPE_IDLE) == 0
|
||||
&& (flags & _PAD_PROBE_TYPE_ALL_BOTH_AND_FLUSH & type) == 0)
|
||||
goto no_match;
|
||||
/* one of the scheduling types */
|
||||
if ((flags & GST_PAD_PROBE_TYPE_SCHEDULING & type) == 0)
|
||||
goto no_match;
|
||||
|
||||
if (type & GST_PAD_PROBE_TYPE_PUSH) {
|
||||
/* one of the data types for non-idle probes */
|
||||
if ((type & GST_PAD_PROBE_TYPE_IDLE) == 0
|
||||
&& (flags & _PAD_PROBE_TYPE_ALL_BOTH_AND_FLUSH & type) == 0)
|
||||
goto no_match;
|
||||
} else if (type & GST_PAD_PROBE_TYPE_PULL) {
|
||||
/* one of the data types for non-idle probes */
|
||||
if ((type & GST_PAD_PROBE_TYPE_BLOCKING) == 0
|
||||
&& (flags & _PAD_PROBE_TYPE_ALL_BOTH_AND_FLUSH & type) == 0)
|
||||
goto no_match;
|
||||
} else {
|
||||
/* Type must have PULL or PUSH probe types */
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
/* one of the blocking types must match */
|
||||
if ((type & GST_PAD_PROBE_TYPE_BLOCKING) &&
|
||||
(flags & GST_PAD_PROBE_TYPE_BLOCKING & type) == 0)
|
||||
|
|
Loading…
Reference in a new issue