Pad.addProbe

gulong addProbe(gst.types.PadProbeType mask, gst.types.PadProbeCallback callback)

Be notified of different states of pads. The provided callback is called for every state that matches mask.

Probes are called in groups: First GST_PAD_PROBE_TYPE_BLOCK probes are called, then others, then finally GST_PAD_PROBE_TYPE_IDLE. The only exception here are GST_PAD_PROBE_TYPE_IDLE probes that are called immediately if the pad is already idle while calling [gst.pad.Pad.addProbe]. In each of the groups, probes are called in the order in which they were added.

Parameters

maskthe probe mask
callback#GstPadProbeCallback that will be called with notifications of the pad state

Returns

an id or 0 if no probe is pending. The id can be used to remove the

probe with [gst.pad.Pad.removeProbe]. When using GST_PAD_PROBE_TYPE_IDLE it can happen that the probe can be run immediately and if the probe returns GST_PAD_PROBE_REMOVE this functions returns 0.

MT safe.