Membrane Core v0.5.0 Membrane.Element.WithInputPads 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 pad for the element.
Macro that defines multiple input pads for the element.
Callbacks
Callback invoked when Element is receiving information about new caps for given pad.
Callback invoked when element receives Membrane.Event.EndOfStream
event
emitted when action end_of_stream
is returned.
Callback invoked when element receives Membrane.Event.StartOfStream
event.
Link to this section Functions
Macro that defines input pad for the element.
Allows to use one_of/1
and range/2
functions from Membrane.Caps.Matcher
without module prefix.
It automatically generates documentation from the given definition and adds compile-time caps specs validation.
The type Membrane.Pad.input_spec_t/0
describes how the definition of pads should look.
Macro that defines multiple input pads for the element.
Deprecated in favor of def_input_pad/2
Link to this section Callbacks
handle_caps(pad, caps, context, state)
View Source (optional)handle_caps( pad :: Membrane.Pad.ref_t(), caps :: Membrane.Caps.t(), context :: Membrane.Element.CallbackContext.Caps.t(), state :: Membrane.Element.state_t() ) :: Membrane.Core.CallbackHandler.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.
handle_end_of_stream(pad, context, state)
View Sourcehandle_end_of_stream( pad :: Membrane.Pad.ref_t(), context :: Membrane.Element.CallbackContext.StreamManagement.t(), state :: Membrane.Element.state_t() ) :: Membrane.Core.CallbackHandler.callback_return_t()
Callback invoked when element receives Membrane.Event.EndOfStream
event
emitted when action end_of_stream
is returned.
handle_start_of_stream(pad, context, state)
View Sourcehandle_start_of_stream( pad :: Membrane.Pad.ref_t(), context :: Membrane.Element.CallbackContext.StreamManagement.t(), state :: Membrane.Element.state_t() ) :: Membrane.Core.CallbackHandler.callback_return_t()
Callback invoked when element receives Membrane.Event.StartOfStream
event.