Membrane Core v0.2.2 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 input pads for the element
Callbacks
Callback invoked when Element is receiving information about new caps for given pad
Link to this section Functions
def_input_pads(pads) View Source (macro)
Macro that defines input pads for the element.
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.
The type Membrane.Element.Pad.input_spec_t/0
describes how the definition of pads should look.
Link to this section Callbacks
handle_caps(pad, caps, context, state)
View Source
handle_caps(
pad :: Membrane.Element.Pad.ref_t(),
caps :: Membrane.Caps.t(),
context :: Membrane.Element.CallbackContext.Caps.t(),
state :: Membrane.Element.state_t()
) :: Membrane.Element.Base.Mixin.CommonBehaviour.callback_return_t()
handle_caps( pad :: Membrane.Element.Pad.ref_t(), caps :: Membrane.Caps.t(), context :: Membrane.Element.CallbackContext.Caps.t(), state :: Membrane.Element.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 output pads by default.