View Source Membrane.RTP.Parser (Membrane RTP plugin v0.17.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

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

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

Element options

Passed via struct Membrane.RTP.Parser.t/0

  • secure?

    boolean

    Default value: false
    Specifies whether Parser should expect packets that are encrypted or not. Requires adding srtp dependency to work.

pads

Pads

input

:input

Availability :always
Caps Membrane.RemoteStream, restrictions:
  type: :packetized,
  content_format: one_of([nil, Membrane.RTP, Membrane.RTCP])
Demand mode :auto
Demand unit :buffers
Direction :input
Mode :pull
Name :input

rtcp_output

:rtcp_output

Availability :on_request
Caps Membrane.RemoteStream, restrictions:
  content_format: Membrane.RTCP,
  type: :packetized
Demand mode :manual
Demand unit :buffers
Direction :output
Mode :push
Name :rtcp_output

output

:output

Availability :always
Caps Membrane.RTP
Demand mode :auto
Demand unit :buffers
Direction :output
Mode :pull
Name :output

Link to this section Summary

Types

t()

Struct containing options for Membrane.RTP.Parser

Functions

Returns pads descriptions for Membrane.RTP.Parser

Returns description of options available for this module

Link to this section Types

@type t() :: %Membrane.RTP.Parser{secure?: boolean()}

Struct containing options for Membrane.RTP.Parser

Link to this section Functions

@spec membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]

Returns pads descriptions for Membrane.RTP.Parser

@spec options() :: keyword()

Returns description of options available for this module