"pad is in use, delay idle callback");
GST_OBJECT_UNLOCK (pad);
} else {
- GstPadProbeInfo info = { GST_PAD_PROBE_TYPE_IDLE, };
+ GstPadProbeInfo info = { GST_PAD_PROBE_TYPE_IDLE, res, };
/* the pad is idle now, we can signal the idle callback now */
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
if (callback == NULL)
return;
+ info->id = hook->hook_id;
+
GST_OBJECT_UNLOCK (pad);
ret = callback (pad, info, hook->data);
G_STMT_START { \
if (G_UNLIKELY (pad->num_probes)) { \
/* we start with passing NULL as the data item */ \
- GstPadProbeInfo info = { mask, NULL, offs, size }; \
+ GstPadProbeInfo info = { mask, 0, NULL, offs, size }; \
ret = do_probe_callbacks (pad, &info, defaultval); \
/* store the possibly updated data item */ \
data = GST_PAD_PROBE_INFO_DATA (&info); \
G_STMT_START { \
if (G_UNLIKELY (pad->num_probes)) { \
/* pass NULL as the data item */ \
- GstPadProbeInfo info = { mask, NULL, 0, 0 }; \
+ GstPadProbeInfo info = { mask, 0, NULL, 0, 0 }; \
ret = do_probe_callbacks (pad, &info, defaultval); \
if (G_UNLIKELY (ret != defaultval && ret != GST_FLOW_OK)) \
goto label; \
#define PROBE_FULL(pad,mask,data,offs,size,label,defaultval) \
G_STMT_START { \
if (G_UNLIKELY (pad->num_probes)) { \
- GstPadProbeInfo info = { mask, data, offs, size }; \
+ GstPadProbeInfo info = { mask, 0, data, offs, size }; \
ret = do_probe_callbacks (pad, &info, defaultval); \
data = GST_PAD_PROBE_INFO_DATA (&info); \
if (G_UNLIKELY (ret != defaultval && ret != GST_FLOW_OK)) \
/**
* GstPadProbeInfo:
* @type: the current probe type
+ * @id: the id of the probe
* @data: type specific data, check the @type field to know the datatype.
* This field can be NULL.
* @offset: offset of pull probe, this field is valid when @type contains
typedef struct
{
GstPadProbeType type;
+ gulong id;
gpointer data;
guint64 offset;
guint size;
} GstPadProbeInfo;
#define GST_PAD_PROBE_INFO_TYPE(d) ((d)->type)
+#define GST_PAD_PROBE_INFO_ID(d) ((d)->id)
#define GST_PAD_PROBE_INFO_DATA(d) ((d)->data)
#define GST_PAD_PROBE_INFO_BUFFER(d) GST_BUFFER_CAST(GST_PAD_PROBE_INFO_DATA(d))