Expand description
a=rtpmap values: the format one names, and whether two of them name the same format.
This module is the single authority for RFC 8866 §6.6 format identity. The question it
answers used to be answered twice. crate::answer asked it to decide which offered
formats go into the answer, sipx-call asked it to decide which codec to build the media
session with, and the two disagreed: one compared the clock rate as text where the other
parsed it to a number. 08000 and 8000 are numerically equal and textually different, so an
offer spelling the rate that way settled on µ-law while the answer named only A-law. sipx then
sent on a payload type the answer never offered, and decoded the peer’s A-law through a µ-law
session — audible garbage rather than silence, with nothing in the stack reporting an error
(M-31).
The rule lives here, in the lower crate, because the dependency only runs one way:
sipx-call can call down, and crate::answer cannot call up. Nothing that belongs to the
layer above comes with it — this module knows the grammar and what makes two values equal, and
has no concept of a codec set or of which format to prefer. Choosing among the values that
match stays where it belongs, above.
docs/specs/sdp-format-identity.md is normative.
Structs§
- Rtpmap
- The format an
a=rtpmapvalue names.
Enums§
- Rtpmap
Error - Why an
a=rtpmapvalue names no format.
Functions§
- same_
format - Whether two
a=rtpmapvalues name the same format, reading both.