Membrane Core v0.1.0 Membrane.Element.Base.Mixin.SinkBehaviour behaviour View Source
Module defining behaviour for sink and filter elements.
When used declares behaviour implementation, provides default callback definitions and imports macros.
For more information on implementing elements, see Membrane.Element.Base
.
Link to this section Summary
Functions
Macro that defines known sink pads for the element type
Callbacks
Callback invoked when Element is receiving information about new caps for given pad. In filters those caps are forwarded through all source pads by default
Callback that defines what sink pads may be ever available for this element type
Link to this section Types
known_sink_pads_t() :: [ {Membrane.Element.Pad.name_t(), {Membrane.Element.Pad.availability_t(), {:push | :pull, [{:demand_in, Membrane.Buffer.Metric.unit_t()}]}, Membrane.Caps.Matcher.caps_specs_t()}} ]
Link to this section Functions
Macro that defines known sink pads for the element type.
Allows to use Membrane.Caps.Matcher.one_of/1
and Membrane.Caps.Matcher.range/2
functions without module prefix.
It automatically generates documentation from the given definition and adds compile-time caps specs validation.
Link to this section Callbacks
handle_caps( pad :: Membrane.Element.Pad.name_t(), caps :: Membrane.Caps.t(), context :: Context.Caps.t(), state :: Membrane.Element.Base.Mixin.CommonBehaviour.internal_state_t() ) :: Membrane.Element.Base.Mixin.CommonBehaviour.callback_return_t()
Callback invoked when Element is receiving information about new caps for given pad. In filters those caps are forwarded through all source pads by default.
Callback that defines what sink pads may be ever available for this element type.
The default name for generic sink pad, in elements that just consume some
buffers is :sink
.