From 629a8d03ce6aa49f6bb98c2cfc66896f27da09ea Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 6 Dec 2011 18:09:13 +0100 Subject: [PATCH] pad: put new event probe type next to other event types --- gst/gstpad.c | 12 +++++------- gst/gstpad.h | 15 ++++++++------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/gst/gstpad.c b/gst/gstpad.c index 9550eaae41..6cd6caeae1 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2818,9 +2818,9 @@ probe_hook_marshal (GHook * hook, ProbeMarshall * data) if ((type & GST_PAD_PROBE_TYPE_BLOCKING) && (flags & GST_PAD_PROBE_TYPE_BLOCKING & type) == 0) goto no_match; - /* only probes that have GST_PAD_PROBE_TYPE_HANDLE_FLUSH set */ - if ((type & GST_PAD_PROBE_TYPE_HANDLE_FLUSH) && - (flags & GST_PAD_PROBE_TYPE_HANDLE_FLUSH & type) == 0) + /* only probes that have GST_PAD_PROBE_TYPE_EVENT_FLUSH set */ + if ((type & GST_PAD_PROBE_TYPE_EVENT_FLUSH) && + (flags & GST_PAD_PROBE_TYPE_EVENT_FLUSH & type) == 0) goto no_match; GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, @@ -3995,8 +3995,7 @@ gst_pad_push_event_unchecked (GstPad * pad, GstEvent * event, GST_PAD_SET_FLUSHING (pad); GST_PAD_BLOCK_BROADCAST (pad); - type |= GST_PAD_PROBE_TYPE_HANDLE_FLUSH; - + type |= GST_PAD_PROBE_TYPE_EVENT_FLUSH; break; case GST_EVENT_FLUSH_STOP: GST_PAD_UNSET_FLUSHING (pad); @@ -4005,8 +4004,7 @@ gst_pad_push_event_unchecked (GstPad * pad, GstEvent * event, GST_LOG_OBJECT (pad, "Removing pending EOS events"); remove_event_by_type (pad, GST_EVENT_EOS); - type |= GST_PAD_PROBE_TYPE_HANDLE_FLUSH; - + type |= GST_PAD_PROBE_TYPE_EVENT_FLUSH; break; default: { diff --git a/gst/gstpad.h b/gst/gstpad.h index 31ea578e56..45b6a37893 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -444,6 +444,10 @@ typedef gboolean (*GstPadForwardFunction) (GstPad *pad, gpointer user_data); * @GST_PAD_PROBE_TYPE_BUFFER_LIST: probe buffer lists * @GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM: probe downstream events * @GST_PAD_PROBE_TYPE_EVENT_UPSTREAM: probe upstream events + * @GST_PAD_PROBE_TYPE_EVENT_FLUSH: probe flush events. This probe has to be + * explicitly enabled and is not included in the + * @@GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM or + * @@GST_PAD_PROBE_TYPE_EVENT_UPSTREAM probe types. * @GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM: probe downstream queries * @GST_PAD_PROBE_TYPE_QUERY_UPSTREAM: probe upstream queries * @GST_PAD_PROBE_TYPE_PUSH: probe push @@ -464,15 +468,12 @@ typedef enum GST_PAD_PROBE_TYPE_BUFFER_LIST = (1 << 5), GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM = (1 << 6), GST_PAD_PROBE_TYPE_EVENT_UPSTREAM = (1 << 7), - GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM = (1 << 8), - GST_PAD_PROBE_TYPE_QUERY_UPSTREAM = (1 << 9), + GST_PAD_PROBE_TYPE_EVENT_FLUSH = (1 << 8), + GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM = (1 << 9), + GST_PAD_PROBE_TYPE_QUERY_UPSTREAM = (1 << 10), /* flags to select scheduling mode */ GST_PAD_PROBE_TYPE_PUSH = (1 << 12), - GST_PAD_PROBE_TYPE_PULL = (1 << 13), - /* flag for event probes that want to handle flush events. - The probe can drop flush event which will mean that the rest - of the pipeline will not get flushed */ - GST_PAD_PROBE_TYPE_HANDLE_FLUSH = (1 << 14) + GST_PAD_PROBE_TYPE_PULL = (1 << 13) } GstPadProbeType; #define GST_PAD_PROBE_TYPE_BLOCKING (GST_PAD_PROBE_TYPE_IDLE | GST_PAD_PROBE_TYPE_BLOCK)