View Source Membrane.RTP.Parser (Membrane RTP plugin v0.24.1)
Identifies RTP/RTCP packets, then tries to parse RTP packet (parsing header and preparing payload)
and forwards RTCP packet to :rtcp_output
pad unchanged.
Encrypted packets
In case of SRTP/SRTCP the parser tries to parse just the header of the RTP packet as the packet's payload
is encrypted and must be passed as a whole to the decryptor. The whole packet remains unchanged but
the parsed header gets attached to Membrane.Buffer
's metadata.
SRTP is treated the same as RTCP and all packets gets forwarded to :rtcp_output
pad.
Parsed packets
In both cases, encrypted and unencryptd, parsed header is put into the metadata field in Membrane.Buffer
under :rtp
key.
with the following metadata :timestamp
, :sequence_number
, :ssrc
, :payload_type
,
:marker
, :extension
. See Membrane.RTP.Header
for their meaning and specifications.
Element options
Passed via struct Membrane.RTP.Parser.t/0
secure?
any
Default value:
false
Specifies whether Parser should expect packets that are encrypted or not. Requires adding srtp dependency to work.
Pads
:input
Accepted formats:
%RemoteStream{type: :packetized, content_format: cf} when cf in [nil, RTP, RTCP]
Direction: | :input |
Availability: | :always |
Flow control: | :auto |
:rtcp_output
Accepted formats:
%RemoteStream{content_format: RTCP, type: :packetized}
Direction: | :output |
Availability: | :on_request |
Flow control: | :push |
:output
Accepted formats:
RTP
Direction: | :output |
Availability: | :always |
Flow control: | :auto |
Summary
Types
Struct containing options for Membrane.RTP.Parser
Types
@type t() :: %Membrane.RTP.Parser{secure?: any()}
Struct containing options for Membrane.RTP.Parser
Functions
@spec options() :: keyword()
Returns description of options available for this module