webrtc_sdp_rtp (webrtc v0.1.0)
View SourceRTP related SDP attribute values: rtpmap and fmtp (RFC 8866 §6), rtcp-fb (RFC 4585 §4.2), extmap (RFC 8285 §8), msid (RFC 8830), legacy msid-semantic, ssrc and ssrc-group (RFC 5576). rid and simulcast values are handled by webrtc_sdp_rid.
parse/2 takes the attribute key and the text after the colon; encode/2 returns that text. Used by webrtc_sdp_attr.
Summary
Types
raw holds the parameter text as received when it differs from the canonical k=v;k=v form. It is written back while it still parses to params, so unmodified input round trips byte exact.
A parameter is Key=Value or a bare value such as 0-15.
Functions
Parse the parameter text of an fmtp line. Parameters are separated by ; with optional surrounding spaces; empty parameters are skipped.
Types
-type direction() :: sendrecv | sendonly | recvonly | inactive.
-type fmtp() :: #{fmt := pt() | binary(), params := [fmtp_param()], raw => binary()}.
raw holds the parameter text as received when it differs from the canonical k=v;k=v form. It is written back while it still parses to params, so unmodified input round trips byte exact.
-type pt() :: 0..127.
-type rtpmap() :: #{pt := pt(), name := binary(), clock_rate := pos_integer(), channels := pos_integer() | undefined}.
A parameter is Key=Value or a bare value such as 0-15.
-type ssrc_group() :: #{semantics := binary(), ssrcs := [0..4294967295]}.
Functions
-spec encode_fmtp_params([fmtp_param()]) -> binary().
-spec parse_fmtp_params(binary()) -> {ok, [fmtp_param()]} | error.
Parse the parameter text of an fmtp line. Parameters are separated by ; with optional surrounding spaces; empty parameters are skipped.