add_pad


Description:

public unowned CollectData? add_pad (Pad pad, uint size, CollectDataDestroyNotify destroy_notify, bool @lock)

Add a pad to the collection of collect pads.

The pad has to be a sinkpad. The refcount of the pad is incremented. Use remove_pad to remove the pad from the collection again.

You specify a size for the returned CollectData structure so that you can use it to store additional information.

You can also specify a CollectDataDestroyNotify that will be called just before the CollectData structure is freed. It is passed the pointer to the structure and should free any custom memory and resources allocated for it.

Keeping a pad locked in waiting state is only relevant when using the default collection algorithm (providing the oldest buffer). It ensures a buffer must be available on this pad for a collection to take place. This is of typical use to a muxer element where non-subtitle streams should always be in waiting state, e.g. to assure that caps information is available on all these streams when initial headers have to be written.

The pad will be automatically activated in push mode when this is started.

MT safe.

Parameters:

this

the collectpads to use

pad

the pad to add

size

the size of the returned CollectData structure

destroy_notify

function to be called before the returned CollectData structure is freed

lock

whether to lock this pad in usual waiting state

Returns:

a new CollectData to identify the new pad. Or null if wrong parameters are supplied.




2022 vala-language.org