}
}
-#define PROBE(pad,mask,data,label) \
- G_STMT_START { \
- if (G_UNLIKELY (pad->num_probes)) { \
- ret = do_probe_callbacks (pad, mask, data); \
- if (G_UNLIKELY (ret != GST_FLOW_OK)) \
- goto label; \
- } \
+#define PROBE_FULL(pad,mask,data,label,defaultval) \
+ G_STMT_START { \
+ if (G_UNLIKELY (pad->num_probes)) { \
+ ret = do_probe_callbacks (pad, mask, data, defaultval); \
+ if (G_UNLIKELY (ret != defaultval && ret != GST_FLOW_OK)) \
+ goto label; \
+ } \
} G_STMT_END
+#define PROBE(pad,mask,data,label) \
+ PROBE_FULL(pad, mask, data, label, GST_FLOW_OK);
+
static GstFlowReturn
-do_probe_callbacks (GstPad * pad, GstProbeType mask, gpointer type_data)
+do_probe_callbacks (GstPad * pad, GstProbeType mask, gpointer type_data,
+ GstFlowReturn defaultval)
{
ProbeMarshall data;
guint cookie;
}
}
- return GST_FLOW_OK;
+ return defaultval;
/* ERRORS */
flushing:
}
passed:
{
+ /* FIXME : Should we return FLOW_OK or the defaultval ?? */
GST_DEBUG_OBJECT (pad, "data is passed");
return GST_FLOW_OK;
}
pad->priv->using--;
if (pad->priv->using == 0) {
/* pad is not active anymore, trigger idle callbacks */
- PROBE (pad, GST_PROBE_TYPE_PUSH | GST_PROBE_TYPE_IDLE, NULL, probe_stopped);
+ PROBE_FULL (pad, GST_PROBE_TYPE_PUSH | GST_PROBE_TYPE_IDLE, NULL,
+ probe_stopped, ret);
}
GST_OBJECT_UNLOCK (pad);