diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-11-01 00:49:00 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-11-01 00:54:44 +0000 |
commit | e3957d141793282518c015a02f81c52b2118b2ff (patch) | |
tree | a2618ff39dd24be42df632af3a907334ef3814d8 | |
parent | 069cc3a5de9ee4d8f0e67c4bf599abf2d2ede700 (diff) |
Update for pad API changes
GstProbeType, GstProbeReturn and GstActivateMode -> GstPad*
-rw-r--r-- | gnl/gnlcomposition.c | 31 | ||||
-rw-r--r-- | gnl/gnlsource.c | 14 | ||||
-rw-r--r-- | tests/check/gnl/common.h | 18 | ||||
-rw-r--r-- | tests/check/gnl/complex.c | 4 | ||||
-rw-r--r-- | tests/check/gnl/gnlcomposition.c | 16 | ||||
-rw-r--r-- | tests/check/gnl/gnloperation.c | 2 | ||||
-rw-r--r-- | tests/check/gnl/gnlsource.c | 4 | ||||
-rw-r--r-- | tests/check/gnl/seek.c | 2 | ||||
-rw-r--r-- | tests/check/gnl/simple.c | 8 |
9 files changed, 50 insertions, 49 deletions
diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 1cb36dc..9ad12c7 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -167,7 +167,7 @@ static GstStateChangeReturn gnl_composition_change_state (GstElement * element, GstStateChange transition); static GstPad *get_src_pad (GstElement * element); -static GstProbeReturn pad_blocked (GstPad * pad, GstProbeType type, +static GstPadProbeReturn pad_blocked (GstPad * pad, GstPadProbeType type, gpointer type_data, GnlComposition * comp); static inline void gnl_composition_remove_ghostpad (GnlComposition * comp); @@ -656,11 +656,11 @@ eos_main_thread (GnlComposition * comp) return FALSE; } -static GstProbeReturn -ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED, GstProbeType type, - GstEvent * event, GnlComposition * comp) +static GstPadProbeReturn +ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED, + GstPadProbeType type, GstEvent * event, GnlComposition * comp) { - GstProbeReturn retval = GST_PROBE_OK; + GstPadProbeReturn retval = GST_PAD_PROBE_OK; GnlCompositionPrivate *priv = comp->priv; GST_DEBUG_OBJECT (comp, "event: %s", GST_EVENT_TYPE_NAME (event)); @@ -684,7 +684,7 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED, GstProbeType type, if (priv->flushing) { GST_DEBUG_OBJECT (comp, "flushing, bailing out"); COMP_FLUSHING_UNLOCK (comp); - retval = GST_PROBE_DROP; + retval = GST_PAD_PROBE_DROP; break; } COMP_FLUSHING_UNLOCK (comp); @@ -702,7 +702,7 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED, GstProbeType type, priv->pending_idle = g_idle_add ((GSourceFunc) eos_main_thread, (gpointer) comp); - retval = GST_PROBE_DROP; + retval = GST_PAD_PROBE_DROP; } break; default: @@ -1115,13 +1115,13 @@ beach: return res; } -static GstProbeReturn -pad_blocked (GstPad * pad, GstProbeType type, gpointer type_data, +static GstPadProbeReturn +pad_blocked (GstPad * pad, GstPadProbeType type, gpointer type_data, GnlComposition * comp) { GST_DEBUG_OBJECT (comp, "Pad : %s:%s", GST_DEBUG_PAD_NAME (pad)); - return GST_PROBE_OK; + return GST_PAD_PROBE_OK; } static inline void @@ -1189,7 +1189,7 @@ gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target, if (!priv->toplevelentry->probeid) { /* If it's not blocked, block it */ priv->toplevelentry->probeid = - gst_pad_add_probe (ptarget, GST_PROBE_TYPE_BLOCKING, + gst_pad_add_probe (ptarget, GST_PAD_PROBE_TYPE_BLOCKING, (GstPadProbeCallback) pad_blocked, comp, NULL); } @@ -1211,7 +1211,7 @@ gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target, if (target && (priv->ghosteventprobe == 0)) { priv->ghosteventprobe = - gst_pad_add_probe (target, GST_PROBE_TYPE_EVENT, + gst_pad_add_probe (target, GST_PAD_PROBE_TYPE_EVENT, (GstPadProbeCallback) ghost_event_probe_handler, comp, NULL); GST_DEBUG_OBJECT (comp, "added event probe %d", priv->ghosteventprobe); } @@ -2037,7 +2037,8 @@ compare_relink_single_node (GnlComposition * comp, GNode * node, if (!oldentry->probeid) { GST_LOG_OBJECT (comp, "block_async(%s:%s, TRUE)", GST_DEBUG_PAD_NAME (srcpad)); - oldentry->probeid = gst_pad_add_probe (srcpad, GST_PROBE_TYPE_BLOCKING, + oldentry->probeid = + gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BLOCKING, (GstPadProbeCallback) pad_blocked, comp, NULL); } } @@ -2187,7 +2188,7 @@ compare_deactivate_single_node (GnlComposition * comp, GNode * node, if (entry && !entry->probeid) { GST_LOG_OBJECT (comp, "Setting BLOCKING probe on %s:%s", GST_DEBUG_PAD_NAME (srcpad)); - entry->probeid = gst_pad_add_probe (srcpad, GST_PROBE_TYPE_BLOCKING, + entry->probeid = gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BLOCKING, (GstPadProbeCallback) pad_blocked, comp, NULL); } @@ -2670,7 +2671,7 @@ object_pad_added (GnlObject * object G_GNUC_UNUSED, GstPad * pad, if (!entry->probeid) { GST_DEBUG_OBJECT (comp, "pad %s:%s was added, blocking it", GST_DEBUG_PAD_NAME (pad)); - entry->probeid = gst_pad_add_probe (pad, GST_PROBE_TYPE_BLOCKING, + entry->probeid = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BLOCKING, (GstPadProbeCallback) pad_blocked, comp, NULL); } } diff --git a/gnl/gnlsource.c b/gnl/gnlsource.c index b00aded..a3b206a 100644 --- a/gnl/gnlsource.c +++ b/gnl/gnlsource.c @@ -78,8 +78,8 @@ static gboolean gnl_source_send_event (GstElement * element, GstEvent * event); static GstStateChangeReturn gnl_source_change_state (GstElement * element, GstStateChange transition); -static GstProbeReturn -pad_blocked_cb (GstPad * pad, GstProbeType probetype, +static GstPadProbeReturn +pad_blocked_cb (GstPad * pad, GstPadProbeType probetype, gpointer udata, GnlSource * source); static gboolean @@ -222,7 +222,7 @@ element_pad_added_cb (GstElement * element G_GNUC_UNUSED, GstPad * pad, GST_DEBUG_OBJECT (pad, "valid pad, about to add event probe and pad block"); - priv->probeid = gst_pad_add_probe (pad, GST_PROBE_TYPE_BLOCK, + priv->probeid = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BLOCK, (GstPadProbeCallback) pad_blocked_cb, source, NULL); if (priv->probeid == 0) GST_WARNING_OBJECT (source, "Couldn't set Async pad blocking"); @@ -356,8 +356,8 @@ beach: return NULL; } -static GstProbeReturn -pad_blocked_cb (GstPad * pad, GstProbeType ptype, gpointer unused_data, +static GstPadProbeReturn +pad_blocked_cb (GstPad * pad, GstPadProbeType ptype, gpointer unused_data, GnlSource * source) { GST_DEBUG_OBJECT (pad, "probe callback"); @@ -367,7 +367,7 @@ pad_blocked_cb (GstPad * pad, GstProbeType ptype, gpointer unused_data, g_thread_create ((GThreadFunc) ghost_seek_pad, source, FALSE, NULL); } - return GST_PROBE_OK; + return GST_PAD_PROBE_OK; } @@ -565,7 +565,7 @@ gnl_source_change_state (GstElement * element, GstStateChange transition) GST_LOG_OBJECT (source, "Trying to async block source pad %s:%s", GST_DEBUG_PAD_NAME (pad)); priv->ghostedpad = pad; - priv->probeid = gst_pad_add_probe (pad, GST_PROBE_TYPE_BLOCK, + priv->probeid = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BLOCK, (GstPadProbeCallback) pad_blocked_cb, source, NULL); gst_object_unref (pad); } diff --git a/tests/check/gnl/common.h b/tests/check/gnl/common.h index 5d19995..1827934 100644 --- a/tests/check/gnl/common.h +++ b/tests/check/gnl/common.h @@ -95,7 +95,7 @@ compare_segments (Segment * segment, GstEvent * event) return TRUE; } -static GstProbeReturn +static GstPadProbeReturn sinkpad_event_probe (GstPad * sinkpad, GstEvent * event, CollectStructure * collect) { Segment * segment; @@ -111,24 +111,24 @@ sinkpad_event_probe (GstPad * sinkpad, GstEvent * event, CollectStructure * coll collect->gotsegment = TRUE; } - return GST_PROBE_OK; + return GST_PAD_PROBE_OK; } -static GstProbeReturn +static GstPadProbeReturn sinkpad_buffer_probe (GstPad * sinkpad, GstBuffer * buffer, CollectStructure * collect) { fail_if(!collect->gotsegment); - return GST_PROBE_OK; + return GST_PAD_PROBE_OK; } -static GstProbeReturn -sinkpad_probe (GstPad *sinkpad, GstProbeType ptype, gpointer data, CollectStructure * collect) +static GstPadProbeReturn +sinkpad_probe (GstPad *sinkpad, GstPadProbeType ptype, gpointer data, CollectStructure * collect) { - if (ptype & GST_PROBE_TYPE_BUFFER) + if (ptype & GST_PAD_PROBE_TYPE_BUFFER) return sinkpad_buffer_probe (sinkpad, (GstBuffer*) data, collect); - if (ptype & GST_PROBE_TYPE_EVENT) + if (ptype & GST_PAD_PROBE_TYPE_EVENT) return sinkpad_event_probe (sinkpad, (GstEvent *) data, collect); - return GST_PROBE_OK; + return GST_PAD_PROBE_OK; } static GstElement * diff --git a/tests/check/gnl/complex.c b/tests/check/gnl/complex.c index 464e76a..2eedb00 100644 --- a/tests/check/gnl/complex.c +++ b/tests/check/gnl/complex.c @@ -29,7 +29,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments) G_CALLBACK (composition_pad_added_cb), collect); sinkpad = gst_element_get_static_pad (sink, "sink"); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (GST_ELEMENT (pipeline)); @@ -535,7 +535,7 @@ GST_START_TEST (test_renegotiation) G_CALLBACK (composition_pad_added_cb), collect); sinkpad = gst_element_get_static_pad (sink, "sink"); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (GST_ELEMENT (pipeline)); diff --git a/tests/check/gnl/gnlcomposition.c b/tests/check/gnl/gnlcomposition.c index 9c5540e..13319a8 100644 --- a/tests/check/gnl/gnlcomposition.c +++ b/tests/check/gnl/gnlcomposition.c @@ -29,20 +29,20 @@ static int composition_pad_removed; static int seek_events; static gulong blockprobeid; -static GstProbeReturn -on_source1_pad_event_cb (GstPad * pad, GstProbeType ptype, +static GstPadProbeReturn +on_source1_pad_event_cb (GstPad * pad, GstPadProbeType ptype, GstEvent * event, gpointer user_data) { if (event->type == GST_EVENT_SEEK) ++seek_events; - return GST_PROBE_OK; + return GST_PAD_PROBE_OK; } static void on_source1_pad_added_cb (GstElement * source, GstPad * pad, gpointer user_data) { - gst_pad_add_probe (pad, GST_PROBE_TYPE_EVENT, + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT, (GstPadProbeCallback) on_source1_pad_event_cb, NULL, NULL); } @@ -230,8 +230,8 @@ GST_START_TEST (test_remove_invalid_object) GST_END_TEST; -static GstProbeReturn -pad_block (GstPad * pad, GstProbeType ptype, gpointer bedata, +static GstPadProbeReturn +pad_block (GstPad * pad, GstPadProbeType ptype, gpointer bedata, gpointer user_data) { GstPad *ghost; @@ -246,7 +246,7 @@ pad_block (GstPad * pad, GstProbeType ptype, gpointer bedata, gst_pad_remove_probe (pad, blockprobeid); - return GST_PROBE_OK; + return GST_PAD_PROBE_OK; } static void @@ -329,7 +329,7 @@ GST_START_TEST (test_no_more_pads_race) videotestsrc2 = gst_element_factory_make ("videotestsrc", "videotestsrc2"); pad = gst_element_get_static_pad (videotestsrc2, "src"); blockprobeid = - gst_pad_add_probe (pad, GST_PROBE_TYPE_BLOCKING, + gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BLOCKING, (GstPadProbeCallback) pad_block, bin, NULL); gst_bin_add (bin, videotestsrc2); gst_bin_add (GST_BIN (source2), GST_ELEMENT (bin)); diff --git a/tests/check/gnl/gnloperation.c b/tests/check/gnl/gnloperation.c index f1ed7c6..bec3ef0 100644 --- a/tests/check/gnl/gnloperation.c +++ b/tests/check/gnl/gnloperation.c @@ -29,7 +29,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments) G_CALLBACK (composition_pad_added_cb), collect); sinkpad = gst_element_get_static_pad (sink, "sink"); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (GST_ELEMENT (pipeline)); diff --git a/tests/check/gnl/gnlsource.c b/tests/check/gnl/gnlsource.c index 71e5e1a..41bf6db 100644 --- a/tests/check/gnl/gnlsource.c +++ b/tests/check/gnl/gnlsource.c @@ -44,7 +44,7 @@ GST_START_TEST (test_simple_videotestsrc) sinkpad = gst_element_get_static_pad (sink, "sink"); fail_if (sinkpad == NULL); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (pipeline); @@ -145,7 +145,7 @@ GST_START_TEST (test_videotestsrc_in_bin) sinkpad = gst_element_get_static_pad (sink, "sink"); fail_if (sinkpad == NULL); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (pipeline); diff --git a/tests/check/gnl/seek.c b/tests/check/gnl/seek.c index d579ec8..0547b26 100644 --- a/tests/check/gnl/seek.c +++ b/tests/check/gnl/seek.c @@ -51,7 +51,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments, GList * seeks) G_CALLBACK (composition_pad_added_cb), collect); sinkpad = gst_element_get_static_pad (sink, "sink"); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_EVENT, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_EVENT, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (GST_ELEMENT (pipeline)); diff --git a/tests/check/gnl/simple.c b/tests/check/gnl/simple.c index 3276704..ee25309 100644 --- a/tests/check/gnl/simple.c +++ b/tests/check/gnl/simple.c @@ -62,7 +62,7 @@ test_simplest_full (gboolean async) G_CALLBACK (composition_pad_added_cb), collect); sinkpad = gst_element_get_static_pad (sink, "sink"); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (GST_ELEMENT (pipeline)); @@ -339,7 +339,7 @@ test_one_after_other_full (gboolean async) G_CALLBACK (composition_pad_added_cb), collect); sinkpad = gst_element_get_static_pad (sink, "sink"); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (GST_ELEMENT (pipeline)); @@ -539,7 +539,7 @@ test_one_under_another_full (gboolean async) G_CALLBACK (composition_pad_added_cb), collect); sinkpad = gst_element_get_static_pad (sink, "sink"); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (GST_ELEMENT (pipeline)); @@ -687,7 +687,7 @@ test_one_bin_after_other_full (gboolean async) G_CALLBACK (composition_pad_added_cb), collect); sinkpad = gst_element_get_static_pad (sink, "sink"); - gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_DATA, + gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA, (GstPadProbeCallback) sinkpad_probe, collect, NULL); bus = gst_element_get_bus (GST_ELEMENT (pipeline)); |