summaryrefslogtreecommitdiff
path: root/gnl
diff options
context:
space:
mode:
authorEdward Hervey <edward.hervey@collabora.co.uk>2011-12-30 14:16:41 +0100
committerEdward Hervey <edward.hervey@collabora.co.uk>2011-12-30 14:27:31 +0100
commitc33b348da7454e244f1b65c8fb6f2dc8ad17e296 (patch)
treed94d394379e7f14a898cd7769b7a7a2c6fd6fefe /gnl
parente0d4715b7731c2c528eedea6a84b1b28b5d6774b (diff)
More updates for probe changes
Diffstat (limited to 'gnl')
-rw-r--r--gnl/gnlcomposition.c19
-rw-r--r--gnl/gnlghostpad.c3
-rw-r--r--gnl/gnlsource.c5
3 files changed, 17 insertions, 10 deletions
diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c
index 2a3be81..4d62222 100644
--- a/gnl/gnlcomposition.c
+++ b/gnl/gnlcomposition.c
@@ -658,10 +658,11 @@ eos_main_thread (GnlComposition * comp)
static GstPadProbeReturn
ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED,
- GstPadProbeType type, GstEvent * event, GnlComposition * comp)
+ GstPadProbeInfo * info, GnlComposition * comp)
{
GstPadProbeReturn retval = GST_PAD_PROBE_OK;
GnlCompositionPrivate *priv = comp->priv;
+ GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
GST_DEBUG_OBJECT (comp, "event: %s", GST_EVENT_TYPE_NAME (event));
@@ -1111,8 +1112,6 @@ gnl_composition_event_handler (GstPad * ghostpad, GstObject * parent,
}
beach:
- gst_object_unref (comp);
-
return res;
}
@@ -1189,7 +1188,8 @@ 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_PAD_PROBE_TYPE_BLOCKING,
+ gst_pad_add_probe (ptarget,
+ GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM | GST_PAD_PROBE_TYPE_IDLE,
(GstPadProbeCallback) pad_blocked, comp, NULL);
}
@@ -2038,7 +2038,8 @@ compare_relink_single_node (GnlComposition * comp, GNode * node,
GST_LOG_OBJECT (comp, "block_async(%s:%s, TRUE)",
GST_DEBUG_PAD_NAME (srcpad));
oldentry->probeid =
- gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BLOCKING,
+ gst_pad_add_probe (srcpad,
+ GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM | GST_PAD_PROBE_TYPE_IDLE,
(GstPadProbeCallback) pad_blocked, comp, NULL);
}
}
@@ -2188,7 +2189,9 @@ 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_PAD_PROBE_TYPE_BLOCKING,
+ entry->probeid =
+ gst_pad_add_probe (srcpad,
+ GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM | GST_PAD_PROBE_TYPE_IDLE,
(GstPadProbeCallback) pad_blocked, comp, NULL);
}
@@ -2671,7 +2674,9 @@ 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_PAD_PROBE_TYPE_BLOCKING,
+ entry->probeid =
+ gst_pad_add_probe (pad,
+ GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM | GST_PAD_PROBE_TYPE_IDLE,
(GstPadProbeCallback) pad_blocked, comp, NULL);
}
}
diff --git a/gnl/gnlghostpad.c b/gnl/gnlghostpad.c
index f3dee17..ef6bfdd 100644
--- a/gnl/gnlghostpad.c
+++ b/gnl/gnlghostpad.c
@@ -532,7 +532,7 @@ ghostpad_query_function (GstPad * ghostpad, GstObject * parent,
GstQuery * query)
{
GnlPadPrivate *priv = gst_pad_get_element_private (ghostpad);
- GnlObject *object = GNL_OBJECT (GST_PAD_PARENT (ghostpad));
+ GnlObject *object = GNL_OBJECT (parent);
gboolean pret = TRUE;
GST_DEBUG_OBJECT (ghostpad, "querytype:%s", GST_QUERY_TYPE_NAME (query));
@@ -662,6 +662,7 @@ gnl_object_ghost_pad_full (GnlObject * object, const gchar * name,
return NULL;
}
+ GST_DEBUG_OBJECT (object, "activating ghostpad");
/* activate pad */
gst_pad_set_active (ghost, TRUE);
/* add it to element */
diff --git a/gnl/gnlsource.c b/gnl/gnlsource.c
index 91e7096..fcd1c48 100644
--- a/gnl/gnlsource.c
+++ b/gnl/gnlsource.c
@@ -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_PAD_PROBE_TYPE_BLOCK,
+ priv->probeid = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
(GstPadProbeCallback) pad_blocked_cb, source, NULL);
if (priv->probeid == 0)
GST_WARNING_OBJECT (source, "Couldn't set Async pad blocking");
@@ -566,7 +566,8 @@ 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_PAD_PROBE_TYPE_BLOCK,
+ priv->probeid =
+ gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
(GstPadProbeCallback) pad_blocked_cb, source, NULL);
gst_object_unref (pad);
}