Membrane Core v0.1.1 Membrane.Element.Base.Filter behaviour View Source

Module defining behaviour for filters - elements processing data.

Behaviours for filters are specified, besides this place, in modules Membrane.Element.Base.Mixin.CommonBehaviour, Membrane.Element.Base.Mixin.SourceBehaviour, and Membrane.Element.Base.Mixin.SinkBehaviour.

Filters can have both sink and source pads. Job of a usual filter is to receive some data on a sink pad, process the data and send it through the source pad. If these pads work in pull mode, which is the most common case, then filter is also responsible for receiving demands on the source pad and requesting them on the sink pad (for more details, see Membrane.Element.Base.Mixin.SourceBehaviour.handle_demand/5 callback). Filters, like all elements, can of course have multiple pads if needed to provide more complex solutions.

Link to this section Summary

Callbacks

Callback that is to process buffers

Callback that is to process buffers. In contrast to handle_process/4, it is passed only a single buffer

Link to this section Callbacks

Callback that is to process buffers.

For pads in pull mode it is called when buffers have been demanded (by returning :demand action from any callback).

For pads in push mode it is invoked when buffers arrive.

Callback that is to process buffers. In contrast to handle_process/4, it is passed only a single buffer.

Called by default implementation of handle_process/4.