get_compatible_pad


Description:

public Pad? get_compatible_pad (Pad pad, Caps? caps)

Looks for an unlinked pad to which the given pad can link.

It is not guaranteed that linking the pads will work, though it should work in most cases.

This function will first attempt to find a compatible unlinked ALWAYS pad, and if none can be found, it will request a compatible REQUEST pad by looking at the templates of this.

Parameters:

this

a Element in which the pad should be found.

pad

the Pad to find a compatible one for.

caps

the Caps to use as a filter.

Returns:

the Pad to which a link can be made, or null if one cannot be found. unref after usage.