From 3636bc6c4eaf31526cdeadb25f4cfc4691ece5ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= For each encoding in
transceiver.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}},
- if encoding.{{RTCRtpEncodingParameters/codec}} does not
- [= codec dictionary match | match =] any entry in codecs,
- [=map/remove=] encoding[{{RTCRtpEncodingParameters/codec}}].
true
, [=map/remove=] encoding.{{RTCRtpEncodingParameters/codec}}.
true
.
Optional value selecting which codec is used for this encoding's - RTP stream. If absent, the user agent can chose to use any negotiated codec.
++ Optional value selecting which codec is used for this encoding's + RTP stream. If absent, the user agent can chose to use any negotiated codec. +
+
+ When {{codec}} is set and {{RTCRtpSender/[[SendCodecs]]}} have been negotiated,
+ the user agent SHOULD use the first {{RTCRtpSender/[[SendCodecs]]}} matching
+ {{codec}} for sending, according to the [= codec dictionary match =] algorithm
+ with ignoreLevels set to true
.
+
- Remove any [= codec dictionary match | duplicate =] values in + Remove any [= codec dictionary match | duplicate values =] in codecs, ensuring that the first occurrence of each value remains in place.
@@ -11439,9 +11448,11 @@The codec dictionary match algorithm - given two {{RTCRtpCodec}} dictionaries - first and second is as follows: +
+ The codec dictionary match algorithm given two
+ {{RTCRtpCodec}} dictionaries first and second, and
+ an ignoreLevels boolean defaulting to false
if not
+ specified, is as follows:
If either (but not both) of first.{{RTCRtpCodec/sdpFmtpLine}}
and second.{{RTCRtpCodec/sdpFmtpLine}} are [= map/exist | missing =],
- or if they both [=map/exist=] and first.{{RTCRtpCodec/sdpFmtpLine}}
- is different from second.{{RTCRtpCodec/sdpFmtpLine}}, return
- false
. Two FMTP lines are the same as long as they convey the same
- information, including omitting parameters with well defined defaults or using
- different order. In this step, the user agent MUST NOT consider two FMTP lines
- different if "media format" is the same and only the highest complying bitstream
- level differs.
+ return false
.
+ If both first.{{RTCRtpCodec/sdpFmtpLine}} and + second.{{RTCRtpCodec/sdpFmtpLine}} [=map/exist=], run the following + steps: +
++ Let firstMediaFormat be a key-value map of the media formats constructed + from first.{{RTCRtpCodec/sdpFmtpLine}} and secondMediaFormat + be a key-value map of the media formats constructed from + second.{{RTCRtpCodec/sdpFmtpLine}}. +
++ Which FMTP parameters make up the media format is codec specific. In some cases + a parameter can be omitted and still be inferred, in which case it is also a part + of the media format of that codec. +
+
+ If firstMediaFormat is not equal to secondMediaFormat, return
+ false
.
+
+ If ignoreLevels is false
and the highest complying bitstream
+ levels inferred from first.{{RTCRtpCodec/sdpFmtpLine}} and
+ second.{{RTCRtpCodec/sdpFmtpLine}} are different, return false
.
+
+ Even if ignoreLevels is true
, some codecs (such as H.264) have
+ bistream levels that are not distinct from their media formats and as such cannot be
+ ignored in this algorithm.
+