CollectPads.addPad

Add a pad to the collection of collect pads. The pad has to be a sinkpad. The refcount of the pad is incremented. Use gst_collect_pads_remove_pad() to remove the pad from the collection again.

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

You can also specify a #GstCollectDataDestroyNotify that will be called just before the #GstCollectData 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 @pads is started.

MT safe.

Parameters

pad Pad

the pad to add

size uint

the size of the returned #GstCollectData structure

destroyNotify GstCollectDataDestroyNotify

function to be called before the returned #GstCollectData structure is freed

lock bool

whether to lock this pad in usual waiting state

Return Value

a new #GstCollectData to identify the new pad. Or %NULL if wrong parameters are supplied.

Meta