View Source Membrane.Agora.Dispatcher (Membrane Agora plugin v0.3.0)
This element allows for dispatching the streams received by the Membrane.Agora.Source
based on the user_id field from the buffer's metadata.
The Membrane.Agora.Source sends a single stream for all the users that are present in the
Agora channel and enriches buffers with the user_id field which corresponds
to the ID of the stream sender from the Agora channel. The Membrane.Agora.Dispatcher element allows
to demultiplex such a single output channel stream into multiple streams for each of the users.
Usage:
- attach the
Membrane.Agora.Dispatcherelement to each output pad of theMembrane.Agora.Source. - when the
{:add_pad, <user_id>}message is received from a givenMembrane.Agora.Dispatcherdispatcher, attach the output pad with the following name:{:output, <user_id>}to this particular dispatcher
Element options
Passed via struct Membrane.Agora.Dispatcher.t/0
queue_before_pad_connected?boolean()Default value:
true
If true, the buffers will be queued until the corresponding pad, on which they should be sent, is connected. Otherwise, if there is no corresponding pad available, the buffers are discarded. Defaults to true.
Pads
:input
Accepted formats:
%Membrane.H264{alignment: :au}%Membrane.RawAudio{sample_rate: 44100, channels: 2, sample_format: :s16le}| Direction: | :input |
| Availability: | :always |
| Flow control: | :auto |
:output
Accepted formats:
%Membrane.H264{alignment: :au}%Membrane.RawAudio{sample_rate: 44100, channels: 2, sample_format: :s16le}| Direction: | :output |
| Availability: | :on_request |
| Flow control: | :auto |
Summary
Types
Struct containing options for Membrane.Agora.Dispatcher
Types
@type t() :: %Membrane.Agora.Dispatcher{queue_before_pad_connected?: boolean()}
Struct containing options for Membrane.Agora.Dispatcher
Functions
@spec options() :: keyword()
Returns description of options available for this module