Membrane.Element.WithOutputPads.handle_demand

You're seeing just the callback handle_demand, go back to Membrane.Element.WithOutputPads module for more information.
Link to this callback

handle_demand(pad, size, unit, context, state)

View Source (optional)

Specs

Callback called when buffers should be emitted by a source or filter.

It is called only for output pads in the pull mode, as in their case demand is triggered by the input pad of the subsequent element.

In sources, appropriate amount of data should be sent here.

In filters, this callback should usually return :demand action with size sufficient for supplying incoming demand. This will result in calling Membrane.Filter.handle_process_list/4, which is to supply the demand.

If a source is unable to produce enough buffers, or a filter underestimated returned demand, the :redemand action should be used (see Membrane.Element.Action.redemand_t/0).