Membrane Core v0.1.1 Membrane.Element View Source
Module containing functions spawning, shutting down, inspecting and controlling
playback of elements. These functions are usually called by Membrane.Pipeline
,
and can be called from elsewhere only if there is a really good reason for
doing so.
Link to this section Summary
Types
Defines options that can be passed to start/5
/ start_link/5
and received
in Membrane.Element.Base.Mixin.CommonBehaviour.handle_init/1
callback
Type that defines an element name by which it is identified
Functions
Returns a specification to start this module under a supervisor
Checks whether module is an element
Sends synchronous call to element, informing it that linking has finished
Sends synchronous call to element, requesting it to create a new instance of
:on_request
pad
Sends synchronous calls to two elements, telling them to link with each other
Sends synchronous call to the given element requesting it to set controlling pid
Sends synchronous call to the given element requesting it to set message bus
Stops given element process
Works similarly to start_link/3
, but does not link to the current process
Works similarly to start_link/5
, but does not link to the current process
Works similarly to start_link/5
, but passes element struct (with default values)
as element options
Starts process for element of given module, initialized with given options and links it to the current process in the supervision tree
Sends synchronous call to element, telling it to unlink all its pads
Link to this section Types
Defines options that can be passed to start/5
/ start_link/5
and received
in Membrane.Element.Base.Mixin.CommonBehaviour.handle_init/1
callback.
Type that defines an element name by which it is identified.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Checks whether module is an element.
Sends synchronous call to element, informing it that linking has finished.
Sends synchronous call to element, requesting it to create a new instance of
:on_request
pad.
link( from_element :: pid(), to_element :: pid(), from_pad :: Membrane.Element.Pad.name_t(), to_pad :: Membrane.Element.Pad.name_t(), params :: list() ) :: :ok | {:error, any()}
Sends synchronous calls to two elements, telling them to link with each other.
Sends synchronous call to the given element requesting it to set controlling pid.
It will wait for reply for amount of time passed as second argument (in milliseconds).
Sends synchronous call to the given element requesting it to set message bus.
It will wait for reply for amount of time passed as second argument (in milliseconds).
Stops given element process.
It will wait for reply for amount of time passed as second argument (in milliseconds).
Will trigger calling Membrane.Element.Base.Mixin.CommonBehaviour.handle_shutdown/1
callback.
start(pid(), module(), name_t()) :: GenServer.on_start()
Works similarly to start_link/3
, but does not link to the current process.
start(pid(), module(), name_t(), element_options_t(), GenServer.options()) :: GenServer.on_start()
Works similarly to start_link/5
, but does not link to the current process.
start_link(pid(), module(), name_t()) :: GenServer.on_start()
Works similarly to start_link/5
, but passes element struct (with default values)
as element options.
If element does not define struct, nil
is passed.
start_link(pid(), module(), name_t(), element_options_t(), GenServer.options()) :: GenServer.on_start()
Starts process for element of given module, initialized with given options and links it to the current process in the supervision tree.
Calls GenServer.start_link/3
underneath.
Sends synchronous call to element, telling it to unlink all its pads.